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

Side by Side Diff: perf/go/ingest/main.go

Issue 659943006: Do not forget to call `defer glog.Flush()` in our applications (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: revert titletool changes Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « monitoring/go/prober/main.go ('k') | perf/go/logserver/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 main 1 package main
2 2
3 // ingest is the command line tool for pulling performance data from Google 3 // ingest is the command line tool for pulling performance data from Google
4 // Storage and putting in Tiles. See the code in go/ingester for details on how 4 // Storage and putting in Tiles. See the code in go/ingester for details on how
5 // ingestion is done. 5 // ingestion is done.
6 6
7 import ( 7 import (
8 "encoding/json" 8 "encoding/json"
9 "flag" 9 "flag"
10 "net" 10 "net"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 oneStep() 136 oneStep()
137 for _ = range time.Tick(every) { 137 for _ = range time.Tick(every) {
138 oneStep() 138 oneStep()
139 } 139 }
140 } 140 }
141 } 141 }
142 142
143 func main() { 143 func main() {
144 flag.Parse() 144 flag.Parse()
145 flags.Log() 145 flags.Log()
146 defer glog.Flush()
147
146 Init() 148 Init()
147 149
148 // Initialize the database. We might not need the oauth dialog if it fai ls. 150 // Initialize the database. We might not need the oauth dialog if it fai ls.
149 db.Init(db.ProdDatabaseConfig(*local)) 151 db.Init(db.ProdDatabaseConfig(*local))
150 152
151 var client *http.Client 153 var client *http.Client
152 var err error 154 var err error
153 if *doOauth { 155 if *doOauth {
154 client, err = auth.RunFlow() 156 client, err = auth.RunFlow()
155 if err != nil { 157 if err != nil {
(...skipping 26 matching lines...) Expand all
182 glog.Infof("Process name: %s", name) 184 glog.Infof("Process name: %s", name)
183 if process, ok := ingesters[name]; ok { 185 if process, ok := ingesters[name]; ok {
184 go process() 186 go process()
185 } else { 187 } else {
186 glog.Fatalf("Not a valid ingester name: %s", name) 188 glog.Fatalf("Not a valid ingester name: %s", name)
187 } 189 }
188 } 190 }
189 191
190 select {} 192 select {}
191 } 193 }
OLDNEW
« no previous file with comments | « monitoring/go/prober/main.go ('k') | perf/go/logserver/main.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698