rename compatible

This commit is contained in:
greyireland 2023-02-07 15:38:08 +08:00
parent 8969e845c9
commit 4a30cca184

View File

@ -152,11 +152,11 @@ func (h *Histogram) VisitNonZeroBuckets(f func(vmrange string, count uint64)) {
//
// The returned histogram is safe to use from concurrent goroutines.
func NewHistogram(name string) *Histogram {
return defaultSet.NewHistogram(name, true)
}
func NewHistogramByVM(name string) *Histogram {
return defaultSet.NewHistogram(name, false)
}
func NewCompatibleHistogram(name string) *Histogram {
return defaultSet.NewHistogram(name, true)
}
// GetOrCreateHistogram returns registered histogram with the given name
// or creates new histogram if the registry doesn't contain histogram with
@ -173,11 +173,11 @@ func NewHistogramByVM(name string) *Histogram {
//
// Performance tip: prefer NewHistogram instead of GetOrCreateHistogram.
func GetOrCreateHistogram(name string) *Histogram {
return defaultSet.GetOrCreateHistogram(name, true)
}
func GetOrCreateHistogramByVM(name string) *Histogram {
return defaultSet.GetOrCreateHistogram(name, false)
}
func GetOrCreateCompatibleHistogram(name string) *Histogram {
return defaultSet.GetOrCreateHistogram(name, true)
}
// UpdateDuration updates request duration based on the given startTime.
func (h *Histogram) UpdateDuration(startTime time.Time) {