MM-31436: Upgrade dependencies (#16605)
* MM-31436: Upgrade dependencies Ran make update-dependencies https://mattermost.atlassian.net/browse/MM-31436 ```release-note NONE ``` * add missing dep * fix lru marshaling
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
09d2f698cc
Коммит
091659c8ad
4
vendor/github.com/armon/go-metrics/metrics.go
сгенерированный
поставляемый
4
vendor/github.com/armon/go-metrics/metrics.go
сгенерированный
поставляемый
@@ -228,12 +228,12 @@ func (m *Metrics) allowMetric(key []string, labels []Label) (bool, []Label) {
|
||||
func (m *Metrics) collectStats() {
|
||||
for {
|
||||
time.Sleep(m.ProfileInterval)
|
||||
m.emitRuntimeStats()
|
||||
m.EmitRuntimeStats()
|
||||
}
|
||||
}
|
||||
|
||||
// Emits various runtime statsitics
|
||||
func (m *Metrics) emitRuntimeStats() {
|
||||
func (m *Metrics) EmitRuntimeStats() {
|
||||
// Export number of Goroutines
|
||||
numRoutines := runtime.NumGoroutine()
|
||||
m.SetGauge([]string{"runtime", "num_goroutines"}, float32(numRoutines))
|
||||
|
||||
7
vendor/github.com/armon/go-metrics/start.go
сгенерированный
поставляемый
7
vendor/github.com/armon/go-metrics/start.go
сгенерированный
поставляемый
@@ -6,7 +6,7 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/hashicorp/go-immutable-radix"
|
||||
iradix "github.com/hashicorp/go-immutable-radix"
|
||||
)
|
||||
|
||||
// Config is used to configure metrics settings
|
||||
@@ -48,6 +48,11 @@ func init() {
|
||||
globalMetrics.Store(&Metrics{sink: &BlackholeSink{}})
|
||||
}
|
||||
|
||||
// Default returns the shared global metrics instance.
|
||||
func Default() *Metrics {
|
||||
return globalMetrics.Load().(*Metrics)
|
||||
}
|
||||
|
||||
// DefaultConfig provides a sane default configuration
|
||||
func DefaultConfig(serviceName string) *Config {
|
||||
c := &Config{
|
||||
|
||||
Ссылка в новой задаче
Block a user