| OLD | NEW |
| 1 package util | 1 package util |
| 2 | 2 |
| 3 import ( | 3 import ( |
| 4 "fmt" | 4 "fmt" |
| 5 "path/filepath" | 5 "path/filepath" |
| 6 "time" | 6 "time" |
| 7 ) | 7 ) |
| 8 | 8 |
| 9 const ( | 9 const ( |
| 10 NUM_WORKERS_PROD int = 100 | 10 NUM_WORKERS_PROD int = 100 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 // Pageset types supported by CT. | 42 // Pageset types supported by CT. |
| 43 PAGESET_TYPE_ALL = "All" | 43 PAGESET_TYPE_ALL = "All" |
| 44 PAGESET_TYPE_10k = "10k" | 44 PAGESET_TYPE_10k = "10k" |
| 45 PAGESET_TYPE_MOBILE_10k = "Mobile10k" | 45 PAGESET_TYPE_MOBILE_10k = "Mobile10k" |
| 46 PAGESET_TYPE_DUMMY_1k = "Dummy1k" // Used for testing. | 46 PAGESET_TYPE_DUMMY_1k = "Dummy1k" // Used for testing. |
| 47 | 47 |
| 48 // Names of binaries executed by CT. | 48 // Names of binaries executed by CT. |
| 49 BINARY_CHROME = "chrome" | 49 BINARY_CHROME = "chrome" |
| 50 BINARY_RECORD_WPR = "record_wpr" | 50 BINARY_RECORD_WPR = "record_wpr" |
| 51 » BINARY_RUN_BENCHMARK = "ct_run_benchmark" | 51 » BINARY_RUN_BENCHMARK = "run_benchmark" |
| 52 BINARY_GCLIENT = "gclient" | 52 BINARY_GCLIENT = "gclient" |
| 53 BINARY_MAKE = "make" | 53 BINARY_MAKE = "make" |
| 54 BINARY_LUA_PICTURES = "lua_pictures" | 54 BINARY_LUA_PICTURES = "lua_pictures" |
| 55 BINARY_ADB = "adb" | 55 BINARY_ADB = "adb" |
| 56 BINARY_GIT = "git" | 56 BINARY_GIT = "git" |
| 57 BINARY_RENDER_PICTURES = "render_pictures" | 57 BINARY_RENDER_PICTURES = "render_pictures" |
| 58 BINARY_MAIL = "mail" | 58 BINARY_MAIL = "mail" |
| 59 BINARY_LUA = "lua" | 59 BINARY_LUA = "lua" |
| 60 | 60 |
| 61 // Platforms supported by CT. | 61 // Platforms supported by CT. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // worker timeouts. | 114 // worker timeouts. |
| 115 MASTER_SCRIPT_TIMEOUT_PADDING = 30 * time.Minute | 115 MASTER_SCRIPT_TIMEOUT_PADDING = 30 * time.Minute |
| 116 | 116 |
| 117 // Build Chromium Task | 117 // Build Chromium Task |
| 118 GIT_LOG_TIMEOUT = 5 * time.Minute | 118 GIT_LOG_TIMEOUT = 5 * time.Minute |
| 119 MASTER_SCRIPT_BUILD_CHROMIUM_TIMEOUT = CREATE_CHROMIUM_BUILD_TIMEOUT + G
IT_LOG_TIMEOUT + | 119 MASTER_SCRIPT_BUILD_CHROMIUM_TIMEOUT = CREATE_CHROMIUM_BUILD_TIMEOUT + G
IT_LOG_TIMEOUT + |
| 120 MASTER_SCRIPT_TIMEOUT_PADDING | 120 MASTER_SCRIPT_TIMEOUT_PADDING |
| 121 | 121 |
| 122 // Capture Archives | 122 // Capture Archives |
| 123 // Setting a 5 day timeout since it may take a while to capture 1M archi
ves. | 123 // Setting a 5 day timeout since it may take a while to capture 1M archi
ves. |
| 124 CAPTURE_ARCHIVES_DEFAULT_CT_BENCHMARK = "rasterize_and_record_micro_ct" |
| 124 CAPTURE_ARCHIVES_TIMEOUT = 5 * 24 * time.Hour | 125 CAPTURE_ARCHIVES_TIMEOUT = 5 * 24 * time.Hour |
| 125 MASTER_SCRIPT_CAPTURE_ARCHIVES_TIMEOUT = CAPTURE_ARCHIVES_TIMEOUT + | 126 MASTER_SCRIPT_CAPTURE_ARCHIVES_TIMEOUT = CAPTURE_ARCHIVES_TIMEOUT + |
| 126 MASTER_SCRIPT_TIMEOUT_PADDING | 127 MASTER_SCRIPT_TIMEOUT_PADDING |
| 127 | 128 |
| 128 // Capture SKPs | 129 // Capture SKPs |
| 129 REMOVE_INVALID_SKPS_TIMEOUT = 3 * time.Hour | 130 REMOVE_INVALID_SKPS_TIMEOUT = 3 * time.Hour |
| 130 // Setting a 2 day timeout since it may take a while to capture 1M SKPs. | 131 // Setting a 2 day timeout since it may take a while to capture 1M SKPs. |
| 131 CAPTURE_SKPS_TIMEOUT = 2 * 24 * time.Hour | 132 CAPTURE_SKPS_TIMEOUT = 2 * 24 * time.Hour |
| 132 MASTER_SCRIPT_CAPTURE_SKPS_TIMEOUT = CAPTURE_SKPS_TIMEOUT + MASTER_SCRIP
T_TIMEOUT_PADDING | 133 MASTER_SCRIPT_CAPTURE_SKPS_TIMEOUT = CAPTURE_SKPS_TIMEOUT + MASTER_SCRIP
T_TIMEOUT_PADDING |
| 133 | 134 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 CtTreeDir = filepath.Join(RepoDir, "go", "src", "go.skia.or
g", "infra", "ct") | 222 CtTreeDir = filepath.Join(RepoDir, "go", "src", "go.skia.or
g", "infra", "ct") |
| 222 | 223 |
| 223 // Names of remote directories and files. | 224 // Names of remote directories and files. |
| 224 LuaRunsDir = filepath.Join(TASKS_DIR_NAME, LUA_TASKS_DIR_NAME) | 225 LuaRunsDir = filepath.Join(TASKS_DIR_NAME, LUA_TASKS_DIR_NAME) |
| 225 BenchmarkRunsDir = filepath.Join(TASKS_DIR_NAME, BENCHMARK_TASKS_DIR_
NAME) | 226 BenchmarkRunsDir = filepath.Join(TASKS_DIR_NAME, BENCHMARK_TASKS_DIR_
NAME) |
| 226 ChromiumPerfRunsDir = filepath.Join(TASKS_DIR_NAME, CHROMIUM_PERF_TASKS_
DIR_NAME) | 227 ChromiumPerfRunsDir = filepath.Join(TASKS_DIR_NAME, CHROMIUM_PERF_TASKS_
DIR_NAME) |
| 227 FixArchivesRunsDir = filepath.Join(TASKS_DIR_NAME, FIX_ARCHIVE_TASKS_DI
R_NAME) | 228 FixArchivesRunsDir = filepath.Join(TASKS_DIR_NAME, FIX_ARCHIVE_TASKS_DI
R_NAME) |
| 228 | 229 |
| 229 // Information about the different CT benchmarks. | 230 // Information about the different CT benchmarks. |
| 230 BenchmarksToPagesetName = map[string]string{ | 231 BenchmarksToPagesetName = map[string]string{ |
| 231 » » BENCHMARK_SKPICTURE_PRINTER: "SkpicturePrinter", | 232 » » BENCHMARK_SKPICTURE_PRINTER: "skpicture_printer_ct", |
| 232 » » BENCHMARK_RR: "RasterizeAndRecordMicroCTPages", | 233 » » BENCHMARK_RR: "rasterize_and_record_micro_ct", |
| 233 » » BENCHMARK_REPAINT: "RepaintCTPages", | 234 » » BENCHMARK_REPAINT: "repaint_ct", |
| 234 » » BENCHMARK_SMOOTHNESS: "SmoothnessCTPages", | |
| 235 } | 235 } |
| 236 | 236 |
| 237 // Information about the different CT pageset types. | 237 // Information about the different CT pageset types. |
| 238 PagesetTypeToInfo = map[string]*PagesetTypeInfo{ | 238 PagesetTypeToInfo = map[string]*PagesetTypeInfo{ |
| 239 PAGESET_TYPE_ALL: &PagesetTypeInfo{ | 239 PAGESET_TYPE_ALL: &PagesetTypeInfo{ |
| 240 NumPages: 1000000, | 240 NumPages: 1000000, |
| 241 CSVSource: "csv/top-1m.csv", | 241 CSVSource: "csv/top-1m.csv", |
| 242 UserAgent: "desktop", | 242 UserAgent: "desktop", |
| 243 CreatePagesetsTimeoutSecs: 60, | 243 CreatePagesetsTimeoutSecs: 60, |
| 244 CaptureArchivesTimeoutSecs: 300, | 244 CaptureArchivesTimeoutSecs: 300, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 | 291 |
| 292 SupportedPageSetsToDesc = map[string]string{ | 292 SupportedPageSetsToDesc = map[string]string{ |
| 293 PLATFORM_LINUX: "Linux (100 Ubuntu12.04 machines)", | 293 PLATFORM_LINUX: "Linux (100 Ubuntu12.04 machines)", |
| 294 PLATFORM_ANDROID: "Android (100 N5 devices)", | 294 PLATFORM_ANDROID: "Android (100 N5 devices)", |
| 295 } | 295 } |
| 296 ) | 296 ) |
| 297 | 297 |
| 298 func NumWorkers() int { | 298 func NumWorkers() int { |
| 299 return len(Slaves) | 299 return len(Slaves) |
| 300 } | 300 } |
| OLD | NEW |