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

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

Issue 813443002: Overhaul database package (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Comments/readme cleanup 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
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/http" 10 "net/http"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } 137 }
138 } 138 }
139 } 139 }
140 140
141 func main() { 141 func main() {
142 common.InitWithMetrics("ingest", *graphiteServer) 142 common.InitWithMetrics("ingest", *graphiteServer)
143 143
144 goldingester.Init(*fileCacheDir) 144 goldingester.Init(*fileCacheDir)
145 145
146 // Initialize the database. We might not need the oauth dialog if it fai ls. 146 // Initialize the database. We might not need the oauth dialog if it fai ls.
147 » db.Init(db.ProdDatabaseConfig(*local)) 147 » db.Init(db.DatabaseConfig(*local))
148 148
149 var client *http.Client 149 var client *http.Client
150 var err error 150 var err error
151 if *doOauth { 151 if *doOauth {
152 config := auth.DefaultOAuthConfig(*oauthCacheFile) 152 config := auth.DefaultOAuthConfig(*oauthCacheFile)
153 client, err = auth.RunFlow(config) 153 client, err = auth.RunFlow(config)
154 if err != nil { 154 if err != nil {
155 glog.Fatalf("Failed to auth: %s", err) 155 glog.Fatalf("Failed to auth: %s", err)
156 } 156 }
157 } else { 157 } else {
(...skipping 22 matching lines...) Expand all
180 glog.Infof("Process name: %s", name) 180 glog.Infof("Process name: %s", name)
181 if process, ok := ingesters[name]; ok { 181 if process, ok := ingesters[name]; ok {
182 go process() 182 go process()
183 } else { 183 } else {
184 glog.Fatalf("Not a valid ingester name: %s", name) 184 glog.Fatalf("Not a valid ingester name: %s", name)
185 } 185 }
186 } 186 }
187 187
188 select {} 188 select {}
189 } 189 }
OLDNEW
« go/buildbot/db.go ('K') | « perf/go/db/db_test.go ('k') | perf/go/perf_migratedb/main.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698