omit last unused span
parent
fee1bad5e8
commit
081953776b
|
|
@ -73,7 +73,11 @@ func poll(ctx context.Context, client *valkey.Client) Poll {
|
||||||
waitSuccess(ctx, client, func(s string) {
|
waitSuccess(ctx, client, func(s string) {
|
||||||
writes = append(writes, s)
|
writes = append(writes, s)
|
||||||
})
|
})
|
||||||
spans = append(spans, [2]time.Time{time.Now(), time.Now()})
|
now := time.Now()
|
||||||
|
spans = append(spans, [2]time.Time{now, now})
|
||||||
|
}
|
||||||
|
if last := spans[len(spans)-1]; last[1] == last[0] {
|
||||||
|
spans = spans[:len(spans)-1]
|
||||||
}
|
}
|
||||||
return Poll{Spans: spans, Writes: writes}
|
return Poll{Spans: spans, Writes: writes}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue