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

Unified Diff: ct/go/worker_scripts/capture_skps/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: Cleanup capture_archives 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/capture_skps/main.go
diff --git a/ct/go/worker_scripts/capture_skps/main.go b/ct/go/worker_scripts/capture_skps/main.go
index c701cf8a3ac18c6f612405678d3f86db98d58b69..5115cf971b1aeede00f5e9d3c379165f39d1562b 100644
--- a/ct/go/worker_scripts/capture_skps/main.go
+++ b/ct/go/worker_scripts/capture_skps/main.go
@@ -14,8 +14,6 @@ import (
"github.com/skia-dev/glog"
- "strings"
-
"go.skia.org/infra/ct/go/util"
"go.skia.org/infra/ct/go/worker_scripts/worker_common"
"go.skia.org/infra/go/common"
@@ -159,24 +157,27 @@ func main() {
mutex.RLock()
- pagesetBaseName := filepath.Base(pagesetName)
- // Convert the filename into a format consumable by the run_benchmarks
- // binary.
- pagesetNameNoExt := strings.TrimSuffix(pagesetBaseName, filepath.Ext(pagesetBaseName))
+ // Read the pageset.
pagesetPath := filepath.Join(pathToPagesets, pagesetName)
+ decodedPageset, err := util.ReadPageset(pagesetPath)
+ if err != nil {
+ glog.Errorf("Could not read %s: %s", pagesetPath, err)
+ continue
+ }
glog.Infof("===== Processing %s =====", pagesetPath)
skutil.LogErr(os.Chdir(pathToPyFiles))
args := []string{
- util.BINARY_RUN_BENCHMARK,
- fmt.Sprintf("%s.%s", util.BENCHMARK_SKPICTURE_PRINTER, util.BenchmarksToPagesetName[util.BENCHMARK_SKPICTURE_PRINTER]),
- "--page-set-name=" + pagesetNameNoExt,
- "--page-set-base-dir=" + pathToPagesets,
+ filepath.Join(util.TelemetryBinariesDir, util.BINARY_RUN_BENCHMARK),
+ util.BenchmarksToPagesetName[util.BENCHMARK_SKPICTURE_PRINTER],
"--also-run-disabled-tests",
"--page-repeat=1", // Only need one run for SKPs.
"--skp-outdir=" + pathToSkps,
"--extra-browser-args=" + util.DEFAULT_BROWSER_ARGS,
+ "--user-agent=" + decodedPageset.UserAgent,
+ "--urls-list=" + decodedPageset.UrlsList,
+ "--archive-data-file=" + decodedPageset.ArchiveDataFile,
}
// Figure out which browser should be used.
if *targetPlatform == util.PLATFORM_ANDROID {

Powered by Google App Engine
This is Rietveld 408576698