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

Side by Side Diff: scripts/slave/recipe_modules/goma/example.expected/linux.json

Issue 2291273005: Add counting the number of CPU's in goma module (Closed)
Patch Set: use 80 for linux Created 4 years, 3 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 [ 1 [
2 { 2 {
3 "cmd": [], 3 "cmd": [],
4 "name": "ensure_goma" 4 "name": "ensure_goma"
5 }, 5 },
6 { 6 {
7 "cmd": [ 7 "cmd": [
8 "python", 8 "python",
9 "-u", 9 "-u",
10 "RECIPE_MODULE[depot_tools::cipd]/resources/bootstrap.py", 10 "RECIPE_MODULE[depot_tools::cipd]/resources/bootstrap.py",
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 "@@@STEP_LOG_LINE@json.output@ }@@@", 54 "@@@STEP_LOG_LINE@json.output@ }@@@",
55 "@@@STEP_LOG_LINE@json.output@ ]@@@", 55 "@@@STEP_LOG_LINE@json.output@ ]@@@",
56 "@@@STEP_LOG_LINE@json.output@}@@@", 56 "@@@STEP_LOG_LINE@json.output@}@@@",
57 "@@@STEP_LOG_END@json.output@@@" 57 "@@@STEP_LOG_END@json.output@@@"
58 ] 58 ]
59 }, 59 },
60 { 60 {
61 "cmd": [ 61 "cmd": [
62 "python", 62 "python",
63 "-u", 63 "-u",
64 "\nimport multiprocessing\n\ntry:\n jobs = min(200, multiprocessing.cpu_c ount() * 10)\nexcept NotImplementedError:\n jobs = 50\n\nprint jobs\n"
65 ],
66 "name": "ensure_goma.get the number of cpus",
67 "stdout": "/path/to/tmp/",
68 "~followup_annotations": [
69 "@@@STEP_NEST_LEVEL@1@@@",
70 "@@@STEP_LOG_LINE@python.inline@@@@",
71 "@@@STEP_LOG_LINE@python.inline@import multiprocessing@@@",
72 "@@@STEP_LOG_LINE@python.inline@@@@",
73 "@@@STEP_LOG_LINE@python.inline@try:@@@",
74 "@@@STEP_LOG_LINE@python.inline@ jobs = min(200, multiprocessing.cpu_coun t() * 10)@@@",
75 "@@@STEP_LOG_LINE@python.inline@except NotImplementedError:@@@",
76 "@@@STEP_LOG_LINE@python.inline@ jobs = 50@@@",
77 "@@@STEP_LOG_LINE@python.inline@@@@",
78 "@@@STEP_LOG_LINE@python.inline@print jobs@@@",
79 "@@@STEP_LOG_END@python.inline@@@"
80 ]
81 },
82 {
83 "cmd": [
84 "echo",
85 "80"
86 ],
87 "name": "echo"
88 },
89 {
90 "cmd": [
91 "python",
92 "-u",
64 "[CACHE]/cipd/goma/goma_ctl.py", 93 "[CACHE]/cipd/goma/goma_ctl.py",
65 "restart" 94 "restart"
66 ], 95 ],
67 "env": { 96 "env": {
68 "GOMA_SERVICE_ACCOUNT_JSON_FILE": "/creds/service_accounts/service-account -goma-client.json" 97 "GOMA_SERVICE_ACCOUNT_JSON_FILE": "/creds/service_accounts/service-account -goma-client.json"
69 }, 98 },
70 "name": "start_goma" 99 "name": "start_goma"
71 }, 100 },
72 { 101 {
73 "cmd": [ 102 "cmd": [
74 "python", 103 "python",
75 "-u", 104 "-u",
76 "RECIPE_MODULE[build::goma]/resources/cloudtail_utils.py", 105 "RECIPE_MODULE[build::goma]/resources/cloudtail_utils.py",
77 "start", 106 "start",
78 "--cloudtail-path", 107 "--cloudtail-path",
79 "[CACHE]/cipd/goma/cloudtail" 108 "[CACHE]/cipd/goma/cloudtail"
80 ], 109 ],
81 "env": { 110 "env": {
82 "GOMA_SERVICE_ACCOUNT_JSON_FILE": "/creds/service_accounts/service-account -goma-client.json" 111 "GOMA_SERVICE_ACCOUNT_JSON_FILE": "/creds/service_accounts/service-account -goma-client.json"
83 }, 112 },
84 "name": "start cloudtail", 113 "name": "start cloudtail",
85 "stdout": "/path/to/tmp/" 114 "stdout": "/path/to/tmp/"
86 }, 115 },
87 { 116 {
88 "cmd": [ 117 "cmd": [
118 "echo",
119 "80"
120 ],
121 "name": "echo goma jobs"
122 },
123 {
124 "cmd": [
89 "python", 125 "python",
90 "-u", 126 "-u",
91 "[CACHE]/cipd/goma/goma_ctl.py", 127 "[CACHE]/cipd/goma/goma_ctl.py",
92 "jsonstatus", 128 "jsonstatus",
93 "[CACHE]/cipd/goma/jsonstatus" 129 "[CACHE]/cipd/goma/jsonstatus"
94 ], 130 ],
95 "env": { 131 "env": {
96 "GOMA_SERVICE_ACCOUNT_JSON_FILE": "/creds/service_accounts/service-account -goma-client.json" 132 "GOMA_SERVICE_ACCOUNT_JSON_FILE": "/creds/service_accounts/service-account -goma-client.json"
97 }, 133 },
98 "name": "goma_jsonstatus" 134 "name": "goma_jsonstatus"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 "12345" 191 "12345"
156 ], 192 ],
157 "name": "stop cloudtail" 193 "name": "stop cloudtail"
158 }, 194 },
159 { 195 {
160 "name": "$result", 196 "name": "$result",
161 "recipe_result": null, 197 "recipe_result": null,
162 "status_code": 0 198 "status_code": 0
163 } 199 }
164 ] 200 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698