Skip to content

Commit 8aed7e5

Browse files
committed
Include Perf Stats in TrialEstimate
So linux_perf_stats is saved by Nanosoldier
1 parent 2eec089 commit 8aed7e5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/trials.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,22 +130,24 @@ mutable struct TrialEstimate
130130
gctime::Float64
131131
memory::Int
132132
allocs::Int
133+
linux_perf_stats::Union{LinuxPerf.Stats,Nothing}
133134
end
134135

135136
function TrialEstimate(trial::Trial, t, gct)
136-
return TrialEstimate(params(trial), t, gct, memory(trial), allocs(trial))
137+
return TrialEstimate(params(trial), t, gct, memory(trial), allocs(trial), trial.linux_perf_stats)
137138
end
138139

140+
# Should we compare linux_perf_stats here?
139141
function Base.:(==)(a::TrialEstimate, b::TrialEstimate)
140142
return a.params == b.params &&
141143
a.time == b.time &&
142144
a.gctime == b.gctime &&
143145
a.memory == b.memory &&
144-
a.allocs == b.allocs
146+
a.allocs == b.allocs
145147
end
146148

147149
function Base.copy(t::TrialEstimate)
148-
return TrialEstimate(copy(t.params), t.time, t.gctime, t.memory, t.allocs)
150+
return TrialEstimate(copy(t.params), t.time, t.gctime, t.memory, t.allocs, t.linux_perf_stats) # TODO: copy linux_perf_stats
149151
end
150152

151153
function Base.minimum(trial::Trial)

0 commit comments

Comments
 (0)