Skip to content

Commit 6503496

Browse files
committed
Don't copy LinuxPerf Stats
It's not clear to me how deep the copying should be, but I think this should be fine for now and it matches the semantics of `copy` better.
1 parent bbfb733 commit 6503496

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/parameters.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ function Base.copy(p::Parameters)
110110
p.time_tolerance,
111111
p.memory_tolerance,
112112
p.enable_linux_perf,
113-
copy(p.linux_perf_options),
113+
p.linux_perf_options,
114114
)
115115
end
116116

src/trials.jl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function Base.copy(t::Trial)
3030
copy(t.gctimes),
3131
t.memory,
3232
t.allocs,
33-
isnothing(t.linux_perf_stats) ? nothing : copy(t.linux_perf_stats),
33+
t.linux_perf_stats,
3434
)
3535
end
3636

@@ -132,12 +132,7 @@ end
132132

133133
function Base.copy(t::TrialEstimate)
134134
return TrialEstimate(
135-
copy(t.params),
136-
t.time,
137-
t.gctime,
138-
t.memory,
139-
t.allocs,
140-
isnothing(t.linux_perf_stats) ? nothing : copy(t.linux_perf_stats),
135+
copy(t.params), t.time, t.gctime, t.memory, t.allocs, t.linux_perf_stats
141136
)
142137
end
143138

0 commit comments

Comments
 (0)