-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moved metrics sub packages types to metrics (#8119)
This is a non functional change which consolidates the various packages under metrics into the top level package now that the dead code is removed. It is a precursor to the removal of Victoria metrics after which all erigon metrics code will be contained in this single package.
- Loading branch information
Showing
22 changed files
with
43 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,35 @@ | ||
package methelp | ||
package metrics | ||
|
||
import ( | ||
metrics2 "github.com/VictoriaMetrics/metrics" | ||
metrics "github.com/ledgerwatch/erigon/metrics" | ||
) | ||
|
||
func GetOrCreateCounter(s string, isGauge ...bool) *metrics2.Counter { | ||
counter := metrics2.GetOrCreateCounter(s, isGauge...) | ||
metrics.DefaultRegistry.Register(s, counter) | ||
DefaultRegistry.Register(s, counter) | ||
return counter | ||
} | ||
|
||
func GetOrCreateGauge(s string, f func() float64) *metrics2.Gauge { | ||
gauge := metrics2.GetOrCreateGauge(s, f) | ||
metrics.DefaultRegistry.Register(s, gauge) | ||
DefaultRegistry.Register(s, gauge) | ||
return gauge | ||
} | ||
|
||
func GetOrCreateFloatCounter(s string) *metrics2.FloatCounter { | ||
floatCounter := metrics2.GetOrCreateFloatCounter(s) | ||
metrics.DefaultRegistry.Register(s, floatCounter) | ||
DefaultRegistry.Register(s, floatCounter) | ||
return floatCounter | ||
} | ||
|
||
func GetOrCreateSummary(s string) *metrics2.Summary { | ||
summary := metrics2.GetOrCreateSummary(s) | ||
metrics.DefaultRegistry.Register(s, summary) | ||
DefaultRegistry.Register(s, summary) | ||
return summary | ||
} | ||
|
||
func GetOrCreateHistogram(s string) *metrics2.Histogram { | ||
histogram := metrics2.GetOrCreateHistogram(s) | ||
metrics.DefaultRegistry.Register(s, histogram) | ||
DefaultRegistry.Register(s, histogram) | ||
return histogram | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package methelp | ||
package metrics | ||
|
||
import ( | ||
"fmt" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters