OLD | NEW |
---|---|
1 package util | 1 package util |
2 | 2 |
3 import "path/filepath" | |
4 | |
3 const ( | 5 const ( |
4 // TODO(rmistry): Switch this to use chrome-bot when ready to run in pro d | 6 // TODO(rmistry): Switch this to use chrome-bot when ready to run in pro d |
5 » CT_USER = "rmistry" | 7 » CT_USER = "rmistry" |
jcgregorio
2014/12/03 19:22:14
Looks like a dup from the other CL?
rmistry
2014/12/03 19:23:19
Yes, this file is the only dupe it will go away af
| |
6 » NUM_WORKERS int = 100 | 8 » NUM_WORKERS int = 100 |
9 » WORKER_NAME_TEMPLATE = "build%s-m5" | |
10 » GS_BUCKET_NAME = "cluster-telemetry" | |
11 | |
12 » // File names and dir names. | |
13 » TIMESTAMP_FILE_NAME = "TIMESTAMP" | |
14 » PAGESETS_DIR_NAME = "page_sets" | |
15 » WEB_ARCHIVES_DIR_NAME = "webpage_archives" | |
16 » SKPS_DIR_NAME = "skp" | |
17 | |
18 » // Limit the number of times CT tries to get a remote file before giving up. | |
19 » MAX_URI_GET_TRIES = 4 | |
20 | |
21 » // Activity constants. | |
22 » ACTIVITY_CREATING_PAGESETS = "CREATING_PAGESETS" | |
23 » ACTIVITY_CAPTURING_ARCHIVES = "CAPTURING_ARCHIVES" | |
24 » ACTIVITY_RUNNING_BENCHMARKS = "RUNNING_BENCHMARKS" | |
25 » ACTIVITY_RUNNING_LUA_SCRIPTS = "RUNNING_LUA_SCRIPTS" | |
26 | |
27 » // Pageset types supported by CT. | |
28 » PAGESET_TYPE_ALL = "All" | |
29 » PAGESET_TYPE_10k = "10k" | |
30 » PAGESET_TYPE_MOBILE_10k = "Mobile10k" | |
31 » PAGESET_TYPE_DUMMY_10k = "Dummy10k" // Used for testing. | |
7 ) | 32 ) |
8 | 33 |
34 type PagesetTypeInfo struct { | |
35 NumPages int | |
36 CSVSource string | |
37 UserAgent string | |
38 } | |
39 | |
9 var ( | 40 var ( |
10 // Slaves = GetCTWorkers() | 41 // Slaves = GetCTWorkers() |
11 // TODO(rmistry): Switch this to use GetCTWorkers() when ready to run in prod | 42 // TODO(rmistry): Switch this to use GetCTWorkers() when ready to run in prod |
12 Slaves = []string{ | 43 Slaves = []string{ |
13 "epoger-linux.cnc.corp.google.com", | 44 "epoger-linux.cnc.corp.google.com", |
14 "piraeus.cnc.corp.google.com", | 45 "piraeus.cnc.corp.google.com", |
15 "172.23.212.25", | 46 "172.23.212.25", |
16 } | 47 } |
48 | |
49 // Names of local directories and files. | |
50 StorageDir = filepath.Join("/", "b", "storage") | |
51 TaskFileDir = filepath.Join(StorageDir, "current_task") | |
52 GSTokenPath = filepath.Join(StorageDir, "google_storage_token.data") | |
53 PagesetsDir = filepath.Join(StorageDir, PAGESETS_DIR_NAME) | |
54 WebArchivesDir = filepath.Join(StorageDir, WEB_ARCHIVES_DIR_NAME) | |
55 SkpsDir = filepath.Join(StorageDir, SKPS_DIR_NAME) | |
56 | |
57 // Information about the different CT pageset types. | |
58 PagesetTypeToInfo = map[string]*PagesetTypeInfo{ | |
59 PAGESET_TYPE_ALL: &PagesetTypeInfo{ | |
60 NumPages: 1000000, | |
61 CSVSource: "csv/top-1m.csv", | |
62 UserAgent: "desktop"}, | |
63 PAGESET_TYPE_10k: &PagesetTypeInfo{ | |
64 NumPages: 10000, | |
65 CSVSource: "csv/top-1m.csv", | |
66 UserAgent: "desktop"}, | |
67 PAGESET_TYPE_MOBILE_10k: &PagesetTypeInfo{ | |
68 NumPages: 10000, | |
69 CSVSource: "csv/android-top-1m.csv", | |
70 UserAgent: "mobile"}, | |
71 PAGESET_TYPE_DUMMY_10k: &PagesetTypeInfo{ | |
72 NumPages: 10000, | |
73 CSVSource: "csv/android-top-1m.csv", | |
74 UserAgent: "mobile"}, | |
75 } | |
17 ) | 76 ) |
OLD | NEW |