[ARVADOS] updated: 1.2.0-205-gd6a21ab8a
Git user
git at public.curoverse.com
Tue Oct 16 11:42:49 EDT 2018
Summary of changes:
services/keep-balance/balance_run_test.go | 8 ++++----
services/keep-balance/metrics.go | 2 ++
2 files changed, 6 insertions(+), 4 deletions(-)
via d6a21ab8a0c5a45bdcd7c0fbaa93f7096e56e831 (commit)
from d2fb3f8daccf2362ac5f5fb91eae0255674b0818 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit d6a21ab8a0c5a45bdcd7c0fbaa93f7096e56e831
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date: Tue Oct 16 11:41:54 2018 -0400
Fix missing namespace in metric names.
refs #14285
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>
diff --git a/services/keep-balance/balance_run_test.go b/services/keep-balance/balance_run_test.go
index f42383297..e1b92005f 100644
--- a/services/keep-balance/balance_run_test.go
+++ b/services/keep-balance/balance_run_test.go
@@ -460,9 +460,9 @@ func (s *runSuite) TestCommit(c *check.C) {
c.Check(bal.stats.pulls, check.Equals, 2)
metrics := s.getMetrics(c, srv)
- c.Check(metrics, check.Matches, `(?ms).*\nkeep_total_bytes 15\n.*`)
- c.Check(metrics, check.Matches, `(?ms).*\nkeepbalance_changeset_compute_seconds_sum [0-9\.]+\n.*`)
- c.Check(metrics, check.Matches, `(?ms).*\nkeepbalance_changeset_compute_seconds_count 1\n.*`)
+ c.Check(metrics, check.Matches, `(?ms).*\narvados_keep_total_bytes 15\n.*`)
+ c.Check(metrics, check.Matches, `(?ms).*\narvados_keepbalance_changeset_compute_seconds_sum [0-9\.]+\n.*`)
+ c.Check(metrics, check.Matches, `(?ms).*\narvados_keepbalance_changeset_compute_seconds_count 1\n.*`)
}
func (s *runSuite) TestRunForever(c *check.C) {
@@ -504,7 +504,7 @@ func (s *runSuite) TestRunForever(c *check.C) {
<-done
c.Check(pullReqs.Count() >= 16, check.Equals, true)
c.Check(trashReqs.Count(), check.Equals, pullReqs.Count()+4)
- c.Check(s.getMetrics(c, srv), check.Matches, `(?ms).*\nkeepbalance_changeset_compute_seconds_count `+fmt.Sprintf("%d", pullReqs.Count()/4)+`\n.*`)
+ c.Check(s.getMetrics(c, srv), check.Matches, `(?ms).*\narvados_keepbalance_changeset_compute_seconds_count `+fmt.Sprintf("%d", pullReqs.Count()/4)+`\n.*`)
}
func (s *runSuite) getMetrics(c *check.C, srv *Server) string {
diff --git a/services/keep-balance/metrics.go b/services/keep-balance/metrics.go
index 96ee66ce5..0564d46cd 100644
--- a/services/keep-balance/metrics.go
+++ b/services/keep-balance/metrics.go
@@ -39,6 +39,7 @@ func (m *metrics) DurationObserver(name, help string) observer {
return obs
}
summary := prometheus.NewSummary(prometheus.SummaryOpts{
+ Namespace: "arvados",
Name: name,
Subsystem: "keepbalance",
Help: help,
@@ -68,6 +69,7 @@ func (m *metrics) UpdateStats(s balancerStats) {
// Register gauge(s) for each balancerStats field.
addGauge := func(name, help string) {
g := prometheus.NewGauge(prometheus.GaugeOpts{
+ Namespace: "arvados",
Name: name,
Subsystem: "keep",
Help: help,
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list