You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seem like the executionTimes.csv file records one second, one minute, and one hour as 1 in the executionTime column. Let's use a consistent time unit like minutes for these times.
remotes::install_github("ohdsi/CohortDiagnostics")
exportFolder<- tempfile()
dir.create(exportFolder)
CohortDiagnostics:::timeExecution(
exportFolder,
taskName="test 1 second",
cohortIds=NULL,
parent=NULL,
start=NA,
execTime=NA,
expr= {
Sys.sleep(1)
})
#> task startTime cohortIds executionTime parent#> 1 test 1 second 2024-10-09 07:31:13 1.005063 secsCohortDiagnostics:::timeExecution(
exportFolder,
taskName="test 1 minute",
cohortIds=NULL,
parent=NULL,
start=NA,
execTime=NA,
expr= {
Sys.sleep(60)
})
#> task startTime cohortIds executionTime parent#> 1 test 1 minute 2024-10-09 07:31:14 1.00007 minsstart<- as.POSIXct("2024-10-09 03:37:46")
oneHour<-start- as.POSIXct("2024-10-09 02:37:46")
CohortDiagnostics:::timeExecution(
exportFolder,
taskName="test 1 hour",
cohortIds=NULL,
parent=NULL,
start=start,
execTime=oneHour,
expr=NULL)
#> task startTime cohortIds executionTime parent#> 1 test 1 hour 2024-10-09 03:37:46 1 hours
list.files(exportFolder)
#> [1] "executionTimes.csv"readr::read_csv(file.path(exportFolder, "executionTimes.csv"))
#> Rows: 3 Columns: 5#> ── Column specification ────────────────────────────────────────────────────────#> Delimiter: ","#> chr (1): task#> dbl (1): executionTime#> lgl (2): cohortIds, parent#> dttm (1): startTime#> #> ℹ Use `spec()` to retrieve the full column specification for this data.#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.#> # A tibble: 3 × 5#> task startTime cohortIds executionTime parent#> <chr> <dttm> <lgl> <dbl> <lgl> #> 1 test 1 second 2024-10-09 05:31:13 NA 1.01 NA #> 2 test 1 minute 2024-10-09 05:31:14 NA 1.00 NA #> 3 test 1 hour 2024-10-09 01:37:46 NA 1 NA
Here is an example execution times file where I think the different units make it confusing.
exportConceptInformation took 22 (seconds or minutes?) while executeDiagnostics took 18 (hours?). I'm not quite sure what the units are.
The text was updated successfully, but these errors were encountered:
ablack3
changed the title
Time units are not consitant in the execution_times.csv output file
Time units are not consitant in the executionTimes.csv output file
Oct 9, 2024
ablack3
changed the title
Time units are not consitant in the executionTimes.csv output file
Units of time are not consistent in the executionTimes.csv output file
Oct 9, 2024
This is fixed in the Darwin Sprint branch we are currently working on. I was thinking of renaming the column executionTime to executionTimeMinutes just to make the unit clear but I'm not sure if that will break anything or if it is clear enough without changing the column name.
It seem like the executionTimes.csv file records one second, one minute, and one hour as 1 in the executionTime column. Let's use a consistent time unit like minutes for these times.
Created on 2024-10-09 with reprex v2.1.1
Here is an example execution times file where I think the different units make it confusing.
exportConceptInformation took 22 (seconds or minutes?) while executeDiagnostics took 18 (hours?). I'm not quite sure what the units are.
The text was updated successfully, but these errors were encountered: