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

Unified Diff: fuzzer/go/aggregator/aggregator.go

Issue 1722163002: Metrics2: Store a registry of Counters (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Address comments 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 | « no previous file | fuzzer/go/generator/afl_generation.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fuzzer/go/aggregator/aggregator.go
diff --git a/fuzzer/go/aggregator/aggregator.go b/fuzzer/go/aggregator/aggregator.go
index b5ca15125cf9e8471f47903d81e1a993f67ad4e9..fa1848e4d8a761acfc910103c4014ae8030b77e9 100644
--- a/fuzzer/go/aggregator/aggregator.go
+++ b/fuzzer/go/aggregator/aggregator.go
@@ -361,7 +361,7 @@ func findBadFuzzPaths(category string, alreadyFoundFuzzes *SortedStringSlice) ([
// happen, this method terminates.
func (agg *Aggregator) waitForAnalysis(identifier int) {
defer agg.aggregationWaitGroup.Done()
- defer metrics2.NewCounter("analysis-process-count", nil).Dec(int64(1))
+ defer metrics2.GetCounter("analysis-process-count", nil).Dec(int64(1))
glog.Infof("Spawning analyzer %d", identifier)
// our own unique working folder
@@ -539,7 +539,7 @@ func (s *SortedStringSlice) Append(strs []string) {
// them. If any unrecoverable errors happen, this method terminates.
func (agg *Aggregator) waitForUploads(identifier int) {
defer agg.aggregationWaitGroup.Done()
- defer metrics2.NewCounter("upload-process-count", nil).Dec(int64(1))
+ defer metrics2.GetCounter("upload-process-count", nil).Dec(int64(1))
glog.Infof("Spawning uploader %d", identifier)
for {
select {
@@ -678,10 +678,10 @@ func (agg *Aggregator) bugReportingHelper(p bugReportingPackage) error {
// many processes are up.
func (agg *Aggregator) monitorStatus(numAnalysisProcesses, numUploadProcesses int) {
defer agg.monitoringWaitGroup.Done()
- analysisProcessCount := metrics2.NewCounter("analysis-process-count", nil)
+ analysisProcessCount := metrics2.GetCounter("analysis-process-count", nil)
analysisProcessCount.Reset()
analysisProcessCount.Inc(int64(numAnalysisProcesses))
- uploadProcessCount := metrics2.NewCounter("upload-process-count", nil)
+ uploadProcessCount := metrics2.GetCounter("upload-process-count", nil)
uploadProcessCount.Reset()
uploadProcessCount.Inc(int64(numUploadProcesses))
« no previous file with comments | « no previous file | fuzzer/go/generator/afl_generation.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698