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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // worker timeouts. | 115 // worker timeouts. |
116 MASTER_SCRIPT_TIMEOUT_PADDING = 30 * time.Minute | 116 MASTER_SCRIPT_TIMEOUT_PADDING = 30 * time.Minute |
117 | 117 |
118 // Build Chromium Task | 118 // Build Chromium Task |
119 GIT_LOG_TIMEOUT = 5 * time.Minute | 119 GIT_LOG_TIMEOUT = 5 * time.Minute |
120 MASTER_SCRIPT_BUILD_CHROMIUM_TIMEOUT = CREATE_CHROMIUM_BUILD_TIMEOUT + G
IT_LOG_TIMEOUT + | 120 MASTER_SCRIPT_BUILD_CHROMIUM_TIMEOUT = CREATE_CHROMIUM_BUILD_TIMEOUT + G
IT_LOG_TIMEOUT + |
121 MASTER_SCRIPT_TIMEOUT_PADDING | 121 MASTER_SCRIPT_TIMEOUT_PADDING |
122 | 122 |
123 // Capture Archives | 123 // Capture Archives |
124 // Setting a 5 day timeout since it may take a while to capture 1M archi
ves. | 124 // Setting a 5 day timeout since it may take a while to capture 1M archi
ves. |
| 125 CAPTURE_ARCHIVES_DEFAULT_CT_BENCHMARK = "rasterize_and_record_micro_ct" |
125 CAPTURE_ARCHIVES_TIMEOUT = 5 * 24 * time.Hour | 126 CAPTURE_ARCHIVES_TIMEOUT = 5 * 24 * time.Hour |
126 MASTER_SCRIPT_CAPTURE_ARCHIVES_TIMEOUT = CAPTURE_ARCHIVES_TIMEOUT + | 127 MASTER_SCRIPT_CAPTURE_ARCHIVES_TIMEOUT = CAPTURE_ARCHIVES_TIMEOUT + |
127 MASTER_SCRIPT_TIMEOUT_PADDING | 128 MASTER_SCRIPT_TIMEOUT_PADDING |
128 | 129 |
129 // Capture SKPs | 130 // Capture SKPs |
130 REMOVE_INVALID_SKPS_TIMEOUT = 3 * time.Hour | 131 REMOVE_INVALID_SKPS_TIMEOUT = 3 * time.Hour |
131 // Setting a 2 day timeout since it may take a while to capture 1M SKPs. | 132 // Setting a 2 day timeout since it may take a while to capture 1M SKPs. |
132 CAPTURE_SKPS_TIMEOUT = 2 * 24 * time.Hour | 133 CAPTURE_SKPS_TIMEOUT = 2 * 24 * time.Hour |
133 MASTER_SCRIPT_CAPTURE_SKPS_TIMEOUT = CAPTURE_SKPS_TIMEOUT + MASTER_SCRIP
T_TIMEOUT_PADDING | 134 MASTER_SCRIPT_CAPTURE_SKPS_TIMEOUT = CAPTURE_SKPS_TIMEOUT + MASTER_SCRIP
T_TIMEOUT_PADDING |
134 | 135 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 CtTreeDir = filepath.Join(RepoDir, "go", "src", "go.skia.or
g", "infra", "ct") | 223 CtTreeDir = filepath.Join(RepoDir, "go", "src", "go.skia.or
g", "infra", "ct") |
223 | 224 |
224 // Names of remote directories and files. | 225 // Names of remote directories and files. |
225 LuaRunsDir = filepath.Join(TASKS_DIR_NAME, LUA_TASKS_DIR_NAME) | 226 LuaRunsDir = filepath.Join(TASKS_DIR_NAME, LUA_TASKS_DIR_NAME) |
226 BenchmarkRunsDir = filepath.Join(TASKS_DIR_NAME, BENCHMARK_TASKS_DIR_
NAME) | 227 BenchmarkRunsDir = filepath.Join(TASKS_DIR_NAME, BENCHMARK_TASKS_DIR_
NAME) |
227 ChromiumPerfRunsDir = filepath.Join(TASKS_DIR_NAME, CHROMIUM_PERF_TASKS_
DIR_NAME) | 228 ChromiumPerfRunsDir = filepath.Join(TASKS_DIR_NAME, CHROMIUM_PERF_TASKS_
DIR_NAME) |
228 FixArchivesRunsDir = filepath.Join(TASKS_DIR_NAME, FIX_ARCHIVE_TASKS_DI
R_NAME) | 229 FixArchivesRunsDir = filepath.Join(TASKS_DIR_NAME, FIX_ARCHIVE_TASKS_DI
R_NAME) |
229 | 230 |
230 // Information about the different CT benchmarks. | 231 // Information about the different CT benchmarks. |
231 BenchmarksToPagesetName = map[string]string{ | 232 BenchmarksToPagesetName = map[string]string{ |
232 » » BENCHMARK_DRAW_PROPERTIES: "DrawPropertiesCTPages", | 233 » » BENCHMARK_SKPICTURE_PRINTER: "skpicture_printer_ct", |
233 » » BENCHMARK_SKPICTURE_PRINTER: "SkpicturePrinter", | 234 » » BENCHMARK_RR: "rasterize_and_record_micro_ct", |
234 » » BENCHMARK_RR: "RasterizeAndRecordMicroCTPages", | 235 » » BENCHMARK_REPAINT: "repaint_ct", |
235 » » BENCHMARK_REPAINT: "RepaintCTPages", | |
236 » » BENCHMARK_SMOOTHNESS: "SmoothnessCTPages", | |
237 } | 236 } |
238 | 237 |
239 // Information about the different CT pageset types. | 238 // Information about the different CT pageset types. |
240 PagesetTypeToInfo = map[string]*PagesetTypeInfo{ | 239 PagesetTypeToInfo = map[string]*PagesetTypeInfo{ |
241 PAGESET_TYPE_ALL: &PagesetTypeInfo{ | 240 PAGESET_TYPE_ALL: &PagesetTypeInfo{ |
242 NumPages: 1000000, | 241 NumPages: 1000000, |
243 CSVSource: "csv/top-1m.csv", | 242 CSVSource: "csv/top-1m.csv", |
244 UserAgent: "desktop", | 243 UserAgent: "desktop", |
245 CreatePagesetsTimeoutSecs: 60, | 244 CreatePagesetsTimeoutSecs: 60, |
246 CaptureArchivesTimeoutSecs: 300, | 245 CaptureArchivesTimeoutSecs: 300, |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 PLATFORM_LINUX: "Linux (100 Ubuntu12.04 machines)", | 290 PLATFORM_LINUX: "Linux (100 Ubuntu12.04 machines)", |
292 PLATFORM_ANDROID: "Android (100 N5 devices)", | 291 PLATFORM_ANDROID: "Android (100 N5 devices)", |
293 } | 292 } |
294 | 293 |
295 SupportedPageSetsToDesc = map[string]string{ | 294 SupportedPageSetsToDesc = map[string]string{ |
296 PLATFORM_LINUX: "Linux (100 Ubuntu12.04 machines)", | 295 PLATFORM_LINUX: "Linux (100 Ubuntu12.04 machines)", |
297 PLATFORM_ANDROID: "Android (100 N5 devices)", | 296 PLATFORM_ANDROID: "Android (100 N5 devices)", |
298 } | 297 } |
299 ) | 298 ) |
300 | 299 |
| 300 type PagesetVars struct { |
| 301 UrlsList string `json:"urls_list"` |
| 302 UserAgent string `json:"user_agent"` |
| 303 ArchiveDataFile string `json:"archive_data_file"` |
| 304 } |
| 305 |
301 func NumWorkers() int { | 306 func NumWorkers() int { |
302 return len(Slaves) | 307 return len(Slaves) |
303 } | 308 } |
OLD | NEW |