Skip to content

Commit

Permalink
Add loose compilation time test (JuliaLang#47716)
Browse files Browse the repository at this point in the history
  • Loading branch information
pchintalapudi authored Nov 27, 2022
1 parent 88a0627 commit 60668c5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/misc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,10 @@ end
after_comp, after_recomp = Base.cumulative_compile_time_ns() # no need to turn timing off, @time will do that
@test after_comp >= before_comp;

# should be approximately 60,000,000 ns, we definitely shouldn't exceed 100x that value
# failing this probably means an uninitialized variable somewhere
@test after_comp - before_comp < 6_000_000_000;

end # redirect_stdout

macro capture_stdout(ex)
Expand Down

0 comments on commit 60668c5

Please sign in to comment.