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

Unified Diff: ct/go/worker_scripts/run_chromium_perf/main.go

Issue 1392173005: [CT] Update worker scripts to use new benchmarks and delete old benchmarks (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Remove staging code Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: ct/go/worker_scripts/run_chromium_perf/main.go
diff --git a/ct/go/worker_scripts/run_chromium_perf/main.go b/ct/go/worker_scripts/run_chromium_perf/main.go
index dc9661a05786ee66e055fddfd3e71e47398deeee..588228ccc45ab432b9e564284ceccc4b1f4b58d8 100644
--- a/ct/go/worker_scripts/run_chromium_perf/main.go
+++ b/ct/go/worker_scripts/run_chromium_perf/main.go
@@ -4,6 +4,7 @@ package main
import (
"encoding/csv"
+ "encoding/json"
"flag"
"fmt"
"io/ioutil"
@@ -249,15 +250,23 @@ func runBenchmark(fileInfoName, pathToPagesets, pathToPyFiles, localOutputDir, c
pagesetName := strings.TrimSuffix(pagesetBaseName, filepath.Ext(pagesetBaseName))
pagesetPath := filepath.Join(pathToPagesets, fileInfoName)
- glog.Infof("===== Processing %s for %s =====", pagesetPath, runID)
+ pagesetContent, err := os.Open(pagesetPath)
+ if err != nil {
+ return fmt.Errorf("Could not read %s: %s", pagesetPath, err)
+ }
+ decodedPageset := util.PagesetVars{}
+ if err := json.NewDecoder(pagesetContent).Decode(&decodedPageset); err != nil {
+ return fmt.Errorf("Could not JSON decode %s: %s", pagesetPath, err)
+ }
- skutil.LogErr(os.Chdir(pathToPyFiles))
+ glog.Infof("===== Processing %s for %s =====", pagesetPath, runID)
args := []string{
- util.BINARY_RUN_BENCHMARK,
- fmt.Sprintf("%s.%s", *benchmarkName, util.BenchmarksToPagesetName[*benchmarkName]),
- "--page-set-name=" + pagesetName,
- "--page-set-base-dir=" + pathToPagesets,
+ filepath.Join(util.TelemetryBinariesDir, util.BINARY_RUN_BENCHMARK),
+ util.BenchmarksToPagesetName[*benchmarkName],
"--also-run-disabled-tests",
+ "--user-agent=" + decodedPageset.UserAgent,
+ "--urls-list=" + decodedPageset.UrlsList,
+ "--archive-data-file=" + decodedPageset.ArchiveDataFile,
}
// Need to capture output for all benchmarks.

Powered by Google App Engine
This is Rietveld 408576698