| OLD | NEW |
| 1 // fix_archives is an application that validates the webpage archives of a | 1 // fix_archives is an application that validates the webpage archives of a |
| 2 // pageset type and deletes the archives which are found to deliver | 2 // pageset type and deletes the archives which are found to deliver |
| 3 // inconsistent benchmark results. | 3 // inconsistent benchmark results. |
| 4 // See https://code.google.com/p/chromium/issues/detail?id=456883 for more | 4 // See https://code.google.com/p/chromium/issues/detail?id=456883 for more |
| 5 // details. | 5 // details. |
| 6 package main | 6 package main |
| 7 | 7 |
| 8 import ( | 8 import ( |
| 9 "encoding/csv" | 9 "encoding/csv" |
| 10 "flag" | 10 "flag" |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 "--page-set-base-dir=" + pathToPagesets, | 156 "--page-set-base-dir=" + pathToPagesets, |
| 157 "--also-run-disabled-tests", | 157 "--also-run-disabled-tests", |
| 158 } | 158 } |
| 159 // Add output dir. | 159 // Add output dir. |
| 160 outputDirArgValue := filepath.Join(localOutputDir, pages
etName, strconv.Itoa(repeatNum)) | 160 outputDirArgValue := filepath.Join(localOutputDir, pages
etName, strconv.Itoa(repeatNum)) |
| 161 args = append(args, "--output-dir="+outputDirArgValue) | 161 args = append(args, "--output-dir="+outputDirArgValue) |
| 162 // Figure out which browser should be used. | 162 // Figure out which browser should be used. |
| 163 args = append(args, "--browser=exact", "--browser-execut
able="+chromiumBinary) | 163 args = append(args, "--browser=exact", "--browser-execut
able="+chromiumBinary) |
| 164 // Split benchmark args if not empty and append to args. | 164 // Split benchmark args if not empty and append to args. |
| 165 if *benchmarkArgs != "" { | 165 if *benchmarkArgs != "" { |
| 166 » » » » for _, benchmarkArg := range strings.Split(*benc
hmarkArgs, " ") { | 166 » » » » for _, benchmarkArg := range strings.Fields(*ben
chmarkArgs) { |
| 167 args = append(args, benchmarkArg) | 167 args = append(args, benchmarkArg) |
| 168 } | 168 } |
| 169 } | 169 } |
| 170 // Add browserArgs if not empty to args. | 170 // Add browserArgs if not empty to args. |
| 171 if *browserArgs != "" { | 171 if *browserArgs != "" { |
| 172 args = append(args, "--extra-browser-args="+*bro
wserArgs) | 172 args = append(args, "--extra-browser-args="+*bro
wserArgs) |
| 173 } | 173 } |
| 174 // Set the PYTHONPATH to the pagesets and the telemetry
dirs. | 174 // Set the PYTHONPATH to the pagesets and the telemetry
dirs. |
| 175 env := []string{ | 175 env := []string{ |
| 176 fmt.Sprintf("PYTHONPATH=%s:%s:%s:%s:$PYTHONPATH"
, pathToPagesets, util.TelemetryBinariesDir, util.TelemetrySrcDir, util.Catapult
SrcDir), | 176 fmt.Sprintf("PYTHONPATH=%s:%s:%s:%s:$PYTHONPATH"
, pathToPagesets, util.TelemetryBinariesDir, util.TelemetrySrcDir, util.Catapult
SrcDir), |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 reader.FieldsPerRecord = -1 | 273 reader.FieldsPerRecord = -1 |
| 274 rawCSVdata, err := reader.ReadAll() | 274 rawCSVdata, err := reader.ReadAll() |
| 275 if err != nil { | 275 if err != nil { |
| 276 return nil, nil, fmt.Errorf("Could not read %s: %s", csvPath, er
r) | 276 return nil, nil, fmt.Errorf("Could not read %s: %s", csvPath, er
r) |
| 277 } | 277 } |
| 278 if len(rawCSVdata) != 2 { | 278 if len(rawCSVdata) != 2 { |
| 279 return nil, nil, fmt.Errorf("No data in %s", csvPath) | 279 return nil, nil, fmt.Errorf("No data in %s", csvPath) |
| 280 } | 280 } |
| 281 return rawCSVdata[0], rawCSVdata[1], nil | 281 return rawCSVdata[0], rawCSVdata[1], nil |
| 282 } | 282 } |
| OLD | NEW |