Skip to content

Commit

Permalink
* Refactor the pull backend to use the expvar hook.
Browse files Browse the repository at this point in the history
* Fix the nanoseconds => ints for histogram buckets.
* Gigantic rename of metrics:

-Int => Counter
-IntGauge => Gauge
-IntFunc => GaugeFunc
-Counters => CountersWithLabels
-MultiCounters => CountersWithMultiLabels
-MultiCounterFunc => CountersFuncWithMultiLabels
-Gauges => GaugesWithLabels
-MultiGauges=> GaugesWithMultiLabels

* Add an explicit labelName for CountersWithLabels & GaugesWithLabels

Signed-off-by: Maggie Zhou <mzhou@slack-corp.com>
  • Loading branch information
zmagg authored and michael-berlin committed Apr 20, 2018
1 parent 6b5d7e1 commit 1687f8b
Show file tree
Hide file tree
Showing 42 changed files with 446 additions and 577 deletions.
6 changes: 3 additions & 3 deletions go/mysql/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ const (
var (
// Metrics
timings = stats.NewTimings("MysqlServerTimings", "MySQL server timings")
connCount = stats.NewInt("MysqlServerConnCount", "Connection count for MySQL servers")
connAccept = stats.NewInt("MysqlServerConnAccepted", "Connections accepted by MySQL server")
connSlow = stats.NewInt("MysqlServerConnSlow", "Slow MySQL server connections")
connCount = stats.NewCounter("MysqlServerConnCount", "Connection count for MySQL servers")
connAccept = stats.NewCounter("MysqlServerConnAccepted", "Connections accepted by MySQL server")
connSlow = stats.NewCounter("MysqlServerConnSlow", "Slow MySQL server connections")
)

// A Handler is an interface used by Listener to send queries.
Expand Down
4 changes: 2 additions & 2 deletions go/proc/counting_listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ type countingConnection struct {
func Published(l net.Listener, countTag, acceptTag string) net.Listener {
return &CountingListener{
Listener: l,
ConnCount: stats.NewInt(countTag, "Connection count inside net.Listener"),
ConnAccept: stats.NewInt(acceptTag, "Connections accepted inside net.Listener"),
ConnCount: stats.NewCounter(countTag, "Connection count inside net.Listener"),
ConnAccept: stats.NewCounter(acceptTag, "Connections accepted inside net.Listener"),
}
}

Expand Down
Loading

0 comments on commit 1687f8b

Please sign in to comment.