Running ‘testthat.R’ [123s/174s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(prcbench)
  > 
  > test_check("prcbench")
  <simpleError in .jcheck(silent = FALSE): Java Exception <no description because toString() failed>rJava::.jcall(auc2, "S", "delFiles")new("jobjRef", jobj = <pointer: 0x55c5fed17740>, jclass = "java/lang/Throwable")>
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  prcbench
   --- call from context --- 
  .auccalc_wrapper(testset, private$auc2, calc_auc, store_res, 
      private$auctype)
   --- call from argument --- 
  if (res != "deleted") {
      .del_auc_files(dpath)
  }
   --- R stacktrace ---
  where 1: .auccalc_wrapper(testset, private$auc2, calc_auc, store_res, 
      private$auctype)
  where 2: private$f_wrapper(testset, calc_auc, store_res)
  where 3: tool$call(tset)
  where 4: system.time(tool$call(tset))
  where 5: FUN(X[[i]], ...)
  where 6: lapply(X = X, FUN = FUN, ...)
  where 7: sapply(integer(n), eval.parent(substitute(function(...) expr)), 
      simplify = simplify)
  where 8: replicate(times, system.time(tool$call(tset)))
  where 9: .time_tool(tset, tool, new_args$times)
  where 10: FUN(X[[i]], ...)
  where 11: lapply(seq_along(new_testset), bmfunc)
  where 12: do.call(rbind, lapply(seq_along(new_testset), bmfunc))
  where 13: run_benchmark(testset, toolset, use_sys_time = use_sys_time)
  where 14: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 15: withCallingHandlers({
      code
      NULL
  }, error = function(cnd) {
      if (can_entrace(cnd)) {
          cnd <- cnd_entrace(cnd)
      }
      return_from(env, cnd)
  })
  where 16: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 17: quasi_capture(enquo(object), label, capture_error, entrace = TRUE)
  where 18 at testthat/test_main_benchmark.R#44: expect_error(run_benchmark(testset, toolset, use_sys_time = use_sys_time), 
      NA)
  where 19 at testthat/test_main_benchmark.R#61: tfunc(TRUE)
  where 20: eval(code, test_env)
  where 21: eval(code, test_env)
  where 22: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 23: doTryCatch(return(expr), name, parentenv, handler)
  where 24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 25: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 26: doTryCatch(return(expr), name, parentenv, handler)
  where 27: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 28: tryCatchList(expr, classes, parentenv, handlers)
  where 29: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 30: test_code(desc, code, env = parent.frame())
  where 31 at testthat/test_main_benchmark.R#39: test_that("run_benchmark: testset", {
      tfunc <- function(use_sys_time) {
          testset <- create_testset("bench", c("b10", "i10"))
          toolset <- create_toolset(set_names = c("crv5", "auc5"))
          expect_error(run_benchmark(testset, toolset, use_sys_time = use_sys_time), 
              NA)
          expect_error(run_benchmark(1, toolset, use_sys_time = use_sys_time), 
              "testset is not a list")
          expect_error(run_benchmark("1", toolset, use_sys_time = use_sys_time), 
              "testset is not a list")
          expect_error(run_benchmark(list(), toolset, use_sys_time = use_sys_time), 
              "not greater than 0")
          expect_error(run_benchmark(toolset, toolset, use_sys_time = use_sys_time), 
              "Invalid testset")
      }
      use_sys_time <- .check_microbenchmark()
      tfunc(use_sys_time)
      if (!use_sys_time) {
          tfunc(TRUE)
      }
  })
  where 32: eval(code, test_env)
  where 33: eval(code, test_env)
  where 34: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 35: doTryCatch(return(expr), name, parentenv, handler)
  where 36: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 37: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 38: doTryCatch(return(expr), name, parentenv, handler)
  where 39: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 40: tryCatchList(expr, classes, parentenv, handlers)
  where 41: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 42: test_code(NULL, exprs, env)
  where 43: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 44: force(code)
  where 45: doWithOneRestart(return(expr), restart)
  where 46: withOneRestart(expr, restarts[[1L]])
  where 47: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 48: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 49: FUN(X[[i]], ...)
  where 50: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 51: force(code)
  where 52: doWithOneRestart(return(expr), restart)
  where 53: withOneRestart(expr, restarts[[1L]])
  where 54: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 55: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 56: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 57: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 58: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 59: test_check("prcbench")
  
   --- value of length: 2 type: logical ---
  message    call 
     TRUE    TRUE 
   --- function from context --- 
  function (testset, auc2, calc_auc = FALSE, store_res = TRUE, 
      auctype = "java") 
  {
      dpath <- testset$get_fname()
      res <- rJava::.jcall(auc2, "[D", "calcCurves", dpath)
      aucscore <- NA
      if (calc_auc) {
          if (auctype == "java") {
              aucscore <- res[2]
          }
          else if (auctype == "r") {
              x <- rJava::.jcall(auc2, "[D", "getX")
              y <- rJava::.jcall(auc2, "[D", "getY")
              x <- c(0, rJava::.jcall(auc2, "[D", "getX"))
              y <- c(rval$y[1], rval$y)
              aucscore <- 0
              for (i in 2:length(x)) {
                  aucscore <- aucscore + 0.5 * (x[i] - x[i - 1]) * 
                    (y[i] + y[i - 1])
              }
          }
      }
      if (store_res) {
          x <- rJava::.jcall(auc2, "[D", "getX")
          y <- rJava::.jcall(auc2, "[D", "getY")
          rval <- list(x = x, y = y, auc = aucscore)
      }
      else {
          rval <- NULL
      }
      res <- tryCatch(rJava::.jcall(auc2, "S", "delFiles"), error = function(e) {
          print(e)
      })
      if (res != "deleted") {
          .del_auc_files(dpath)
      }
      rJava::.jcall(auc2, "V", "clear")
      rval
  }
  <bytecode: 0x55c5fbca0218>
  <environment: namespace:prcbench>
   --- function search by body ---
  Function .auccalc_wrapper in namespace prcbench has this body.
   ----------- END OF FAILURE REPORT -------------- 
  ── 1. Failure: run_benchmark: testset (@test_main_benchmark.R#61)  ─────────────
  `run_benchmark(testset, toolset, use_sys_time = use_sys_time)` threw an error.
  Message: the condition has length > 1
  Class:   simpleError/error/condition
  Backtrace:
    1. prcbench:::tfunc(TRUE)
    7. prcbench::run_benchmark(testset, toolset, use_sys_time = use_sys_time)
    9. base::lapply(seq_along(new_testset), bmfunc)
   10. prcbench:::FUN(X[[i]], ...)
   11. prcbench:::.time_tool(tset, tool, new_args$times)
   12. base::replicate(times, system.time(tool$call(tset)))
   13. base::sapply(...)
   14. base::lapply(X = X, FUN = FUN, ...)
   15. prcbench:::FUN(X[[i]], ...)
   17. tool$call(tset)
   18. private$f_wrapper(testset, calc_auc, store_res)
   19. prcbench:::.auccalc_wrapper(...)
  
  <simpleError in .jcheck(silent = FALSE): Java Exception <no description because toString() failed>rJava::.jcall(auc2, "S", "delFiles")new("jobjRef", jobj = <pointer: 0x55c5fed17740>, jclass = "java/lang/Throwable")>
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  prcbench
   --- call from context --- 
  .auccalc_wrapper(testset, private$auc2, calc_auc, store_res, 
      private$auctype)
   --- call from argument --- 
  if (res != "deleted") {
      .del_auc_files(dpath)
  }
   --- R stacktrace ---
  where 1: .auccalc_wrapper(testset, private$auc2, calc_auc, store_res, 
      private$auctype)
  where 2: private$f_wrapper(testset, calc_auc, store_res)
  where 3: tool$call(tset)
  where 4: system.time(tool$call(tset))
  where 5: FUN(X[[i]], ...)
  where 6: lapply(X = X, FUN = FUN, ...)
  where 7: sapply(integer(n), eval.parent(substitute(function(...) expr)), 
      simplify = simplify)
  where 8: replicate(times, system.time(tool$call(tset)))
  where 9: .time_tool(tset, tool, new_args$times)
  where 10: FUN(X[[i]], ...)
  where 11: lapply(seq_along(new_testset), bmfunc)
  where 12: do.call(rbind, lapply(seq_along(new_testset), bmfunc))
  where 13: run_benchmark(testset, toolset, use_sys_time = use_sys_time)
  where 14: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 15: withCallingHandlers({
      code
      NULL
  }, error = function(cnd) {
      if (can_entrace(cnd)) {
          cnd <- cnd_entrace(cnd)
      }
      return_from(env, cnd)
  })
  where 16: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 17: quasi_capture(enquo(object), label, capture_error, entrace = TRUE)
  where 18 at testthat/test_main_benchmark.R#70: expect_error(run_benchmark(testset, toolset, use_sys_time = use_sys_time), 
      NA)
  where 19 at testthat/test_main_benchmark.R#87: tfunc(TRUE)
  where 20: eval(code, test_env)
  where 21: eval(code, test_env)
  where 22: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 23: doTryCatch(return(expr), name, parentenv, handler)
  where 24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 25: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 26: doTryCatch(return(expr), name, parentenv, handler)
  where 27: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 28: tryCatchList(expr, classes, parentenv, handlers)
  where 29: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 30: test_code(desc, code, env = parent.frame())
  where 31 at testthat/test_main_benchmark.R#65: test_that("run_benchmark: toolset", {
      tfunc <- function(use_sys_time) {
          testset <- create_testset("bench", c("b10", "i10"))
          toolset <- create_toolset(set_names = c("crv5", "auc5"))
          expect_error(run_benchmark(testset, toolset, use_sys_time = use_sys_time), 
              NA)
          expect_error(run_benchmark(testset, 1, use_sys_time = use_sys_time), 
              "toolset is not a list")
          expect_error(run_benchmark(testset, "1", use_sys_time = use_sys_time), 
              "toolset is not a list")
          expect_error(run_benchmark(testset, list(), use_sys_time = use_sys_time), 
              "not greater than 0")
          expect_error(run_benchmark(testset, testset, use_sys_time = use_sys_time), 
              "Invalid toolset")
      }
      use_sys_time <- .check_microbenchmark()
      tfunc(use_sys_time)
      if (!use_sys_time) {
          tfunc(TRUE)
      }
  })
  where 32: eval(code, test_env)
  where 33: eval(code, test_env)
  where 34: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 35: doTryCatch(return(expr), name, parentenv, handler)
  where 36: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 37: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 38: doTryCatch(return(expr), name, parentenv, handler)
  where 39: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 40: tryCatchList(expr, classes, parentenv, handlers)
  where 41: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 42: test_code(NULL, exprs, env)
  where 43: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 44: force(code)
  where 45: doWithOneRestart(return(expr), restart)
  where 46: withOneRestart(expr, restarts[[1L]])
  where 47: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 48: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 49: FUN(X[[i]], ...)
  where 50: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 51: force(code)
  where 52: doWithOneRestart(return(expr), restart)
  where 53: withOneRestart(expr, restarts[[1L]])
  where 54: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 55: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 56: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 57: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 58: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 59: test_check("prcbench")
  
   --- value of length: 2 type: logical ---
  message    call 
     TRUE    TRUE 
   --- function from context --- 
  function (testset, auc2, calc_auc = FALSE, store_res = TRUE, 
      auctype = "java") 
  {
      dpath <- testset$get_fname()
      res <- rJava::.jcall(auc2, "[D", "calcCurves", dpath)
      aucscore <- NA
      if (calc_auc) {
          if (auctype == "java") {
              aucscore <- res[2]
          }
          else if (auctype == "r") {
              x <- rJava::.jcall(auc2, "[D", "getX")
              y <- rJava::.jcall(auc2, "[D", "getY")
              x <- c(0, rJava::.jcall(auc2, "[D", "getX"))
              y <- c(rval$y[1], rval$y)
              aucscore <- 0
              for (i in 2:length(x)) {
                  aucscore <- aucscore + 0.5 * (x[i] - x[i - 1]) * 
                    (y[i] + y[i - 1])
              }
          }
      }
      if (store_res) {
          x <- rJava::.jcall(auc2, "[D", "getX")
          y <- rJava::.jcall(auc2, "[D", "getY")
          rval <- list(x = x, y = y, auc = aucscore)
      }
      else {
          rval <- NULL
      }
      res <- tryCatch(rJava::.jcall(auc2, "S", "delFiles"), error = function(e) {
          print(e)
      })
      if (res != "deleted") {
          .del_auc_files(dpath)
      }
      rJava::.jcall(auc2, "V", "clear")
      rval
  }
  <bytecode: 0x55c5fbca0218>
  <environment: namespace:prcbench>
   --- function search by body ---
  Function .auccalc_wrapper in namespace prcbench has this body.
   ----------- END OF FAILURE REPORT -------------- 
  ── 2. Failure: run_benchmark: toolset (@test_main_benchmark.R#87)  ─────────────
  `run_benchmark(testset, toolset, use_sys_time = use_sys_time)` threw an error.
  Message: the condition has length > 1
  Class:   simpleError/error/condition
  Backtrace:
    1. prcbench:::tfunc(TRUE)
    7. prcbench::run_benchmark(testset, toolset, use_sys_time = use_sys_time)
    9. base::lapply(seq_along(new_testset), bmfunc)
   10. prcbench:::FUN(X[[i]], ...)
   11. prcbench:::.time_tool(tset, tool, new_args$times)
   12. base::replicate(times, system.time(tool$call(tset)))
   13. base::sapply(...)
   14. base::lapply(X = X, FUN = FUN, ...)
   15. prcbench:::FUN(X[[i]], ...)
   17. tool$call(tset)
   18. private$f_wrapper(testset, calc_auc, store_res)
   19. prcbench:::.auccalc_wrapper(...)
  
  <simpleError in .jcheck(silent = FALSE): Java Exception <no description because toString() failed>rJava::.jcall(auc2, "S", "delFiles")new("jobjRef", jobj = <pointer: 0x55c5fed17740>, jclass = "java/lang/Throwable")>
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  prcbench
   --- call from context --- 
  .auccalc_wrapper(testset, private$auc2, calc_auc, store_res, 
      private$auctype)
   --- call from argument --- 
  if (res != "deleted") {
      .del_auc_files(dpath)
  }
   --- R stacktrace ---
  where 1: .auccalc_wrapper(testset, private$auc2, calc_auc, store_res, 
      private$auctype)
  where 2: private$f_wrapper(testset, calc_auc, store_res)
  where 3: tool$call(tset)
  where 4: system.time(tool$call(tset))
  where 5: FUN(X[[i]], ...)
  where 6: lapply(X = X, FUN = FUN, ...)
  where 7: sapply(integer(n), eval.parent(substitute(function(...) expr)), 
      simplify = simplify)
  where 8: replicate(times, system.time(tool$call(tset)))
  where 9: .time_tool(tset, tool, new_args$times)
  where 10: FUN(X[[i]], ...)
  where 11: lapply(seq_along(new_testset), bmfunc)
  where 12: do.call(rbind, lapply(seq_along(new_testset), bmfunc))
  where 13: run_benchmark(testset, toolset, unit = "ns", use_sys_time = use_sys_time)
  where 14: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 15: withCallingHandlers({
      code
      NULL
  }, error = function(cnd) {
      if (can_entrace(cnd)) {
          cnd <- cnd_entrace(cnd)
      }
      return_from(env, cnd)
  })
  where 16: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 17: quasi_capture(enquo(object), label, capture_error, entrace = TRUE)
  where 18 at testthat/test_main_benchmark.R#145: expect_error(run_benchmark(testset, toolset, unit = "ns", use_sys_time = use_sys_time), 
      NA)
  where 19 at testthat/test_main_benchmark.R#171: tfunc(TRUE)
  where 20: eval(code, test_env)
  where 21: eval(code, test_env)
  where 22: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 23: doTryCatch(return(expr), name, parentenv, handler)
  where 24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 25: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 26: doTryCatch(return(expr), name, parentenv, handler)
  where 27: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 28: tryCatchList(expr, classes, parentenv, handlers)
  where 29: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 30: test_code(desc, code, env = parent.frame())
  where 31 at testthat/test_main_benchmark.R#140: test_that("run_benchmark: unit", {
      tfunc <- function(use_sys_time) {
          testset <- create_testset("bench", "b10")
          toolset <- create_toolset(set_names = "def5")
          expect_error(run_benchmark(testset, toolset, unit = "ns", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "us", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "ms", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "s", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "eps", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "relative", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "ss", 
              use_sys_time = use_sys_time), "is not TRUE")
          expect_error(run_benchmark(testset, toolset, unit = 1, 
              use_sys_time = use_sys_time), "unit is not a string")
      }
      use_sys_time <- .check_microbenchmark()
      tfunc(use_sys_time)
      if (!use_sys_time) {
          tfunc(TRUE)
      }
  })
  where 32: eval(code, test_env)
  where 33: eval(code, test_env)
  where 34: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 35: doTryCatch(return(expr), name, parentenv, handler)
  where 36: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 37: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 38: doTryCatch(return(expr), name, parentenv, handler)
  where 39: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 40: tryCatchList(expr, classes, parentenv, handlers)
  where 41: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 42: test_code(NULL, exprs, env)
  where 43: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 44: force(code)
  where 45: doWithOneRestart(return(expr), restart)
  where 46: withOneRestart(expr, restarts[[1L]])
  where 47: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 48: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 49: FUN(X[[i]], ...)
  where 50: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 51: force(code)
  where 52: doWithOneRestart(return(expr), restart)
  where 53: withOneRestart(expr, restarts[[1L]])
  where 54: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 55: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 56: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 57: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 58: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 59: test_check("prcbench")
  
   --- value of length: 2 type: logical ---
  message    call 
     TRUE    TRUE 
   --- function from context --- 
  function (testset, auc2, calc_auc = FALSE, store_res = TRUE, 
      auctype = "java") 
  {
      dpath <- testset$get_fname()
      res <- rJava::.jcall(auc2, "[D", "calcCurves", dpath)
      aucscore <- NA
      if (calc_auc) {
          if (auctype == "java") {
              aucscore <- res[2]
          }
          else if (auctype == "r") {
              x <- rJava::.jcall(auc2, "[D", "getX")
              y <- rJava::.jcall(auc2, "[D", "getY")
              x <- c(0, rJava::.jcall(auc2, "[D", "getX"))
              y <- c(rval$y[1], rval$y)
              aucscore <- 0
              for (i in 2:length(x)) {
                  aucscore <- aucscore + 0.5 * (x[i] - x[i - 1]) * 
                    (y[i] + y[i - 1])
              }
          }
      }
      if (store_res) {
          x <- rJava::.jcall(auc2, "[D", "getX")
          y <- rJava::.jcall(auc2, "[D", "getY")
          rval <- list(x = x, y = y, auc = aucscore)
      }
      else {
          rval <- NULL
      }
      res <- tryCatch(rJava::.jcall(auc2, "S", "delFiles"), error = function(e) {
          print(e)
      })
      if (res != "deleted") {
          .del_auc_files(dpath)
      }
      rJava::.jcall(auc2, "V", "clear")
      rval
  }
  <bytecode: 0x55c5fbca0218>
  <environment: namespace:prcbench>
   --- function search by body ---
  Function .auccalc_wrapper in namespace prcbench has this body.
   ----------- END OF FAILURE REPORT -------------- 
  ── 3. Failure: run_benchmark: unit (@test_main_benchmark.R#171)  ───────────────
  `run_benchmark(testset, toolset, unit = "ns", use_sys_time = use_sys_time)` threw an error.
  Message: the condition has length > 1
  Class:   simpleError/error/condition
  Backtrace:
    1. prcbench:::tfunc(TRUE)
    7. prcbench::run_benchmark(testset, toolset, unit = "ns", use_sys_time = use_sys_time)
    9. base::lapply(seq_along(new_testset), bmfunc)
   10. prcbench:::FUN(X[[i]], ...)
   11. prcbench:::.time_tool(tset, tool, new_args$times)
   12. base::replicate(times, system.time(tool$call(tset)))
   13. base::sapply(...)
   14. base::lapply(X = X, FUN = FUN, ...)
   15. prcbench:::FUN(X[[i]], ...)
   17. tool$call(tset)
   18. private$f_wrapper(testset, calc_auc, store_res)
   19. prcbench:::.auccalc_wrapper(...)
  
  <simpleError in .jcheck(silent = FALSE): Java Exception <no description because toString() failed>rJava::.jcall(auc2, "S", "delFiles")new("jobjRef", jobj = <pointer: 0x55c5fed17740>, jclass = "java/lang/Throwable")>
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  prcbench
   --- call from context --- 
  .auccalc_wrapper(testset, private$auc2, calc_auc, store_res, 
      private$auctype)
   --- call from argument --- 
  if (res != "deleted") {
      .del_auc_files(dpath)
  }
   --- R stacktrace ---
  where 1: .auccalc_wrapper(testset, private$auc2, calc_auc, store_res, 
      private$auctype)
  where 2: private$f_wrapper(testset, calc_auc, store_res)
  where 3: tool$call(tset)
  where 4: system.time(tool$call(tset))
  where 5: FUN(X[[i]], ...)
  where 6: lapply(X = X, FUN = FUN, ...)
  where 7: sapply(integer(n), eval.parent(substitute(function(...) expr)), 
      simplify = simplify)
  where 8: replicate(times, system.time(tool$call(tset)))
  where 9: .time_tool(tset, tool, new_args$times)
  where 10: FUN(X[[i]], ...)
  where 11: lapply(seq_along(new_testset), bmfunc)
  where 12: do.call(rbind, lapply(seq_along(new_testset), bmfunc))
  where 13: run_benchmark(testset, toolset, unit = "us", use_sys_time = use_sys_time)
  where 14: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 15: withCallingHandlers({
      code
      NULL
  }, error = function(cnd) {
      if (can_entrace(cnd)) {
          cnd <- cnd_entrace(cnd)
      }
      return_from(env, cnd)
  })
  where 16: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 17: quasi_capture(enquo(object), label, capture_error, entrace = TRUE)
  where 18 at testthat/test_main_benchmark.R#147: expect_error(run_benchmark(testset, toolset, unit = "us", use_sys_time = use_sys_time), 
      NA)
  where 19 at testthat/test_main_benchmark.R#171: tfunc(TRUE)
  where 20: eval(code, test_env)
  where 21: eval(code, test_env)
  where 22: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 23: doTryCatch(return(expr), name, parentenv, handler)
  where 24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 25: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 26: doTryCatch(return(expr), name, parentenv, handler)
  where 27: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 28: tryCatchList(expr, classes, parentenv, handlers)
  where 29: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 30: test_code(desc, code, env = parent.frame())
  where 31 at testthat/test_main_benchmark.R#140: test_that("run_benchmark: unit", {
      tfunc <- function(use_sys_time) {
          testset <- create_testset("bench", "b10")
          toolset <- create_toolset(set_names = "def5")
          expect_error(run_benchmark(testset, toolset, unit = "ns", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "us", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "ms", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "s", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "eps", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "relative", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "ss", 
              use_sys_time = use_sys_time), "is not TRUE")
          expect_error(run_benchmark(testset, toolset, unit = 1, 
              use_sys_time = use_sys_time), "unit is not a string")
      }
      use_sys_time <- .check_microbenchmark()
      tfunc(use_sys_time)
      if (!use_sys_time) {
          tfunc(TRUE)
      }
  })
  where 32: eval(code, test_env)
  where 33: eval(code, test_env)
  where 34: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 35: doTryCatch(return(expr), name, parentenv, handler)
  where 36: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 37: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 38: doTryCatch(return(expr), name, parentenv, handler)
  where 39: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 40: tryCatchList(expr, classes, parentenv, handlers)
  where 41: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 42: test_code(NULL, exprs, env)
  where 43: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 44: force(code)
  where 45: doWithOneRestart(return(expr), restart)
  where 46: withOneRestart(expr, restarts[[1L]])
  where 47: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 48: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 49: FUN(X[[i]], ...)
  where 50: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 51: force(code)
  where 52: doWithOneRestart(return(expr), restart)
  where 53: withOneRestart(expr, restarts[[1L]])
  where 54: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 55: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 56: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 57: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 58: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 59: test_check("prcbench")
  
   --- value of length: 2 type: logical ---
  message    call 
     TRUE    TRUE 
   --- function from context --- 
  function (testset, auc2, calc_auc = FALSE, store_res = TRUE, 
      auctype = "java") 
  {
      dpath <- testset$get_fname()
      res <- rJava::.jcall(auc2, "[D", "calcCurves", dpath)
      aucscore <- NA
      if (calc_auc) {
          if (auctype == "java") {
              aucscore <- res[2]
          }
          else if (auctype == "r") {
              x <- rJava::.jcall(auc2, "[D", "getX")
              y <- rJava::.jcall(auc2, "[D", "getY")
              x <- c(0, rJava::.jcall(auc2, "[D", "getX"))
              y <- c(rval$y[1], rval$y)
              aucscore <- 0
              for (i in 2:length(x)) {
                  aucscore <- aucscore + 0.5 * (x[i] - x[i - 1]) * 
                    (y[i] + y[i - 1])
              }
          }
      }
      if (store_res) {
          x <- rJava::.jcall(auc2, "[D", "getX")
          y <- rJava::.jcall(auc2, "[D", "getY")
          rval <- list(x = x, y = y, auc = aucscore)
      }
      else {
          rval <- NULL
      }
      res <- tryCatch(rJava::.jcall(auc2, "S", "delFiles"), error = function(e) {
          print(e)
      })
      if (res != "deleted") {
          .del_auc_files(dpath)
      }
      rJava::.jcall(auc2, "V", "clear")
      rval
  }
  <bytecode: 0x55c5fbca0218>
  <environment: namespace:prcbench>
   --- function search by body ---
  Function .auccalc_wrapper in namespace prcbench has this body.
   ----------- END OF FAILURE REPORT -------------- 
  ── 4. Failure: run_benchmark: unit (@test_main_benchmark.R#171)  ───────────────
  `run_benchmark(testset, toolset, unit = "us", use_sys_time = use_sys_time)` threw an error.
  Message: the condition has length > 1
  Class:   simpleError/error/condition
  Backtrace:
    1. prcbench:::tfunc(TRUE)
    7. prcbench::run_benchmark(testset, toolset, unit = "us", use_sys_time = use_sys_time)
    9. base::lapply(seq_along(new_testset), bmfunc)
   10. prcbench:::FUN(X[[i]], ...)
   11. prcbench:::.time_tool(tset, tool, new_args$times)
   12. base::replicate(times, system.time(tool$call(tset)))
   13. base::sapply(...)
   14. base::lapply(X = X, FUN = FUN, ...)
   15. prcbench:::FUN(X[[i]], ...)
   17. tool$call(tset)
   18. private$f_wrapper(testset, calc_auc, store_res)
   19. prcbench:::.auccalc_wrapper(...)
  
  <simpleError in .jcheck(silent = FALSE): Java Exception <no description because toString() failed>rJava::.jcall(auc2, "S", "delFiles")new("jobjRef", jobj = <pointer: 0x55c5fed17740>, jclass = "java/lang/Throwable")>
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  prcbench
   --- call from context --- 
  .auccalc_wrapper(testset, private$auc2, calc_auc, store_res, 
      private$auctype)
   --- call from argument --- 
  if (res != "deleted") {
      .del_auc_files(dpath)
  }
   --- R stacktrace ---
  where 1: .auccalc_wrapper(testset, private$auc2, calc_auc, store_res, 
      private$auctype)
  where 2: private$f_wrapper(testset, calc_auc, store_res)
  where 3: tool$call(tset)
  where 4: system.time(tool$call(tset))
  where 5: FUN(X[[i]], ...)
  where 6: lapply(X = X, FUN = FUN, ...)
  where 7: sapply(integer(n), eval.parent(substitute(function(...) expr)), 
      simplify = simplify)
  where 8: replicate(times, system.time(tool$call(tset)))
  where 9: .time_tool(tset, tool, new_args$times)
  where 10: FUN(X[[i]], ...)
  where 11: lapply(seq_along(new_testset), bmfunc)
  where 12: do.call(rbind, lapply(seq_along(new_testset), bmfunc))
  where 13: run_benchmark(testset, toolset, unit = "ms", use_sys_time = use_sys_time)
  where 14: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 15: withCallingHandlers({
      code
      NULL
  }, error = function(cnd) {
      if (can_entrace(cnd)) {
          cnd <- cnd_entrace(cnd)
      }
      return_from(env, cnd)
  })
  where 16: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 17: quasi_capture(enquo(object), label, capture_error, entrace = TRUE)
  where 18 at testthat/test_main_benchmark.R#149: expect_error(run_benchmark(testset, toolset, unit = "ms", use_sys_time = use_sys_time), 
      NA)
  where 19 at testthat/test_main_benchmark.R#171: tfunc(TRUE)
  where 20: eval(code, test_env)
  where 21: eval(code, test_env)
  where 22: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 23: doTryCatch(return(expr), name, parentenv, handler)
  where 24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 25: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 26: doTryCatch(return(expr), name, parentenv, handler)
  where 27: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 28: tryCatchList(expr, classes, parentenv, handlers)
  where 29: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 30: test_code(desc, code, env = parent.frame())
  where 31 at testthat/test_main_benchmark.R#140: test_that("run_benchmark: unit", {
      tfunc <- function(use_sys_time) {
          testset <- create_testset("bench", "b10")
          toolset <- create_toolset(set_names = "def5")
          expect_error(run_benchmark(testset, toolset, unit = "ns", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "us", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "ms", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "s", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "eps", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "relative", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "ss", 
              use_sys_time = use_sys_time), "is not TRUE")
          expect_error(run_benchmark(testset, toolset, unit = 1, 
              use_sys_time = use_sys_time), "unit is not a string")
      }
      use_sys_time <- .check_microbenchmark()
      tfunc(use_sys_time)
      if (!use_sys_time) {
          tfunc(TRUE)
      }
  })
  where 32: eval(code, test_env)
  where 33: eval(code, test_env)
  where 34: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 35: doTryCatch(return(expr), name, parentenv, handler)
  where 36: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 37: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 38: doTryCatch(return(expr), name, parentenv, handler)
  where 39: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 40: tryCatchList(expr, classes, parentenv, handlers)
  where 41: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 42: test_code(NULL, exprs, env)
  where 43: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 44: force(code)
  where 45: doWithOneRestart(return(expr), restart)
  where 46: withOneRestart(expr, restarts[[1L]])
  where 47: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 48: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 49: FUN(X[[i]], ...)
  where 50: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 51: force(code)
  where 52: doWithOneRestart(return(expr), restart)
  where 53: withOneRestart(expr, restarts[[1L]])
  where 54: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 55: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 56: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 57: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 58: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 59: test_check("prcbench")
  
   --- value of length: 2 type: logical ---
  message    call 
     TRUE    TRUE 
   --- function from context --- 
  function (testset, auc2, calc_auc = FALSE, store_res = TRUE, 
      auctype = "java") 
  {
      dpath <- testset$get_fname()
      res <- rJava::.jcall(auc2, "[D", "calcCurves", dpath)
      aucscore <- NA
      if (calc_auc) {
          if (auctype == "java") {
              aucscore <- res[2]
          }
          else if (auctype == "r") {
              x <- rJava::.jcall(auc2, "[D", "getX")
              y <- rJava::.jcall(auc2, "[D", "getY")
              x <- c(0, rJava::.jcall(auc2, "[D", "getX"))
              y <- c(rval$y[1], rval$y)
              aucscore <- 0
              for (i in 2:length(x)) {
                  aucscore <- aucscore + 0.5 * (x[i] - x[i - 1]) * 
                    (y[i] + y[i - 1])
              }
          }
      }
      if (store_res) {
          x <- rJava::.jcall(auc2, "[D", "getX")
          y <- rJava::.jcall(auc2, "[D", "getY")
          rval <- list(x = x, y = y, auc = aucscore)
      }
      else {
          rval <- NULL
      }
      res <- tryCatch(rJava::.jcall(auc2, "S", "delFiles"), error = function(e) {
          print(e)
      })
      if (res != "deleted") {
          .del_auc_files(dpath)
      }
      rJava::.jcall(auc2, "V", "clear")
      rval
  }
  <bytecode: 0x55c5fbca0218>
  <environment: namespace:prcbench>
   --- function search by body ---
  Function .auccalc_wrapper in namespace prcbench has this body.
   ----------- END OF FAILURE REPORT -------------- 
  ── 5. Failure: run_benchmark: unit (@test_main_benchmark.R#171)  ───────────────
  `run_benchmark(testset, toolset, unit = "ms", use_sys_time = use_sys_time)` threw an error.
  Message: the condition has length > 1
  Class:   simpleError/error/condition
  Backtrace:
    1. prcbench:::tfunc(TRUE)
    7. prcbench::run_benchmark(testset, toolset, unit = "ms", use_sys_time = use_sys_time)
    9. base::lapply(seq_along(new_testset), bmfunc)
   10. prcbench:::FUN(X[[i]], ...)
   11. prcbench:::.time_tool(tset, tool, new_args$times)
   12. base::replicate(times, system.time(tool$call(tset)))
   13. base::sapply(...)
   14. base::lapply(X = X, FUN = FUN, ...)
   15. prcbench:::FUN(X[[i]], ...)
   17. tool$call(tset)
   18. private$f_wrapper(testset, calc_auc, store_res)
   19. prcbench:::.auccalc_wrapper(...)
  
  <simpleError in .jcheck(silent = FALSE): Java Exception <no description because toString() failed>rJava::.jcall(auc2, "S", "delFiles")new("jobjRef", jobj = <pointer: 0x55c5fed17740>, jclass = "java/lang/Throwable")>
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  prcbench
   --- call from context --- 
  .auccalc_wrapper(testset, private$auc2, calc_auc, store_res, 
      private$auctype)
   --- call from argument --- 
  if (res != "deleted") {
      .del_auc_files(dpath)
  }
   --- R stacktrace ---
  where 1: .auccalc_wrapper(testset, private$auc2, calc_auc, store_res, 
      private$auctype)
  where 2: private$f_wrapper(testset, calc_auc, store_res)
  where 3: tool$call(tset)
  where 4: system.time(tool$call(tset))
  where 5: FUN(X[[i]], ...)
  where 6: lapply(X = X, FUN = FUN, ...)
  where 7: sapply(integer(n), eval.parent(substitute(function(...) expr)), 
      simplify = simplify)
  where 8: replicate(times, system.time(tool$call(tset)))
  where 9: .time_tool(tset, tool, new_args$times)
  where 10: FUN(X[[i]], ...)
  where 11: lapply(seq_along(new_testset), bmfunc)
  where 12: do.call(rbind, lapply(seq_along(new_testset), bmfunc))
  where 13: run_benchmark(testset, toolset, unit = "s", use_sys_time = use_sys_time)
  where 14: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 15: withCallingHandlers({
      code
      NULL
  }, error = function(cnd) {
      if (can_entrace(cnd)) {
          cnd <- cnd_entrace(cnd)
      }
      return_from(env, cnd)
  })
  where 16: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 17: quasi_capture(enquo(object), label, capture_error, entrace = TRUE)
  where 18 at testthat/test_main_benchmark.R#151: expect_error(run_benchmark(testset, toolset, unit = "s", use_sys_time = use_sys_time), 
      NA)
  where 19 at testthat/test_main_benchmark.R#171: tfunc(TRUE)
  where 20: eval(code, test_env)
  where 21: eval(code, test_env)
  where 22: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 23: doTryCatch(return(expr), name, parentenv, handler)
  where 24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 25: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 26: doTryCatch(return(expr), name, parentenv, handler)
  where 27: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 28: tryCatchList(expr, classes, parentenv, handlers)
  where 29: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 30: test_code(desc, code, env = parent.frame())
  where 31 at testthat/test_main_benchmark.R#140: test_that("run_benchmark: unit", {
      tfunc <- function(use_sys_time) {
          testset <- create_testset("bench", "b10")
          toolset <- create_toolset(set_names = "def5")
          expect_error(run_benchmark(testset, toolset, unit = "ns", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "us", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "ms", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "s", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "eps", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "relative", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "ss", 
              use_sys_time = use_sys_time), "is not TRUE")
          expect_error(run_benchmark(testset, toolset, unit = 1, 
              use_sys_time = use_sys_time), "unit is not a string")
      }
      use_sys_time <- .check_microbenchmark()
      tfunc(use_sys_time)
      if (!use_sys_time) {
          tfunc(TRUE)
      }
  })
  where 32: eval(code, test_env)
  where 33: eval(code, test_env)
  where 34: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 35: doTryCatch(return(expr), name, parentenv, handler)
  where 36: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 37: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 38: doTryCatch(return(expr), name, parentenv, handler)
  where 39: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 40: tryCatchList(expr, classes, parentenv, handlers)
  where 41: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 42: test_code(NULL, exprs, env)
  where 43: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 44: force(code)
  where 45: doWithOneRestart(return(expr), restart)
  where 46: withOneRestart(expr, restarts[[1L]])
  where 47: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 48: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 49: FUN(X[[i]], ...)
  where 50: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 51: force(code)
  where 52: doWithOneRestart(return(expr), restart)
  where 53: withOneRestart(expr, restarts[[1L]])
  where 54: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 55: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 56: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 57: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 58: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 59: test_check("prcbench")
  
   --- value of length: 2 type: logical ---
  message    call 
     TRUE    TRUE 
   --- function from context --- 
  function (testset, auc2, calc_auc = FALSE, store_res = TRUE, 
      auctype = "java") 
  {
      dpath <- testset$get_fname()
      res <- rJava::.jcall(auc2, "[D", "calcCurves", dpath)
      aucscore <- NA
      if (calc_auc) {
          if (auctype == "java") {
              aucscore <- res[2]
          }
          else if (auctype == "r") {
              x <- rJava::.jcall(auc2, "[D", "getX")
              y <- rJava::.jcall(auc2, "[D", "getY")
              x <- c(0, rJava::.jcall(auc2, "[D", "getX"))
              y <- c(rval$y[1], rval$y)
              aucscore <- 0
              for (i in 2:length(x)) {
                  aucscore <- aucscore + 0.5 * (x[i] - x[i - 1]) * 
                    (y[i] + y[i - 1])
              }
          }
      }
      if (store_res) {
          x <- rJava::.jcall(auc2, "[D", "getX")
          y <- rJava::.jcall(auc2, "[D", "getY")
          rval <- list(x = x, y = y, auc = aucscore)
      }
      else {
          rval <- NULL
      }
      res <- tryCatch(rJava::.jcall(auc2, "S", "delFiles"), error = function(e) {
          print(e)
      })
      if (res != "deleted") {
          .del_auc_files(dpath)
      }
      rJava::.jcall(auc2, "V", "clear")
      rval
  }
  <bytecode: 0x55c5fbca0218>
  <environment: namespace:prcbench>
   --- function search by body ---
  Function .auccalc_wrapper in namespace prcbench has this body.
   ----------- END OF FAILURE REPORT -------------- 
  ── 6. Failure: run_benchmark: unit (@test_main_benchmark.R#171)  ───────────────
  `run_benchmark(testset, toolset, unit = "s", use_sys_time = use_sys_time)` threw an error.
  Message: the condition has length > 1
  Class:   simpleError/error/condition
  Backtrace:
    1. prcbench:::tfunc(TRUE)
    7. prcbench::run_benchmark(testset, toolset, unit = "s", use_sys_time = use_sys_time)
    9. base::lapply(seq_along(new_testset), bmfunc)
   10. prcbench:::FUN(X[[i]], ...)
   11. prcbench:::.time_tool(tset, tool, new_args$times)
   12. base::replicate(times, system.time(tool$call(tset)))
   13. base::sapply(...)
   14. base::lapply(X = X, FUN = FUN, ...)
   15. prcbench:::FUN(X[[i]], ...)
   17. tool$call(tset)
   18. private$f_wrapper(testset, calc_auc, store_res)
   19. prcbench:::.auccalc_wrapper(...)
  
  <simpleError in .jcheck(silent = FALSE): Java Exception <no description because toString() failed>rJava::.jcall(auc2, "S", "delFiles")new("jobjRef", jobj = <pointer: 0x55c5fed17740>, jclass = "java/lang/Throwable")>
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  prcbench
   --- call from context --- 
  .auccalc_wrapper(testset, private$auc2, calc_auc, store_res, 
      private$auctype)
   --- call from argument --- 
  if (res != "deleted") {
      .del_auc_files(dpath)
  }
   --- R stacktrace ---
  where 1: .auccalc_wrapper(testset, private$auc2, calc_auc, store_res, 
      private$auctype)
  where 2: private$f_wrapper(testset, calc_auc, store_res)
  where 3: tool$call(tset)
  where 4: system.time(tool$call(tset))
  where 5: FUN(X[[i]], ...)
  where 6: lapply(X = X, FUN = FUN, ...)
  where 7: sapply(integer(n), eval.parent(substitute(function(...) expr)), 
      simplify = simplify)
  where 8: replicate(times, system.time(tool$call(tset)))
  where 9: .time_tool(tset, tool, new_args$times)
  where 10: FUN(X[[i]], ...)
  where 11: lapply(seq_along(new_testset), bmfunc)
  where 12: do.call(rbind, lapply(seq_along(new_testset), bmfunc))
  where 13: run_benchmark(testset, toolset, unit = "eps", use_sys_time = use_sys_time)
  where 14: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 15: withCallingHandlers({
      code
      NULL
  }, error = function(cnd) {
      if (can_entrace(cnd)) {
          cnd <- cnd_entrace(cnd)
      }
      return_from(env, cnd)
  })
  where 16: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 17: quasi_capture(enquo(object), label, capture_error, entrace = TRUE)
  where 18 at testthat/test_main_benchmark.R#154: expect_error(run_benchmark(testset, toolset, unit = "eps", use_sys_time = use_sys_time), 
      NA)
  where 19 at testthat/test_main_benchmark.R#171: tfunc(TRUE)
  where 20: eval(code, test_env)
  where 21: eval(code, test_env)
  where 22: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 23: doTryCatch(return(expr), name, parentenv, handler)
  where 24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 25: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 26: doTryCatch(return(expr), name, parentenv, handler)
  where 27: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 28: tryCatchList(expr, classes, parentenv, handlers)
  where 29: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 30: test_code(desc, code, env = parent.frame())
  where 31 at testthat/test_main_benchmark.R#140: test_that("run_benchmark: unit", {
      tfunc <- function(use_sys_time) {
          testset <- create_testset("bench", "b10")
          toolset <- create_toolset(set_names = "def5")
          expect_error(run_benchmark(testset, toolset, unit = "ns", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "us", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "ms", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "s", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "eps", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "relative", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "ss", 
              use_sys_time = use_sys_time), "is not TRUE")
          expect_error(run_benchmark(testset, toolset, unit = 1, 
              use_sys_time = use_sys_time), "unit is not a string")
      }
      use_sys_time <- .check_microbenchmark()
      tfunc(use_sys_time)
      if (!use_sys_time) {
          tfunc(TRUE)
      }
  })
  where 32: eval(code, test_env)
  where 33: eval(code, test_env)
  where 34: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 35: doTryCatch(return(expr), name, parentenv, handler)
  where 36: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 37: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 38: doTryCatch(return(expr), name, parentenv, handler)
  where 39: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 40: tryCatchList(expr, classes, parentenv, handlers)
  where 41: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 42: test_code(NULL, exprs, env)
  where 43: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 44: force(code)
  where 45: doWithOneRestart(return(expr), restart)
  where 46: withOneRestart(expr, restarts[[1L]])
  where 47: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 48: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 49: FUN(X[[i]], ...)
  where 50: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 51: force(code)
  where 52: doWithOneRestart(return(expr), restart)
  where 53: withOneRestart(expr, restarts[[1L]])
  where 54: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 55: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 56: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 57: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 58: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 59: test_check("prcbench")
  
   --- value of length: 2 type: logical ---
  message    call 
     TRUE    TRUE 
   --- function from context --- 
  function (testset, auc2, calc_auc = FALSE, store_res = TRUE, 
      auctype = "java") 
  {
      dpath <- testset$get_fname()
      res <- rJava::.jcall(auc2, "[D", "calcCurves", dpath)
      aucscore <- NA
      if (calc_auc) {
          if (auctype == "java") {
              aucscore <- res[2]
          }
          else if (auctype == "r") {
              x <- rJava::.jcall(auc2, "[D", "getX")
              y <- rJava::.jcall(auc2, "[D", "getY")
              x <- c(0, rJava::.jcall(auc2, "[D", "getX"))
              y <- c(rval$y[1], rval$y)
              aucscore <- 0
              for (i in 2:length(x)) {
                  aucscore <- aucscore + 0.5 * (x[i] - x[i - 1]) * 
                    (y[i] + y[i - 1])
              }
          }
      }
      if (store_res) {
          x <- rJava::.jcall(auc2, "[D", "getX")
          y <- rJava::.jcall(auc2, "[D", "getY")
          rval <- list(x = x, y = y, auc = aucscore)
      }
      else {
          rval <- NULL
      }
      res <- tryCatch(rJava::.jcall(auc2, "S", "delFiles"), error = function(e) {
          print(e)
      })
      if (res != "deleted") {
          .del_auc_files(dpath)
      }
      rJava::.jcall(auc2, "V", "clear")
      rval
  }
  <bytecode: 0x55c5fbca0218>
  <environment: namespace:prcbench>
   --- function search by body ---
  Function .auccalc_wrapper in namespace prcbench has this body.
   ----------- END OF FAILURE REPORT -------------- 
  ── 7. Failure: run_benchmark: unit (@test_main_benchmark.R#171)  ───────────────
  `run_benchmark(testset, toolset, unit = "eps", use_sys_time = use_sys_time)` threw an error.
  Message: the condition has length > 1
  Class:   simpleError/error/condition
  Backtrace:
    1. prcbench:::tfunc(TRUE)
    7. prcbench::run_benchmark(testset, toolset, unit = "eps", use_sys_time = use_sys_time)
    9. base::lapply(seq_along(new_testset), bmfunc)
   10. prcbench:::FUN(X[[i]], ...)
   11. prcbench:::.time_tool(tset, tool, new_args$times)
   12. base::replicate(times, system.time(tool$call(tset)))
   13. base::sapply(...)
   14. base::lapply(X = X, FUN = FUN, ...)
   15. prcbench:::FUN(X[[i]], ...)
   17. tool$call(tset)
   18. private$f_wrapper(testset, calc_auc, store_res)
   19. prcbench:::.auccalc_wrapper(...)
  
  <simpleError in .jcheck(silent = FALSE): Java Exception <no description because toString() failed>rJava::.jcall(auc2, "S", "delFiles")new("jobjRef", jobj = <pointer: 0x55c5fed17740>, jclass = "java/lang/Throwable")>
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  prcbench
   --- call from context --- 
  .auccalc_wrapper(testset, private$auc2, calc_auc, store_res, 
      private$auctype)
   --- call from argument --- 
  if (res != "deleted") {
      .del_auc_files(dpath)
  }
   --- R stacktrace ---
  where 1: .auccalc_wrapper(testset, private$auc2, calc_auc, store_res, 
      private$auctype)
  where 2: private$f_wrapper(testset, calc_auc, store_res)
  where 3: tool$call(tset)
  where 4: system.time(tool$call(tset))
  where 5: FUN(X[[i]], ...)
  where 6: lapply(X = X, FUN = FUN, ...)
  where 7: sapply(integer(n), eval.parent(substitute(function(...) expr)), 
      simplify = simplify)
  where 8: replicate(times, system.time(tool$call(tset)))
  where 9: .time_tool(tset, tool, new_args$times)
  where 10: FUN(X[[i]], ...)
  where 11: lapply(seq_along(new_testset), bmfunc)
  where 12: do.call(rbind, lapply(seq_along(new_testset), bmfunc))
  where 13: run_benchmark(testset, toolset, unit = "relative", use_sys_time = use_sys_time)
  where 14: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  where 15: withCallingHandlers({
      code
      NULL
  }, error = function(cnd) {
      if (can_entrace(cnd)) {
          cnd <- cnd_entrace(cnd)
      }
      return_from(env, cnd)
  })
  where 16: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), 
      ...)
  where 17: quasi_capture(enquo(object), label, capture_error, entrace = TRUE)
  where 18 at testthat/test_main_benchmark.R#156: expect_error(run_benchmark(testset, toolset, unit = "relative", 
      use_sys_time = use_sys_time), NA)
  where 19 at testthat/test_main_benchmark.R#171: tfunc(TRUE)
  where 20: eval(code, test_env)
  where 21: eval(code, test_env)
  where 22: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 23: doTryCatch(return(expr), name, parentenv, handler)
  where 24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 25: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 26: doTryCatch(return(expr), name, parentenv, handler)
  where 27: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 28: tryCatchList(expr, classes, parentenv, handlers)
  where 29: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 30: test_code(desc, code, env = parent.frame())
  where 31 at testthat/test_main_benchmark.R#140: test_that("run_benchmark: unit", {
      tfunc <- function(use_sys_time) {
          testset <- create_testset("bench", "b10")
          toolset <- create_toolset(set_names = "def5")
          expect_error(run_benchmark(testset, toolset, unit = "ns", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "us", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "ms", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "s", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "eps", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "relative", 
              use_sys_time = use_sys_time), NA)
          expect_error(run_benchmark(testset, toolset, unit = "ss", 
              use_sys_time = use_sys_time), "is not TRUE")
          expect_error(run_benchmark(testset, toolset, unit = 1, 
              use_sys_time = use_sys_time), "unit is not a string")
      }
      use_sys_time <- .check_microbenchmark()
      tfunc(use_sys_time)
      if (!use_sys_time) {
          tfunc(TRUE)
      }
  })
  where 32: eval(code, test_env)
  where 33: eval(code, test_env)
  where 34: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 35: doTryCatch(return(expr), name, parentenv, handler)
  where 36: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 37: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 38: doTryCatch(return(expr), name, parentenv, handler)
  where 39: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 40: tryCatchList(expr, classes, parentenv, handlers)
  where 41: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 42: test_code(NULL, exprs, env)
  where 43: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 44: force(code)
  where 45: doWithOneRestart(return(expr), restart)
  where 46: withOneRestart(expr, restarts[[1L]])
  where 47: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 48: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 49: FUN(X[[i]], ...)
  where 50: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 51: force(code)
  where 52: doWithOneRestart(return(expr), restart)
  where 53: withOneRestart(expr, restarts[[1L]])
  where 54: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 55: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 56: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 57: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 58: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 59: test_check("prcbench")
  
   --- value of length: 2 type: logical ---
  message    call 
     TRUE    TRUE 
   --- function from context --- 
  function (testset, auc2, calc_auc = FALSE, store_res = TRUE, 
      auctype = "java") 
  {
      dpath <- testset$get_fname()
      res <- rJava::.jcall(auc2, "[D", "calcCurves", dpath)
      aucscore <- NA
      if (calc_auc) {
          if (auctype == "java") {
              aucscore <- res[2]
          }
          else if (auctype == "r") {
              x <- rJava::.jcall(auc2, "[D", "getX")
              y <- rJava::.jcall(auc2, "[D", "getY")
              x <- c(0, rJava::.jcall(auc2, "[D", "getX"))
              y <- c(rval$y[1], rval$y)
              aucscore <- 0
              for (i in 2:length(x)) {
                  aucscore <- aucscore + 0.5 * (x[i] - x[i - 1]) * 
                    (y[i] + y[i - 1])
              }
          }
      }
      if (store_res) {
          x <- rJava::.jcall(auc2, "[D", "getX")
          y <- rJava::.jcall(auc2, "[D", "getY")
          rval <- list(x = x, y = y, auc = aucscore)
      }
      else {
          rval <- NULL
      }
      res <- tryCatch(rJava::.jcall(auc2, "S", "delFiles"), error = function(e) {
          print(e)
      })
      if (res != "deleted") {
          .del_auc_files(dpath)
      }
      rJava::.jcall(auc2, "V", "clear")
      rval
  }
  <bytecode: 0x55c5fbca0218>
  <environment: namespace:prcbench>
   --- function search by body ---
  Function .auccalc_wrapper in namespace prcbench has this body.
   ----------- END OF FAILURE REPORT -------------- 
  ── 8. Failure: run_benchmark: unit (@test_main_benchmark.R#171)  ───────────────
  `run_benchmark(testset, toolset, unit = "relative", use_sys_time = use_sys_time)` threw an error.
  Message: the condition has length > 1
  Class:   simpleError/error/condition
  Backtrace:
    1. prcbench:::tfunc(TRUE)
    7. prcbench::run_benchmark(...)
    9. base::lapply(seq_along(new_testset), bmfunc)
   10. prcbench:::FUN(X[[i]], ...)
   11. prcbench:::.time_tool(tset, tool, new_args$times)
   12. base::replicate(times, system.time(tool$call(tset)))
   13. base::sapply(...)
   14. base::lapply(X = X, FUN = FUN, ...)
   15. prcbench:::FUN(X[[i]], ...)
   17. tool$call(tset)
   18. private$f_wrapper(testset, calc_auc, store_res)
   19. prcbench:::.auccalc_wrapper(...)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 747 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 8 ]
  1. Failure: run_benchmark: testset (@test_main_benchmark.R#61) 
  2. Failure: run_benchmark: toolset (@test_main_benchmark.R#87) 
  3. Failure: run_benchmark: unit (@test_main_benchmark.R#171) 
  4. Failure: run_benchmark: unit (@test_main_benchmark.R#171) 
  5. Failure: run_benchmark: unit (@test_main_benchmark.R#171) 
  6. Failure: run_benchmark: unit (@test_main_benchmark.R#171) 
  7. Failure: run_benchmark: unit (@test_main_benchmark.R#171) 
  8. Failure: run_benchmark: unit (@test_main_benchmark.R#171) 
  
  Error: testthat unit tests failed
  Execution halted