File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ module ExecutionTests
3
3
using BenchmarkTools
4
4
using Profile
5
5
using Test
6
+ using LinuxPerf
6
7
7
8
seteq (a, b) = length (a) == length (b) == length (intersect (a, b))
8
9
@@ -383,4 +384,24 @@ b = x = nothing
383
384
GC. gc ()
384
385
@test x_finalized
385
386
387
+ # #################################
388
+ # Linux Perf Integration #
389
+ # #################################
390
+
391
+ b = @benchmarkable sin (42. )
392
+ results = run (b, seconds= 1 , enable_linux_perf= true )
393
+ @test results. linux_perf_stats != = nothing
394
+ @test any (reults. linux_perf_stats. threads) do thread
395
+ clock = LinuxPerf. scaledcount (thread[" task-clock" ])
396
+ ! isnan (clock) && clock > 0
397
+ end
398
+
399
+ b = @benchmarkable sin (42. )
400
+ results = run (b, seconds= 1 , enable_linux_perf= false )
401
+ @test results. linux_perf_stats === nothing
402
+
403
+ b = @benchmarkable sin (42. )
404
+ results = run (b, seconds= 1 )
405
+ @test results. linux_perf_stats === nothing
406
+
386
407
end # module
You can’t perform that action at this time.
0 commit comments