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

Unified Diff: perf/go/skiaperf/main.go

Issue 813443002: Overhaul database package (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Assume the MySQL password is "" when running locally Created 5 years, 11 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 | « perf/go/perf_migratedb/main.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: perf/go/skiaperf/main.go
diff --git a/perf/go/skiaperf/main.go b/perf/go/skiaperf/main.go
index 2640e17251bf1e52e7cef0335d3ee3f3fe355ae9..df76f0a5f7b6c06ac1876efa7abc016b10c43d3c 100644
--- a/perf/go/skiaperf/main.go
+++ b/perf/go/skiaperf/main.go
@@ -24,6 +24,7 @@ import (
import (
"skia.googlesource.com/buildbot.git/go/common"
+ "skia.googlesource.com/buildbot.git/go/database"
"skia.googlesource.com/buildbot.git/go/gitinfo"
"skia.googlesource.com/buildbot.git/go/login"
"skia.googlesource.com/buildbot.git/go/metadata"
@@ -1058,9 +1059,16 @@ func makeResourceHandler() func(http.ResponseWriter, *http.Request) {
}
func main() {
+ // Setup DB flags.
+ database.SetupFlags(db.PROD_DB_HOST, db.PROD_DB_PORT, database.USER_RW, db.PROD_DB_NAME)
+
common.InitWithMetrics("skiaperf", *graphiteServer)
Init()
- db.Init(db.ProdDatabaseConfig(*local))
+ conf, err := database.ConfigFromFlagsAndMetadata(*local, db.MigrationSteps())
+ if err != nil {
+ glog.Fatal(err)
+ }
+ db.Init(conf)
stats.Start(nanoTileStore, git)
alerting.Start(nanoTileStore, *apikey)
« no previous file with comments | « perf/go/perf_migratedb/main.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698