Skip to content

Commit

Permalink
Update latency.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Clivern committed Jun 1, 2019
1 parent a3742e4 commit 1cc5246
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion latency.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ func NewLatencyTracker() *Latency {

// NewAction creates a new action tracking bucket
func (l *Latency) NewAction(name string) {
l.Actions = make(map[string][]Point)
if len(l.Actions) <= 0 {
l.Actions = make(map[string][]Point)
}

l.Actions[name] = []Point{}
}

Expand Down

0 comments on commit 1cc5246

Please sign in to comment.