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/http" | 10 "net/http" |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 // Add back service account access here when it's fixed. | 155 // Add back service account access here when it's fixed. |
156 } | 156 } |
157 | 157 |
158 ingester.Init(client) | 158 ingester.Init(client) |
159 ts := NewTimestamps(*timestampFile) | 159 ts := NewTimestamps(*timestampFile) |
160 ts.Read() | 160 ts.Read() |
161 glog.Infof("Timestamps: %#v\n", ts.Ingester) | 161 glog.Infof("Timestamps: %#v\n", ts.Ingester) |
162 | 162 |
163 git, err := gitinfo.NewGitInfo(*gitRepoDir, true, false) | 163 git, err := gitinfo.NewGitInfo(*gitRepoDir, true, false) |
164 if err != nil { | 164 if err != nil { |
165 » » glog.Fatal("Failed loading Git info: %s\n", err) | 165 » » glog.Fatalf("Failed loading Git info: %s\n", err) |
166 } | 166 } |
167 | 167 |
168 // ingesters is a list of all the types of ingestion we can do. | 168 // ingesters is a list of all the types of ingestion we can do. |
169 ingesters := map[string]Process{ | 169 ingesters := map[string]Process{ |
170 "nano": NewIngestionProcess(ts, "ingest", git, *tileDir,
config.DATASET_NANO, ingester.NanoBenchIngestion, "nano-json-v1", *runEvery, "na
no-ingest"), | 170 "nano": NewIngestionProcess(ts, "ingest", git, *tileDir,
config.DATASET_NANO, ingester.NanoBenchIngestion, "nano-json-v1", *runEvery, "na
no-ingest"), |
171 "nano-trybot": NewIngestionProcess(ts, "trybot", git, *tileDir,
config.DATASET_NANO, trybot.TrybotIngestion, "trybot/nano-json-v1", *runTrybotEv
ery, "nano-trybot"), | 171 "nano-trybot": NewIngestionProcess(ts, "trybot", git, *tileDir,
config.DATASET_NANO, trybot.TrybotIngestion, "trybot/nano-json-v1", *runTrybotEv
ery, "nano-trybot"), |
172 "golden": NewIngestionProcess(ts, "golden", git, *tileDir,
config.DATASET_GOLDEN, goldingester.GoldenIngester, "dm-json-v1", *runEvery, "go
lden-ingest"), | 172 "golden": NewIngestionProcess(ts, "golden", git, *tileDir,
config.DATASET_GOLDEN, goldingester.GoldenIngester, "dm-json-v1", *runEvery, "go
lden-ingest"), |
173 } | 173 } |
174 | 174 |
175 for _, name := range strings.Split(*run, ",") { | 175 for _, name := range strings.Split(*run, ",") { |
176 glog.Infof("Process name: %s", name) | 176 glog.Infof("Process name: %s", name) |
177 if process, ok := ingesters[name]; ok { | 177 if process, ok := ingesters[name]; ok { |
178 go process() | 178 go process() |
179 } else { | 179 } else { |
180 glog.Fatalf("Not a valid ingester name: %s", name) | 180 glog.Fatalf("Not a valid ingester name: %s", name) |
181 } | 181 } |
182 } | 182 } |
183 | 183 |
184 select {} | 184 select {} |
185 } | 185 } |
OLD | NEW |