You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func (m*Measurement) getHist(opstring, errerror, currentbool) *Histogram {
opMeasurement:=m.OpSumMeasurementifcurrent {
opMeasurement=m.OpCurMeasurement
}
// Create hist of {op} and {op}_ERR at the same time, or else the TPM would be incorrectopPairedKey:=fmt.Sprintf("%s_ERR", op)
iferr!=nil {
op, opPairedKey=opPairedKey, op
}
m.RLock()
opM, ok:=opMeasurement[op]
m.RUnlock()
if!ok {
opM=NewHistogram(m.MinLatency, m.MaxLatency, m.SigFigs)
opPairedM:=NewHistogram(m.MinLatency, m.MaxLatency, m.SigFigs)
m.Lock()
opMeasurement[op] =opMopMeasurement[opPairedKey] =opPairedMm.Unlock()
}
returnopM
}
there will exist data loss under multi threads in pkg/measurement/measure.go: if !ok {...}
The text was updated successfully, but these errors were encountered:
there will exist data loss under multi threads in
pkg/measurement/measure.go
:if !ok {...}
The text was updated successfully, but these errors were encountered: