mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #7175 from gyuho/report
pkg/report: add nil checking for getTimeSeries
This commit is contained in:
commit
307e14028c
@ -112,6 +112,10 @@ func (r *report) Stats() <-chan Stats {
|
||||
go func() {
|
||||
defer close(donec)
|
||||
r.processResults()
|
||||
var ts TimeSeries
|
||||
if r.sps != nil {
|
||||
ts = r.sps.getTimeSeries()
|
||||
}
|
||||
donec <- Stats{
|
||||
AvgTotal: r.avgTotal,
|
||||
Fastest: r.fastest,
|
||||
@ -122,7 +126,7 @@ func (r *report) Stats() <-chan Stats {
|
||||
Total: r.total,
|
||||
ErrorDist: copyMap(r.errorDist),
|
||||
Lats: copyFloats(r.lats),
|
||||
TimeSeries: r.sps.getTimeSeries(),
|
||||
TimeSeries: ts,
|
||||
}
|
||||
}()
|
||||
return donec
|
||||
|
Loading…
x
Reference in New Issue
Block a user