| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |