From e4b54be805a5a90926071a92f49384944875aed1 Mon Sep 17 00:00:00 2001 From: eblondel Date: Sun, 1 Dec 2024 00:42:01 +0100 Subject: [PATCH] fix #400 --- DESCRIPTION | 1 + NAMESPACE | 2 ++ R/geoflow.R | 2 ++ R/initWorkflow.R | 2 ++ 4 files changed, 7 insertions(+) diff --git a/DESCRIPTION b/DESCRIPTION index e7491e96..c070765e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -33,6 +33,7 @@ Imports: R6, methods, dotenv, + benchmarkme, httr, jsonlite, XML, diff --git a/NAMESPACE b/NAMESPACE index 8c4f9ec6..88717655 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -112,6 +112,8 @@ import(sf) import(uuid) import(xml2) importFrom(R6,R6Class) +importFrom(benchmarkme,get_cpu) +importFrom(benchmarkme,get_ram) importFrom(curl,curl_fetch_memory) importFrom(png,readPNG) importFrom(terra,rast) diff --git a/R/geoflow.R b/R/geoflow.R index de2efc6f..a061ae11 100644 --- a/R/geoflow.R +++ b/R/geoflow.R @@ -13,6 +13,8 @@ #' @importFrom utils head #' @importFrom utils tail #' @importFrom utils download.file +#' @importFrom benchmarkme get_ram +#' @importFrom benchmarkme get_cpu #' @importFrom zip zipr #' @importFrom png readPNG #' @importFrom curl curl_fetch_memory diff --git a/R/initWorkflow.R b/R/initWorkflow.R index c4bf3194..f6a791e9 100644 --- a/R/initWorkflow.R +++ b/R/initWorkflow.R @@ -39,6 +39,8 @@ initWorkflow <- function(file, dir = ".", jobDirPath = NULL, handleMetadata = TR cat("Session info\n") config$log_separator("=") print(sessionInfo()) + print(paste("* RAM:", round(benchmarkme::get_ram()/1e9,1),"GB")) + print(paste("* CPU:", benchmarkme::get_cpu()$no_of_cores,"cores")) config$log_separator("=") cat("Workflow initialization\n") config$log_separator("=")