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

Side by Side Diff: ct/go/worker_scripts/run_chromium_perf/main.go

Issue 1872763002: [CT] Split benchmarkArgs around one or more consecutive white spaces (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Initial upload Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // run_chromium_perf is an application that runs the specified benchmark over CT 's 1 // run_chromium_perf is an application that runs the specified benchmark over CT 's
2 // webpage archives. 2 // webpage archives.
3 package main 3 package main
4 4
5 import ( 5 import (
6 "bytes" 6 "bytes"
7 "encoding/csv" 7 "encoding/csv"
8 "flag" 8 "flag"
9 "fmt" 9 "fmt"
10 "io/ioutil" 10 "io/ioutil"
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 if *targetPlatform == util.PLATFORM_ANDROID { 309 if *targetPlatform == util.PLATFORM_ANDROID {
310 if err := util.InstallChromeAPK(chromiumBuildName); err != nil { 310 if err := util.InstallChromeAPK(chromiumBuildName); err != nil {
311 return fmt.Errorf("Error while installing APK: %s", err) 311 return fmt.Errorf("Error while installing APK: %s", err)
312 } 312 }
313 args = append(args, "--browser=android-chromium") 313 args = append(args, "--browser=android-chromium")
314 } else { 314 } else {
315 args = append(args, "--browser=exact", "--browser-executable="+c hromiumBinary) 315 args = append(args, "--browser=exact", "--browser-executable="+c hromiumBinary)
316 } 316 }
317 // Split benchmark args if not empty and append to args. 317 // Split benchmark args if not empty and append to args.
318 if *benchmarkExtraArgs != "" { 318 if *benchmarkExtraArgs != "" {
319 » » for _, benchmarkArg := range strings.Split(*benchmarkExtraArgs, " ") { 319 » » for _, benchmarkArg := range strings.Fields(*benchmarkExtraArgs) {
320 args = append(args, benchmarkArg) 320 args = append(args, benchmarkArg)
321 } 321 }
322 } 322 }
323 // Add the number of times to repeat. 323 // Add the number of times to repeat.
324 args = append(args, fmt.Sprintf("--page-repeat=%d", *repeatBenchmark)) 324 args = append(args, fmt.Sprintf("--page-repeat=%d", *repeatBenchmark))
325 // Add browserArgs if not empty to args. 325 // Add browserArgs if not empty to args.
326 if browserExtraArgs != "" { 326 if browserExtraArgs != "" {
327 args = append(args, "--extra-browser-args="+browserExtraArgs) 327 args = append(args, "--extra-browser-args="+browserExtraArgs)
328 } 328 }
329 // Set the PYTHONPATH to the pagesets and the telemetry dirs. 329 // Set the PYTHONPATH to the pagesets and the telemetry dirs.
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 return fmt.Errorf("Could not write to %s: %s", csvPath, err) 425 return fmt.Errorf("Could not write to %s: %s", csvPath, err)
426 } 426 }
427 // Write all values. 427 // Write all values.
428 for _, row := range values { 428 for _, row := range values {
429 if err := writer.Write(row); err != nil { 429 if err := writer.Write(row); err != nil {
430 return fmt.Errorf("Could not write to %s: %s", csvPath, err) 430 return fmt.Errorf("Could not write to %s: %s", csvPath, err)
431 } 431 }
432 } 432 }
433 return nil 433 return nil
434 } 434 }
OLDNEW
« no previous file with comments | « ct/go/worker_scripts/fix_archives/main.go ('k') | ct/go/worker_scripts/run_chromium_perf_swarming/main.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698