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

Side by Side Diff: golden/go/skiacorrectness/main.go

Issue 1079833002: Add monitoring for expired ignore rules. (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Created 5 years, 8 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 | « golden/go/ignore/monitor.go ('k') | no next file » | 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 import ( 3 import (
4 "encoding/json" 4 "encoding/json"
5 "flag" 5 "flag"
6 "fmt" 6 "fmt"
7 "io/ioutil" 7 "io/ioutil"
8 "net/http" 8 "net/http"
9 "os" 9 "os"
10 "path/filepath" 10 "path/filepath"
11 "runtime/pprof" 11 "runtime/pprof"
12 "time" 12 "time"
13 13
14 "github.com/gorilla/mux" 14 "github.com/gorilla/mux"
15 "github.com/rcrowley/go-metrics"
15 "github.com/skia-dev/glog" 16 "github.com/skia-dev/glog"
16 "go.skia.org/infra/go/auth" 17 "go.skia.org/infra/go/auth"
17 "go.skia.org/infra/go/common" 18 "go.skia.org/infra/go/common"
18 "go.skia.org/infra/go/database" 19 "go.skia.org/infra/go/database"
19 "go.skia.org/infra/go/login" 20 "go.skia.org/infra/go/login"
20 "go.skia.org/infra/go/metadata" 21 "go.skia.org/infra/go/metadata"
21 "go.skia.org/infra/go/redisutil" 22 "go.skia.org/infra/go/redisutil"
22 "go.skia.org/infra/go/skiaversion" 23 "go.skia.org/infra/go/skiaversion"
23 "go.skia.org/infra/go/timer" 24 "go.skia.org/infra/go/timer"
24 "go.skia.org/infra/go/util" 25 "go.skia.org/infra/go/util"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 vdb := database.NewVersionedDB(conf) 363 vdb := database.NewVersionedDB(conf)
363 364
364 storages = &storage.Storage{ 365 storages = &storage.Storage{
365 DiffStore: diffStore, 366 DiffStore: diffStore,
366 ExpectationsStore: expstorage.NewCachingExpectationStore(expstor age.NewSQLExpectationStore(vdb)), 367 ExpectationsStore: expstorage.NewCachingExpectationStore(expstor age.NewSQLExpectationStore(vdb)),
367 IgnoreStore: ignore.NewSQLIgnoreStore(vdb), 368 IgnoreStore: ignore.NewSQLIgnoreStore(vdb),
368 TileStore: filetilestore.NewFileTileStore(*tileStoreDir, pconfig.DATASET_GOLD, 2*time.Minute), 369 TileStore: filetilestore.NewFileTileStore(*tileStoreDir, pconfig.DATASET_GOLD, 2*time.Minute),
369 NCommits: *nCommits, 370 NCommits: *nCommits,
370 } 371 }
371 372
373 if err := ignore.StartMonitoring(storages.IgnoreStore, metrics.DefaultRe gistry); err != nil {
stephana 2015/04/13 13:56:57 How about calling this Init and setting the Defaul
jcgregorio 2015/04/13 14:10:59 Done.
374 glog.Fatalf("Failed to start monitoring for expired ignore rules : %s", err)
375 }
376
372 // Enable the experimental features. 377 // Enable the experimental features.
373 if *startExperimental { 378 if *startExperimental {
374 tallies, err = tally.New(storages) 379 tallies, err = tally.New(storages)
375 if err != nil { 380 if err != nil {
376 glog.Fatalf("Failed to build tallies: %s", err) 381 glog.Fatalf("Failed to build tallies: %s", err)
377 } 382 }
378 383
379 summaries, err = summary.New(storages, tallies) 384 summaries, err = summary.New(storages, tallies)
380 if err != nil { 385 if err != nil {
381 glog.Fatalf("Failed to build summary: %s", err) 386 glog.Fatalf("Failed to build summary: %s", err)
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 // Everything else is served out of the static directory. 446 // Everything else is served out of the static directory.
442 router.PathPrefix("/").Handler(http.FileServer(http.Dir(*staticDir))) 447 router.PathPrefix("/").Handler(http.FileServer(http.Dir(*staticDir)))
443 448
444 // Send all requests to the router 449 // Send all requests to the router
445 http.Handle("/", util.LoggingGzipRequestResponse(router)) 450 http.Handle("/", util.LoggingGzipRequestResponse(router))
446 451
447 // Start the server 452 // Start the server
448 glog.Infoln("Serving on http://127.0.0.1" + *port) 453 glog.Infoln("Serving on http://127.0.0.1" + *port)
449 glog.Fatal(http.ListenAndServe(*port, nil)) 454 glog.Fatal(http.ListenAndServe(*port, nil))
450 } 455 }
OLDNEW
« no previous file with comments | « golden/go/ignore/monitor.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698