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

Side by Side Diff: monitoring/go/buildbot_ingest/bycommit.go

Issue 777413002: Add new tests to presubmit, fix errors (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: rebase Created 6 years 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 unified diff | Download patch
« no previous file with comments | « monitoring/go/alertserver/main.go ('k') | monitoring/go/datahopper/main.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 package buildbot_ingest 1 package buildbot_ingest
2 2
3 /* 3 /*
4 Loads data from build masters and pushes it into InfluxDB. 4 Loads data from build masters and pushes it into InfluxDB.
5 */ 5 */
6 import ( 6 import (
7 "fmt" 7 "fmt"
8 "path" 8 "path"
9 "sync" 9 "sync"
10 "time" 10 "time"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 if len(results) == 0 { 134 if len(results) == 0 {
135 return -1, nil 135 return -1, nil
136 } 136 }
137 137
138 // Error checking. 138 // Error checking.
139 if len(results) != 1 { 139 if len(results) != 1 {
140 return -1, fmt.Errorf("Query returned incorrect number of series : %q", q) 140 return -1, fmt.Errorf("Query returned incorrect number of series : %q", q)
141 } 141 }
142 series := results[0] 142 series := results[0]
143 if series.Name != SERIES_BUILDBOT_BYCOMMIT { 143 if series.Name != SERIES_BUILDBOT_BYCOMMIT {
144 » » return -1, fmt.Errorf("Query returned the wrong series: %q; expe cted: %s got: %S", q, SERIES_BUILDBOT_BYCOMMIT, series.Name) 144 » » return -1, fmt.Errorf("Query returned the wrong series: %q; expe cted: %s got: %s", q, SERIES_BUILDBOT_BYCOMMIT, series.Name)
145 } 145 }
146 if len(series.Columns) != 2 { 146 if len(series.Columns) != 2 {
147 return -1, fmt.Errorf("Query returned incorrect number of column s: %q, %v", q, series.Columns) 147 return -1, fmt.Errorf("Query returned incorrect number of column s: %q, %v", q, series.Columns)
148 } 148 }
149 if len(series.Points) != 1 { 149 if len(series.Points) != 1 {
150 return -1, fmt.Errorf("Query returned more than one point: %q", q) 150 return -1, fmt.Errorf("Query returned more than one point: %q", q)
151 } 151 }
152 p := series.Points[0] 152 p := series.Points[0]
153 if len(p) != len(series.Columns) { 153 if len(p) != len(series.Columns) {
154 return -1, fmt.Errorf("Number of columns does not match number o f fields in datapoint: %v, %v", p, series.Columns) 154 return -1, fmt.Errorf("Number of columns does not match number o f fields in datapoint: %v, %v", p, series.Columns)
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 if err != nil { 253 if err != nil {
254 glog.Error(err) 254 glog.Error(err)
255 } 255 }
256 } 256 }
257 }(m, b, builds) 257 }(m, b, builds)
258 } 258 }
259 } 259 }
260 wg.Wait() 260 wg.Wait()
261 } 261 }
262 } 262 }
OLDNEW
« no previous file with comments | « monitoring/go/alertserver/main.go ('k') | monitoring/go/datahopper/main.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698