| OLD | NEW | 
|---|
| 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 16 matching lines...) Expand all  Loading... | 
| 27 ) | 27 ) | 
| 28 | 28 | 
| 29 // flags | 29 // flags | 
| 30 var ( | 30 var ( | 
| 31         timestampFile  = flag.String("timestamp_file", "/tmp/timestamp.json", "F
     ile where timestamp data for ingester runs will be stored.") | 31         timestampFile  = flag.String("timestamp_file", "/tmp/timestamp.json", "F
     ile where timestamp data for ingester runs will be stored.") | 
| 32         tileDir        = flag.String("tile_dir", "/tmp/tileStore2/", "Path where
      tiles will be placed.") | 32         tileDir        = flag.String("tile_dir", "/tmp/tileStore2/", "Path where
      tiles will be placed.") | 
| 33         gitRepoDir     = flag.String("git_repo_dir", "../../../skia", "Directory
      location for the Skia repo.") | 33         gitRepoDir     = flag.String("git_repo_dir", "../../../skia", "Directory
      location for the Skia repo.") | 
| 34         runEvery       = flag.Duration("run_every", 5*time.Minute, "How often th
     e ingester should pull data from Google Storage.") | 34         runEvery       = flag.Duration("run_every", 5*time.Minute, "How often th
     e ingester should pull data from Google Storage.") | 
| 35         runTrybotEvery = flag.Duration("run_trybot_every", 1*time.Minute, "How o
     ften the ingester to pull trybot data from Google Storage.") | 35         runTrybotEvery = flag.Duration("run_trybot_every", 1*time.Minute, "How o
     ften the ingester to pull trybot data from Google Storage.") | 
| 36         run            = flag.String("run", "nano,nano-trybot,golden", "A comma 
     separated list of ingesters to run.") | 36         run            = flag.String("run", "nano,nano-trybot,golden", "A comma 
     separated list of ingesters to run.") | 
| 37 »       graphiteServer = flag.String("graphite_server", "skia-monitoring-b:2003"
     , "Where is Graphite metrics ingestion server running.") | 37 »       graphiteServer = flag.String("graphite_server", "skia-monitoring:2003", 
     "Where is Graphite metrics ingestion server running.") | 
| 38         doOauth        = flag.Bool("oauth", true, "Run through the OAuth 2.0 flo
     w on startup, otherwise use a GCE service account.") | 38         doOauth        = flag.Bool("oauth", true, "Run through the OAuth 2.0 flo
     w on startup, otherwise use a GCE service account.") | 
| 39         local          = flag.Bool("local", false, "Running locally if true. As 
     opposed to in production.") | 39         local          = flag.Bool("local", false, "Running locally if true. As 
     opposed to in production.") | 
| 40 ) | 40 ) | 
| 41 | 41 | 
| 42 func Init() { | 42 func Init() { | 
| 43         metrics.RegisterRuntimeMemStats(metrics.DefaultRegistry) | 43         metrics.RegisterRuntimeMemStats(metrics.DefaultRegistry) | 
| 44         go metrics.CaptureRuntimeMemStats(metrics.DefaultRegistry, 1*time.Minute
     ) | 44         go metrics.CaptureRuntimeMemStats(metrics.DefaultRegistry, 1*time.Minute
     ) | 
| 45         addr, _ := net.ResolveTCPAddr("tcp", *graphiteServer) | 45         addr, _ := net.ResolveTCPAddr("tcp", *graphiteServer) | 
| 46         go metrics.Graphite(metrics.DefaultRegistry, 1*time.Minute, "ingest", ad
     dr) | 46         go metrics.Graphite(metrics.DefaultRegistry, 1*time.Minute, "ingest", ad
     dr) | 
| 47 } | 47 } | 
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 182                 glog.Infof("Process name: %s", name) | 182                 glog.Infof("Process name: %s", name) | 
| 183                 if process, ok := ingesters[name]; ok { | 183                 if process, ok := ingesters[name]; ok { | 
| 184                         go process() | 184                         go process() | 
| 185                 } else { | 185                 } else { | 
| 186                         glog.Fatalf("Not a valid ingester name: %s", name) | 186                         glog.Fatalf("Not a valid ingester name: %s", name) | 
| 187                 } | 187                 } | 
| 188         } | 188         } | 
| 189 | 189 | 
| 190         select {} | 190         select {} | 
| 191 } | 191 } | 
| OLD | NEW | 
|---|