diff --git a/DESCRIPTION b/DESCRIPTION index e0f278a5..e5e72e97 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: dsBaseClient Title: 'DataSHIELD' Client Side Base Functions -Version: 6.3.5 +Version: 6.3.6.9000 Description: Base 'DataSHIELD' functions for the client side. 'DataSHIELD' is a software package which allows you to do non-disclosive federated analysis on sensitive data. 'DataSHIELD' analytic functions have been designed to only share non disclosive summary statistics, with built in automated output diff --git a/armadillo_azure-pipelines.yml b/armadillo_azure-pipelines.yml index 4ff1f497..57ef048b 100644 --- a/armadillo_azure-pipelines.yml +++ b/armadillo_azure-pipelines.yml @@ -34,6 +34,7 @@ variables: branchName: $(Build.SourceBranchName) test_filter: '*' _r_check_system_clock_: 0 + PERF_PROFILE: 'azure-pipeline' ######################################################################################### @@ -274,6 +275,7 @@ jobs: # # "_-|arg-|smk-|datachk-|disc-|math-|expt-|expt_smk-" # testthat::test_package("$(projectName)", filter = "_-|datachk-|smk-|arg-|disc-|perf-|smk_expt-|expt-|math-", reporter = multi_rep, stop_on_failure = FALSE) + sudo R -q -e ' library(covr); dsbase.res <- covr::package_coverage( diff --git a/azure-pipelines.yml b/azure-pipelines.yml index db3d7a18..bc8851fb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -32,6 +32,7 @@ variables: branchName: $(Build.SourceBranchName) test_filter: '*' _r_check_system_clock_: 0 + PERF_PROFILE: 'azure-pipeline' ######################################################################################### @@ -214,7 +215,7 @@ jobs: # Install dsBase. # If previous steps have failed then don't run. - bash: | - R -q -e "library(opalr); opal <- opal.login(username = 'administrator', password = 'datashield_test&', url = 'https://localhost:8443', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)); opal.put(opal, 'system', 'conf', 'general', '_rPackage'); opal.logout(o)" + R -q -e "library(opalr); opal <- opal.login(username = 'administrator', password = 'datashield_test&', url = 'https://localhost:8443', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)); opal.put(opal, 'system', 'conf', 'general', '_rPackage'); opal.logout(opal)" R -q -e "library(opalr); opal <- opal.login('administrator','datashield_test&', url='https://localhost:8443/', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)); dsadmin.install_github_package(opal, 'dsBase', username = 'datashield', ref = 'v6.3.5-dev'); opal.logout(opal)" @@ -253,6 +254,7 @@ jobs: # # "_-|arg-|smk-|datachk-|disc-|math-|expt-|expt_smk-" # testthat::test_package("$(projectName)", filter = "_-|datachk-|smk-|arg-|disc-|perf-|smk_expt-|expt-|math-", reporter = multi_rep, stop_on_failure = FALSE) + sudo R -q -e ' library(covr); dsbase.res <- covr::package_coverage( @@ -342,7 +344,7 @@ jobs: # If previous steps have failed then don't run - bash: | - R -q -e "library(opalr); opal <- opal.login(username = 'administrator', password = 'datashield_test&', url = 'https://localhost:8443', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)); opal.put(opal, 'system', 'conf', 'general', '_rPackage'); opal.logout(o)" + R -q -e "library(opalr); opal <- opal.login(username = 'administrator', password = 'datashield_test&', url = 'https://localhost:8443', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)); opal.put(opal, 'system', 'conf', 'general', '_rPackage'); opal.logout(opal)" R -q -e "library(opalr); opal <- opal.login('administrator','datashield_test&', url='https://localhost:8443/', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)); dsadmin.install_github_package(opal, 'dsDanger', username = 'datashield', ref = '6.3.4'); opal.logout(opal)" diff --git a/docker-compose_armadillo.yml b/docker-compose_armadillo.yml index 37c44cda..4461b24f 100644 --- a/docker-compose_armadillo.yml +++ b/docker-compose_armadillo.yml @@ -3,7 +3,7 @@ services: hostname: armadillo ports: - 8080:8080 - image: datashield/armadillo_citest:5.11.0 + image: datashield/armadillo_citest:5.12.2 environment: LOGGING_CONFIG: 'classpath:logback-file.xml' AUDIT_LOG_PATH: '/app/logs/audit.log' @@ -16,7 +16,6 @@ services: default: hostname: default - image: datashield/rock-quebrada-lamda:latest -# image: datashield/rserver-panda-lamda:devel + image: datashield/rock-quebrada-lamda-permissive:latest environment: DEBUG: "FALSE" diff --git a/opal_azure-pipelines.yml b/opal_azure-pipelines.yml index 6122fb03..917c223a 100644 --- a/opal_azure-pipelines.yml +++ b/opal_azure-pipelines.yml @@ -34,6 +34,7 @@ variables: branchName: $(Build.SourceBranchName) test_filter: '*' _r_check_system_clock_: 0 + PERF_PROFILE: 'azure-pipeline' ######################################################################################### @@ -272,6 +273,7 @@ jobs: # # "_-|arg-|smk-|datachk-|disc-|math-|expt-|expt_smk-" # testthat::test_package("$(projectName)", filter = "_-|datachk-|smk-|arg-|disc-|perf-|smk_expt-|expt-|math-", reporter = multi_rep, stop_on_failure = FALSE) + sudo R -q -e ' library(covr); dsbase.res <- covr::package_coverage( @@ -361,7 +363,7 @@ jobs: # If previous steps have failed then don't run - bash: | - R -q -e "library(opalr); opal <- opal.login(username = 'administrator', password = 'datashield_test&', url = 'https://localhost:8443', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)); opal.put(opal, 'system', 'conf', 'general', '_rPackage'); opal.logout(o)" + R -q -e "library(opalr); opal <- opal.login(username = 'administrator', password = 'datashield_test&', url = 'https://localhost:8443', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)); opal.put(opal, 'system', 'conf', 'general', '_rPackage'); opal.logout(opal)" R -q -e "library(opalr); opal <- opal.login('administrator','datashield_test&', url='https://localhost:8443/', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)); dsadmin.install_github_package(opal, 'dsDanger', username = 'datashield', ref = '6.3.4'); opal.logout(opal)" diff --git a/tests/testthat/perf_files/armadillo_azure-pipeline.csv b/tests/testthat/perf_files/armadillo_azure-pipeline_perf-profile.csv similarity index 100% rename from tests/testthat/perf_files/armadillo_azure-pipeline.csv rename to tests/testthat/perf_files/armadillo_azure-pipeline_perf-profile.csv diff --git a/tests/testthat/perf_files/armadillo_hp-laptop_quay.csv b/tests/testthat/perf_files/armadillo_hp-laptop-quay_perf-profile.csv similarity index 100% rename from tests/testthat/perf_files/armadillo_hp-laptop_quay.csv rename to tests/testthat/perf_files/armadillo_hp-laptop-quay_perf-profile.csv diff --git a/tests/testthat/perf_files/default_perf_profile.csv b/tests/testthat/perf_files/default_perf_profile.csv deleted file mode 100644 index ca8a229c..00000000 --- a/tests/testthat/perf_files/default_perf_profile.csv +++ /dev/null @@ -1,14 +0,0 @@ -"refer_name","rate","lower_tolerance","upper_tolerance" -"conndisconn::perf::simple0","0.1661","0.5","2" -"ds.abs::perf::0","6.247","0.5","2" -"ds.asInteger::perf:0","5.691","0.5","2" -"ds.asList::perf:0","12.50","0.5","2" -"ds.asNumeric::perf:0","5.723","0.5","2" -"ds.assign::perf::0","10.52","0.5","2" -"ds.class::perf::combine:0","13.73","0.5","2" -"ds.colnames::perf:0","25.64","0.5","2" -"ds.exists::perf::combine:0","25.73","0.5","2" -"ds.length::perf::combine:0","25.44","0.5","2" -"ds.mean::perf::combine:0","25.70","0.5","2" -"ds.mean::perf::split:0","25.72","0.5","2" -"void::perf::void::0","53016.0","0.5","2" diff --git a/tests/testthat/perf_files/dslite_hp-laptop_quay.csv b/tests/testthat/perf_files/dslite_hp-laptop-quay_perf-profile.csv similarity index 100% rename from tests/testthat/perf_files/dslite_hp-laptop_quay.csv rename to tests/testthat/perf_files/dslite_hp-laptop-quay_perf-profile.csv diff --git a/tests/testthat/perf_files/opal_azure-pipeline.csv b/tests/testthat/perf_files/opal_azure-pipeline_perf-profile.csv similarity index 100% rename from tests/testthat/perf_files/opal_azure-pipeline.csv rename to tests/testthat/perf_files/opal_azure-pipeline_perf-profile.csv diff --git a/tests/testthat/perf_files/opal_default_perf-profile.csv b/tests/testthat/perf_files/opal_default_perf-profile.csv new file mode 100644 index 00000000..58614204 --- /dev/null +++ b/tests/testthat/perf_files/opal_default_perf-profile.csv @@ -0,0 +1,14 @@ +"refer_name","rate","lower_tolerance","upper_tolerance" +"conndisconn::perf::simple0","0.2725","0.5","2" +"ds.abs::perf::0","2.677","0.5","2" +"ds.asInteger::perf:0","2.294","0.5","2" +"ds.asList::perf:0","4.587","0.5","2" +"ds.asNumeric::perf:0","2.185","0.5","2" +"ds.assign::perf::0","5.490","0.5","2" +"ds.class::perf::combine:0","4.760","0.5","2" +"ds.colnames::perf:0","9.079","0.5","2" +"ds.exists::perf::combine:0","11.09","0.5","2" +"ds.length::perf::combine:0","9.479","0.5","2" +"ds.mean::perf::combine:0","9.650","0.5","2" +"ds.mean::perf::split:0","11.26","0.5","2" +"void::perf::void::0","46250.0","0.5","2" diff --git a/tests/testthat/perf_files/opal_hp-laptop_quay.csv b/tests/testthat/perf_files/opal_hp-laptop-quay_perf-profile.csv similarity index 100% rename from tests/testthat/perf_files/opal_hp-laptop_quay.csv rename to tests/testthat/perf_files/opal_hp-laptop-quay_perf-profile.csv diff --git a/tests/testthat/perf_files/template_perf_profile.csv b/tests/testthat/perf_files/template_perf-profile.csv similarity index 100% rename from tests/testthat/perf_files/template_perf_profile.csv rename to tests/testthat/perf_files/template_perf-profile.csv diff --git a/tests/testthat/perf_files/unknown_default_perf-profile.csv b/tests/testthat/perf_files/unknown_default_perf-profile.csv new file mode 100644 index 00000000..58614204 --- /dev/null +++ b/tests/testthat/perf_files/unknown_default_perf-profile.csv @@ -0,0 +1,14 @@ +"refer_name","rate","lower_tolerance","upper_tolerance" +"conndisconn::perf::simple0","0.2725","0.5","2" +"ds.abs::perf::0","2.677","0.5","2" +"ds.asInteger::perf:0","2.294","0.5","2" +"ds.asList::perf:0","4.587","0.5","2" +"ds.asNumeric::perf:0","2.185","0.5","2" +"ds.assign::perf::0","5.490","0.5","2" +"ds.class::perf::combine:0","4.760","0.5","2" +"ds.colnames::perf:0","9.079","0.5","2" +"ds.exists::perf::combine:0","11.09","0.5","2" +"ds.length::perf::combine:0","9.479","0.5","2" +"ds.mean::perf::combine:0","9.650","0.5","2" +"ds.mean::perf::split:0","11.26","0.5","2" +"void::perf::void::0","46250.0","0.5","2" diff --git a/tests/testthat/perf_tests/perf_rate.R b/tests/testthat/perf_tests/perf_rate.R index 64b638db..a7f85348 100644 --- a/tests/testthat/perf_tests/perf_rate.R +++ b/tests/testthat/perf_tests/perf_rate.R @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------- -# Copyright (c) 2024-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2024-2026 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -8,13 +8,36 @@ # along with this program. If not, see . #------------------------------------------------------------------------------- -.perf.reference.filename <- 'perf_files/default_perf_profile.csv' -.perf.reference.save.filename <- NULL +.perf.reference.filename.base.prefix <- 'perf_files/' +.perf.reference.filename.base.postfix <- '_perf-profile.csv' +.perf.reference.save.filename <- NULL .perf.reference <- NULL .load.pref <- function() { - .perf.reference <<- read.csv(.perf.reference.filename, header = TRUE, sep = ",") + if (ds.test_env$driver == "OpalDriver") + perf.reference.filename.driver.infix <- "opal" + else if (ds.test_env$driver == "ArmadilloDriver") + perf.reference.filename.driver.infix <- "armadillo" + else if (ds.test_env$driver == "DSLiteDriver") + perf.reference.filename.driver.infix <- "dslite" + else + { + perf.reference.filename.infix <- "unknown" + warning("Unknown performance profile driver, using 'unknown'") + } + + perf.profile <- base::Sys.getenv("PERF_PROFILE") + if (nchar(perf.profile) > 0) + perf.reference.filename.platform.infix <- base::tolower(perf.profile) + else + { + perf.reference.filename.platform.infix <- "default" + warning("Unknown performance profile platform, using 'default'") + } + + perf.reference.filename <- paste(.perf.reference.filename.base.prefix, perf.reference.filename.driver.infix, '_', perf.reference.filename.platform.infix, .perf.reference.filename.base.postfix, sep = "") + .perf.reference <<- read.csv(perf.reference.filename, header = TRUE, sep = ",") } perf.reference.save <- function(perf.ref.name, rate, tolerance.lower, tolerance.upper) {