Skip to content

Commit

Permalink
Increase the elapsed time upper boundary for the optimized version of…
Browse files Browse the repository at this point in the history
… recode
  • Loading branch information
Peter Gagarinov committed Apr 19, 2021
1 parent 04ef060 commit 41ef220
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/16_recode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ end
const = isequal

function test_recode_performance(orig_vec, cat2merge_vec)
# the optimized version should take 20-70 milliseconds while unoptimized version takes > 1 sec
# thus setting MAX_RECODE_TIME_IN_SEC to 0.2 seconds seems robust enough
MAX_RECODE_TIME_IN_SEC = 0.2
# the optimized version should take from 20 milliseconds (physical CPU) up to 340 milliseconds
# (GitHub actions) while unoptimized version takes > 1 sec
# thus setting MAX_RECODE_TIME_IN_SEC to 0.55 seconds seems robust enough
MAX_RECODE_TIME_IN_SEC = 0.55
recode(orig_vec, cat2merge_vec => "None");
time_elapsed = @elapsed recode(orig_vec, cat2merge_vec => "None");
@test time_elapsed <= MAX_RECODE_TIME_IN_SEC;
Expand Down

0 comments on commit 41ef220

Please sign in to comment.