File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -19,16 +19,18 @@ mutable struct Parameters
19
19
linux_perf_options: :@NamedTuple {events:: Expr , spaces:: Expr , threads:: Bool }
20
20
end
21
21
22
+ const DEFAULT_LINUX_PERF_OPTIONS = LinuxPerf. parse_pstats_options ([])
23
+
22
24
function perf_available ()
23
25
if ! Sys. islinux ()
24
26
return false
25
27
end
26
28
27
29
bench = nothing
28
30
try
29
- opts = LinuxPerf . parse_pstats_options ([])
30
- groups = BenchmarkTools . LinuxPerf. set_default_spaces (opts. events, opts. spaces)
31
- bench = make_bench_threaded (groups; threads= opts. threads)
31
+ opts = DEFAULT_LINUX_PERF_OPTIONS
32
+ groups = LinuxPerf. set_default_spaces (eval ( opts. events), eval ( opts. spaces) )
33
+ bench = LinuxPerf . make_bench_threaded (groups, threads = eval ( opts. threads) )
32
34
return true
33
35
catch
34
36
return false
@@ -50,7 +52,7 @@ const DEFAULT_PARAMETERS = Parameters(
50
52
0.05 ,
51
53
0.01 ,
52
54
perf_available (),
53
- LinuxPerf . parse_pstats_options ([]) ,
55
+ DEFAULT_LINUX_PERF_OPTIONS ,
54
56
)
55
57
56
58
function Parameters (;
You can’t perform that action at this time.
0 commit comments