We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
@btimed
1 parent cb0094d commit d3b222cCopy full SHA for d3b222c
test/ExecutionTests.jl
@@ -349,6 +349,18 @@ str = String(take!(io))
349
@test @ballocations(sin(0)) == 0
350
@test @ballocations(Ref(1)) == 1
351
352
+@test let stats = @btimed sin($(foo.x)) evals = 3 samples = 10 setup = (foo.x = 0)
353
+ stats.value == sin(0) &&
354
+ stats.time > 0 &&
355
+ stats.bytes == 0 &&
356
+ stats.alloc == 0 &&
357
+ stats.gctime == 0
358
+end
359
+
360
+@test let stats = @btimed Ref(1)
361
+ stats.bytes > 0 && stats.alloc == 1 && stats.gctime == 0
362
363
364
let fname = tempname()
365
try
366
ret = open(fname, "w") do f
0 commit comments