| 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.
|
|
|