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

Unified Diff: ct/go/worker_scripts/capture_archives/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_archives/main.go
diff --git a/ct/go/worker_scripts/capture_archives/main.go b/ct/go/worker_scripts/capture_archives/main.go
index 59861c25a05a9dafca40e0986213c2ca3b286d41..94c1eb575acae6625393f4c0fc0966a6a3a80f52 100644
--- a/ct/go/worker_scripts/capture_archives/main.go
+++ b/ct/go/worker_scripts/capture_archives/main.go
@@ -7,12 +7,10 @@ import (
"fmt"
"io/ioutil"
"path/filepath"
+ "time"
"github.com/skia-dev/glog"
- "strings"
- "time"
-
"go.skia.org/infra/ct/go/util"
"go.skia.org/infra/ct/go/worker_scripts/worker_common"
"go.skia.org/infra/go/common"
@@ -93,17 +91,23 @@ func main() {
continue
}
- // Convert the filename into a format consumable by the record_wpr binary.
- pagesetArchiveName := strings.TrimSuffix(pagesetBaseName, filepath.Ext(pagesetBaseName))
+ // Read the pageset.
pagesetPath := filepath.Join(pathToPagesets, fileInfo.Name())
+ decodedPageset, err := util.ReadPageset(pagesetPath)
+ if err != nil {
+ glog.Errorf("Could not read %s: %s", pagesetPath, err)
+ return
+ }
glog.Infof("===== Processing %s =====", pagesetPath)
args := []string{
+ util.CAPTURE_ARCHIVES_DEFAULT_CT_BENCHMARK,
"--extra-browser-args=--disable-setuid-sandbox",
"--browser=exact",
"--browser-executable=" + chromiumBinary,
- fmt.Sprintf("%s_page_set", pagesetArchiveName),
- "--page-set-base-dir=" + pathToPagesets,
+ "--user-agent=" + decodedPageset.UserAgent,
+ "--urls-list=" + decodedPageset.UrlsList,
+ "--archive-data-file=" + decodedPageset.ArchiveDataFile,
}
env := []string{
fmt.Sprintf("PYTHONPATH=%s:$PYTHONPATH", pathToPagesets),

Powered by Google App Engine
This is Rietveld 408576698