Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Unified Diff: go/metrics2/counter.go

Issue 1682363003: Migrate fuzzer to use shiny new metrics2 package (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: one last _ to - Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fuzzer/sys/fuzzer-fe.service ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: go/metrics2/counter.go
diff --git a/go/metrics2/counter.go b/go/metrics2/counter.go
index 15750a505c317504e447f778a2d0be1059cf7afa..3752e2c291cb24008f70ed601e4f582c35afb377 100644
--- a/go/metrics2/counter.go
+++ b/go/metrics2/counter.go
@@ -51,3 +51,10 @@ func (c *Counter) Reset() {
defer c.mtx.Unlock()
c.m.Update(0)
}
+
+// Get returns the current value in the counter.
+func (c *Counter) Get() int64 {
+ c.mtx.Lock()
+ defer c.mtx.Unlock()
+ return c.m.Get()
+}
« no previous file with comments | « fuzzer/sys/fuzzer-fe.service ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698