From d7db0bfb7bd1f29963c661516f9d8e7a7582ff74 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Mon, 22 Jan 2018 19:19:41 -0500 Subject: [PATCH] add simple sanity checks --- test/ExecutionTests.jl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/ExecutionTests.jl b/test/ExecutionTests.jl index 9f7f7924..7d70b51f 100644 --- a/test/ExecutionTests.jl +++ b/test/ExecutionTests.jl @@ -184,4 +184,16 @@ let fname = tempname() end end +############ +# cpu-time # +############ + +# some simple sanity checks +t = @benchmark sleep(1) +@test cputime(t) < 1e9 +t = @benchmark sin(1) +if BenchmarkTools.Timers.ACCURATE_CPUTIME + @test cputime(t) > 5e8 # 50% cputime +end + end # module