OLD | NEW |
1 // run_chromium_perf_on_workers is an application that runs the specified teleme
try | 1 // run_chromium_perf_on_workers is an application that runs the specified teleme
try |
2 // benchmark on all CT workers and uploads the results to Google Storage. The | 2 // benchmark on all CT workers and uploads the results to Google Storage. The |
3 // requester is emailed when the task is done. | 3 // requester is emailed when the task is done. |
4 package main | 4 package main |
5 | 5 |
6 import ( | 6 import ( |
7 "bytes" | 7 "bytes" |
8 "database/sql" | 8 "database/sql" |
9 "flag" | 9 "flag" |
10 "fmt" | 10 "fmt" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 if err := gs.UploadFile(patchName, os.TempDir(), remoteOutputDir
); err != nil { | 158 if err := gs.UploadFile(patchName, os.TempDir(), remoteOutputDir
); err != nil { |
159 glog.Errorf("Could not upload %s to %s: %s", patchName,
remoteOutputDir, err) | 159 glog.Errorf("Could not upload %s to %s: %s", patchName,
remoteOutputDir, err) |
160 return | 160 return |
161 } | 161 } |
162 } | 162 } |
163 skiaPatchLink = util.GS_HTTP_LINK + filepath.Join(util.GSBucketName, rem
oteOutputDir, skiaPatchName) | 163 skiaPatchLink = util.GS_HTTP_LINK + filepath.Join(util.GSBucketName, rem
oteOutputDir, skiaPatchName) |
164 chromiumPatchLink = util.GS_HTTP_LINK + filepath.Join(util.GSBucketName,
remoteOutputDir, chromiumPatchName) | 164 chromiumPatchLink = util.GS_HTTP_LINK + filepath.Join(util.GSBucketName,
remoteOutputDir, chromiumPatchName) |
165 benchmarkPatchLink = util.GS_HTTP_LINK + filepath.Join(util.GSBucketName
, remoteOutputDir, benchmarkPatchName) | 165 benchmarkPatchLink = util.GS_HTTP_LINK + filepath.Join(util.GSBucketName
, remoteOutputDir, benchmarkPatchName) |
166 | 166 |
167 // Create the two required chromium builds (with patch and without the p
atch). | 167 // Create the two required chromium builds (with patch and without the p
atch). |
168 » chromiumHash, skiaHash, err := util.CreateChromiumBuild(*runID, *targetP
latform, "", "", true) | 168 » chromiumHash, skiaHash, err := util.CreateChromiumBuild(*runID, *targetP
latform, "", "", true, false) |
169 if err != nil { | 169 if err != nil { |
170 glog.Errorf("Could not create chromium build: %s", err) | 170 glog.Errorf("Could not create chromium build: %s", err) |
171 return | 171 return |
172 } | 172 } |
173 | 173 |
174 // Reboot all workers to start from a clean slate. | 174 // Reboot all workers to start from a clean slate. |
175 if !*master_common.Local { | 175 if !*master_common.Local { |
176 util.RebootWorkers() | 176 util.RebootWorkers() |
177 } | 177 } |
178 | 178 |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 if err != nil { | 361 if err != nil { |
362 return noOutputSlaves, fmt.Errorf("Error running csv_merger.py:
%s", err) | 362 return noOutputSlaves, fmt.Errorf("Error running csv_merger.py:
%s", err) |
363 } | 363 } |
364 // Copy the output file to Google Storage. | 364 // Copy the output file to Google Storage. |
365 remoteOutputDir := filepath.Join(util.BenchmarkRunsDir, runID, "consolid
ated_outputs") | 365 remoteOutputDir := filepath.Join(util.BenchmarkRunsDir, runID, "consolid
ated_outputs") |
366 if err := gs.UploadFile(outputFileName, localOutputDir, remoteOutputDir)
; err != nil { | 366 if err := gs.UploadFile(outputFileName, localOutputDir, remoteOutputDir)
; err != nil { |
367 return noOutputSlaves, fmt.Errorf("Unable to upload %s to %s: %s
", outputFileName, remoteOutputDir, err) | 367 return noOutputSlaves, fmt.Errorf("Unable to upload %s to %s: %s
", outputFileName, remoteOutputDir, err) |
368 } | 368 } |
369 return noOutputSlaves, nil | 369 return noOutputSlaves, nil |
370 } | 370 } |
OLD | NEW |