Skip to content

Commit d7db0bf

Browse files
committed
add simple sanity checks
1 parent b6ae23c commit d7db0bf

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/ExecutionTests.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,16 @@ let fname = tempname()
184184
end
185185
end
186186

187+
############
188+
# cpu-time #
189+
############
190+
191+
# some simple sanity checks
192+
t = @benchmark sleep(1)
193+
@test cputime(t) < 1e9
194+
t = @benchmark sin(1)
195+
if BenchmarkTools.Timers.ACCURATE_CPUTIME
196+
@test cputime(t) > 5e8 # 50% cputime
197+
end
198+
187199
end # module

0 commit comments

Comments
 (0)