Skip to content

Commit ff55303

Browse files
committed
Permit perf test duration to be set, seconds, by environment variable 'PERF_DURATION_SEC'
1 parent 7cddd3a commit ff55303

12 files changed

Lines changed: 25 additions & 25 deletions

tests/testthat/test-perf-conndisconn.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#-------------------------------------------------------------------------------
2-
# Copyright (c) 2024-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
2+
# Copyright (c) 2024-2026 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
33
#
44
# This program and the accompanying materials
55
# are made available under the terms of the GNU Public License v3.0.
@@ -22,7 +22,7 @@ disconnect.studies.dataset.cnsim()
2222

2323
# context("conndisconn::perf::simple0")
2424
test_that("simple connect - disconnect performance", {
25-
.durationSec <- 120 # seconds
25+
.durationSec <- base::as.integer(base::Sys.getenv("PERF_DURATION_SEC", unset = "120")) # defaults to 120 seconds
2626
.count <- 0
2727
.start.time <- Sys.time()
2828
.current.time <- .start.time

tests/testthat/test-perf-ds.abs.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#-------------------------------------------------------------------------------
2-
# Copyright (c) 2024-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
2+
# Copyright (c) 2024-2026 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
33
#
44
# This program and the accompanying materials
55
# are made available under the terms of the GNU Public License v3.0.
@@ -21,7 +21,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG"))
2121

2222
# context("ds.abs::perf:0")
2323
test_that("combine - performance", {
24-
.durationSec <- 30 # seconds
24+
.durationSec <- base::as.integer(base::Sys.getenv("PERF_DURATION_SEC", unset = "30")) # defaults to 30 seconds
2525
.count <- 0
2626
.start.time <- Sys.time()
2727
.current.time <- .start.time

tests/testthat/test-perf-ds.asInteger.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#-------------------------------------------------------------------------------
2-
# Copyright (c) 2024-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
2+
# Copyright (c) 2024-2026 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
33
#
44
# This program and the accompanying materials
55
# are made available under the terms of the GNU Public License v3.0.
@@ -21,7 +21,7 @@ connect.studies.dataset.cnsim(list("GENDER"))
2121

2222
# context("ds.asInteger::perf:0")
2323
test_that("combine - performance", {
24-
.durationSec <- 30 # seconds
24+
.durationSec <- base::as.integer(base::Sys.getenv("PERF_DURATION_SEC", unset = "30")) # defaults to 30 seconds
2525
.count <- 0
2626
.start.time <- Sys.time()
2727
.current.time <- .start.time

tests/testthat/test-perf-ds.asList.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#-------------------------------------------------------------------------------
2-
# Copyright (c) 2024-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
2+
# Copyright (c) 2024-2026 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
33
#
44
# This program and the accompanying materials
55
# are made available under the terms of the GNU Public License v3.0.
@@ -21,7 +21,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG"))
2121

2222
# context("ds.asList::perf:0")
2323
test_that("combine - performance", {
24-
.durationSec <- 30 # seconds
24+
.durationSec <- base::as.integer(base::Sys.getenv("PERF_DURATION_SEC", unset = "30")) # defaults to 30 seconds
2525
.count <- 0
2626
.start.time <- Sys.time()
2727
.current.time <- .start.time

tests/testthat/test-perf-ds.asNumeric.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#-------------------------------------------------------------------------------
2-
# Copyright (c) 2024-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
2+
# Copyright (c) 2024-2026 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
33
#
44
# This program and the accompanying materials
55
# are made available under the terms of the GNU Public License v3.0.
@@ -21,7 +21,7 @@ connect.studies.dataset.cnsim(list("GENDER"))
2121

2222
# context("ds.asNumeric::perf:0")
2323
test_that("combine - performance", {
24-
.durationSec <- 30 # seconds
24+
.durationSec <- base::as.integer(base::Sys.getenv("PERF_DURATION_SEC", unset = "30")) # defaults to 30 seconds
2525
.count <- 0
2626
.start.time <- Sys.time()
2727
.current.time <- .start.time

tests/testthat/test-perf-ds.assign.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#-------------------------------------------------------------------------------
2-
# Copyright (c) 2024-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
2+
# Copyright (c) 2024-2026 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
33
#
44
# This program and the accompanying materials
55
# are made available under the terms of the GNU Public License v3.0.
@@ -21,7 +21,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG"))
2121

2222
# context("ds.assign::perf::0")
2323
test_that("performance", {
24-
.durationSec <- 30 # seconds
24+
.durationSec <- base::as.integer(base::Sys.getenv("PERF_DURATION_SEC", unset = "30")) # defaults to 30 seconds
2525
.count <- 0
2626
.start.time <- Sys.time()
2727
.current.time <- .start.time

tests/testthat/test-perf-ds.class.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#-------------------------------------------------------------------------------
2-
# Copyright (c) 2024-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
2+
# Copyright (c) 2024-2026 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
33
#
44
# This program and the accompanying materials
55
# are made available under the terms of the GNU Public License v3.0.
@@ -21,7 +21,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG"))
2121

2222
# context("ds.class::perf::combine:0")
2323
test_that("combine - performance", {
24-
.durationSec <- 30 # seconds
24+
.durationSec <- base::as.integer(base::Sys.getenv("PERF_DURATION_SEC", unset = "30")) # defaults to 30 seconds
2525
.count <- 0
2626
.start.time <- Sys.time()
2727
.current.time <- .start.time

tests/testthat/test-perf-ds.colnames.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#-------------------------------------------------------------------------------
2-
# Copyright (c) 2024-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
2+
# Copyright (c) 2024-2026 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
33
#
44
# This program and the accompanying materials
55
# are made available under the terms of the GNU Public License v3.0.
@@ -21,7 +21,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG"))
2121

2222
# context("ds.colnames::perf:0")
2323
test_that("combine - performance", {
24-
.durationSec <- 30 # seconds
24+
.durationSec <- base::as.integer(base::Sys.getenv("PERF_DURATION_SEC", unset = "30")) # defaults to 30 seconds
2525
.count <- 0
2626
.start.time <- Sys.time()
2727
.current.time <- .start.time

tests/testthat/test-perf-ds.exists.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#-------------------------------------------------------------------------------
2-
# Copyright (c) 2024-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
2+
# Copyright (c) 2024-2026 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
33
#
44
# This program and the accompanying materials
55
# are made available under the terms of the GNU Public License v3.0.
@@ -21,7 +21,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG"))
2121

2222
# context("ds.exists::perf::combine:0")
2323
test_that("combine - performance", {
24-
.durationSec <- 30 # seconds
24+
.durationSec <- base::as.integer(base::Sys.getenv("PERF_DURATION_SEC", unset = "30")) # defaults to 30 seconds
2525
.count <- 0
2626
.start.time <- Sys.time()
2727
.current.time <- .start.time

tests/testthat/test-perf-ds.length.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#-------------------------------------------------------------------------------
2-
# Copyright (c) 2024-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
2+
# Copyright (c) 2024-2026 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
33
#
44
# This program and the accompanying materials
55
# are made available under the terms of the GNU Public License v3.0.
@@ -21,7 +21,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG"))
2121

2222
# context("ds.length::perf::combine:0")
2323
test_that("combine - performance", {
24-
.durationSec <- 30 # seconds
24+
.durationSec <- base::as.integer(base::Sys.getenv("PERF_DURATION_SEC", unset = "30")) # defaults to 30 seconds
2525
.count <- 0
2626
.start.time <- Sys.time()
2727
.current.time <- .start.time

0 commit comments

Comments
 (0)