From 4a30cca1843403912f33c3f316351fffabb8ef58 Mon Sep 17 00:00:00 2001 From: greyireland Date: Tue, 7 Feb 2023 15:38:08 +0800 Subject: [PATCH] rename compatible --- histogram.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/histogram.go b/histogram.go index e86c0c8..bd023d8 100644 --- a/histogram.go +++ b/histogram.go @@ -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) {