Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
Zentrik committed Dec 29, 2023
1 parent e6271b1 commit 07883ad
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
21 changes: 18 additions & 3 deletions src/parameters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,19 @@ mutable struct Parameters
end

# TODO: determine whether perf is available
const DEFAULT_PARAMETERS = Parameters(5.0, 10000, 1, false, 0, true, false, 0.05, 0.01, Sys.islinux(), LinuxPerf.parse_pstats_options([]))
const DEFAULT_PARAMETERS = Parameters(
5.0,
10000,
1,
false,
0,
true,
false,
0.05,
0.01,
Sys.islinux(),
LinuxPerf.parse_pstats_options([]),
)

function Parameters(;
seconds=DEFAULT_PARAMETERS.seconds,
Expand Down Expand Up @@ -74,8 +86,11 @@ function Parameters(
time_tolerance != nothing ? time_tolerance : default.time_tolerance
params.memory_tolerance =
memory_tolerance != nothing ? memory_tolerance : default.memory_tolerance
params.experimental_enable_linux_perf =
experimental_enable_linux_perf != nothing ? experimental_enable_linux_perf : default.experimental_enable_linux_perf
params.experimental_enable_linux_perf = if experimental_enable_linux_perf != nothing
experimental_enable_linux_perf
else
default.experimental_enable_linux_perf
end
params.linux_perf_options =
linux_perf_options != nothing ? linux_perf_options : default.linux_perf_options
return params::BenchmarkTools.Parameters
Expand Down
2 changes: 1 addition & 1 deletion src/trials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mutable struct Trial
linux_perf_stats::Union{LinuxPerf.Stats,Nothing}
end

struct TrialContents{A, B}
struct TrialContents{A,B}
time::Float64
gctime::Float64
memory::Int
Expand Down

0 comments on commit 07883ad

Please sign in to comment.