MCPcopy
hub / github.com/CodisLabs/codis / startMetricsJson

Method startMetricsJson

pkg/proxy/metrics.go:42–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40}
41
42func (p *Proxy) startMetricsJson() {
43 server := p.config.MetricsReportServer
44 period := p.config.MetricsReportPeriod.Duration()
45 if server == "" {
46 return
47 }
48 period = math2.MaxDuration(time.Second, period)
49
50 p.startMetricsReporter(period, func() error {
51 return rpc.ApiPostJson(server, p.Overview(StatsRuntime))
52 }, nil)
53}
54
55func (p *Proxy) startMetricsInfluxdb() {
56 server := p.config.MetricsReportInfluxdbServer

Callers 1

NewFunction · 0.95

Calls 3

startMetricsReporterMethod · 0.95
OverviewMethod · 0.95
DurationMethod · 0.80

Tested by

no test coverage detected