Skip to content
Snippets Groups Projects
Commit bd24a461 authored by Craig Tiller's avatar Craig Tiller
Browse files

Better guesses at benchmarks turned unit tests cpu cost

parent 3c62c555
No related branches found
No related tags found
No related merge requests found
...@@ -46,6 +46,24 @@ import performance.scenario_config as scenario_config ...@@ -46,6 +46,24 @@ import performance.scenario_config as scenario_config
def _scenario_json_string(scenario_json): def _scenario_json_string(scenario_json):
return json.dumps(scenario_config.remove_nonproto_fields(scenario_json)) return json.dumps(scenario_config.remove_nonproto_fields(scenario_json))
def threads_of_type(scenario_json, path):
d = scenario_json
for el in path.split('/'):
if el not in d:
return 0
d = d[el]
return d
def guess_cpu(scenario_json):
client = threads_of_type(scenario_json, 'client_config/async_client_threads')
server = threads_of_type(scenario_json, 'server_config/async_server_threads')
# make an arbitrary guess if set to auto-detect
# about the size of the jenkins instances we have for unit tests
if client == 0: client = 8
if server == 0: server = 8
return (scenario_json['num_clients'] * client +
scenario_json['num_servers'] * server)
print yaml.dump({ print yaml.dump({
'tests': [ 'tests': [
{ {
...@@ -59,7 +77,7 @@ print yaml.dump({ ...@@ -59,7 +77,7 @@ print yaml.dump({
'language': 'c++', 'language': 'c++',
'boringssl': True, 'boringssl': True,
'defaults': 'boringssl', 'defaults': 'boringssl',
'cpu_cost': 1000.0, 'cpu_cost': guess_cpu(scenario_json),
'exclude_configs': [] 'exclude_configs': []
} }
for scenario_json in scenario_config.CXXLanguage().scenarios() for scenario_json in scenario_config.CXXLanguage().scenarios()
......
...@@ -23031,7 +23031,7 @@ ...@@ -23031,7 +23031,7 @@
"posix", "posix",
"windows" "windows"
], ],
"cpu_cost": 1000.0, "cpu_cost": 2,
"defaults": "boringssl", "defaults": "boringssl",
"exclude_configs": [], "exclude_configs": [],
"flaky": false, "flaky": false,
...@@ -23057,7 +23057,7 @@ ...@@ -23057,7 +23057,7 @@
"posix", "posix",
"windows" "windows"
], ],
"cpu_cost": 1000.0, "cpu_cost": 2,
"defaults": "boringssl", "defaults": "boringssl",
"exclude_configs": [], "exclude_configs": [],
"flaky": false, "flaky": false,
...@@ -23083,7 +23083,7 @@ ...@@ -23083,7 +23083,7 @@
"posix", "posix",
"windows" "windows"
], ],
"cpu_cost": 1000.0, "cpu_cost": 2,
"defaults": "boringssl", "defaults": "boringssl",
"exclude_configs": [], "exclude_configs": [],
"flaky": false, "flaky": false,
...@@ -23109,7 +23109,7 @@ ...@@ -23109,7 +23109,7 @@
"posix", "posix",
"windows" "windows"
], ],
"cpu_cost": 1000.0, "cpu_cost": 2,
"defaults": "boringssl", "defaults": "boringssl",
"exclude_configs": [], "exclude_configs": [],
"flaky": false, "flaky": false,
...@@ -23135,7 +23135,7 @@ ...@@ -23135,7 +23135,7 @@
"posix", "posix",
"windows" "windows"
], ],
"cpu_cost": 1000.0, "cpu_cost": 8,
"defaults": "boringssl", "defaults": "boringssl",
"exclude_configs": [], "exclude_configs": [],
"flaky": false, "flaky": false,
...@@ -23161,7 +23161,7 @@ ...@@ -23161,7 +23161,7 @@
"posix", "posix",
"windows" "windows"
], ],
"cpu_cost": 1000.0, "cpu_cost": 8,
"defaults": "boringssl", "defaults": "boringssl",
"exclude_configs": [], "exclude_configs": [],
"flaky": false, "flaky": false,
...@@ -23187,7 +23187,7 @@ ...@@ -23187,7 +23187,7 @@
"posix", "posix",
"windows" "windows"
], ],
"cpu_cost": 1000.0, "cpu_cost": 8,
"defaults": "boringssl", "defaults": "boringssl",
"exclude_configs": [], "exclude_configs": [],
"flaky": false, "flaky": false,
...@@ -23213,7 +23213,7 @@ ...@@ -23213,7 +23213,7 @@
"posix", "posix",
"windows" "windows"
], ],
"cpu_cost": 1000.0, "cpu_cost": 1,
"defaults": "boringssl", "defaults": "boringssl",
"exclude_configs": [], "exclude_configs": [],
"flaky": false, "flaky": false,
...@@ -23239,7 +23239,7 @@ ...@@ -23239,7 +23239,7 @@
"posix", "posix",
"windows" "windows"
], ],
"cpu_cost": 1000.0, "cpu_cost": 2,
"defaults": "boringssl", "defaults": "boringssl",
"exclude_configs": [], "exclude_configs": [],
"flaky": false, "flaky": false,
...@@ -23265,7 +23265,7 @@ ...@@ -23265,7 +23265,7 @@
"posix", "posix",
"windows" "windows"
], ],
"cpu_cost": 1000.0, "cpu_cost": 2,
"defaults": "boringssl", "defaults": "boringssl",
"exclude_configs": [], "exclude_configs": [],
"flaky": false, "flaky": false,
...@@ -23291,7 +23291,7 @@ ...@@ -23291,7 +23291,7 @@
"posix", "posix",
"windows" "windows"
], ],
"cpu_cost": 1000.0, "cpu_cost": 2,
"defaults": "boringssl", "defaults": "boringssl",
"exclude_configs": [], "exclude_configs": [],
"flaky": false, "flaky": false,
...@@ -23317,7 +23317,7 @@ ...@@ -23317,7 +23317,7 @@
"posix", "posix",
"windows" "windows"
], ],
"cpu_cost": 1000.0, "cpu_cost": 2,
"defaults": "boringssl", "defaults": "boringssl",
"exclude_configs": [], "exclude_configs": [],
"flaky": false, "flaky": false,
...@@ -23343,7 +23343,7 @@ ...@@ -23343,7 +23343,7 @@
"posix", "posix",
"windows" "windows"
], ],
"cpu_cost": 1000.0, "cpu_cost": 8,
"defaults": "boringssl", "defaults": "boringssl",
"exclude_configs": [], "exclude_configs": [],
"flaky": false, "flaky": false,
...@@ -23369,7 +23369,7 @@ ...@@ -23369,7 +23369,7 @@
"posix", "posix",
"windows" "windows"
], ],
"cpu_cost": 1000.0, "cpu_cost": 8,
"defaults": "boringssl", "defaults": "boringssl",
"exclude_configs": [], "exclude_configs": [],
"flaky": false, "flaky": false,
...@@ -23395,7 +23395,7 @@ ...@@ -23395,7 +23395,7 @@
"posix", "posix",
"windows" "windows"
], ],
"cpu_cost": 1000.0, "cpu_cost": 8,
"defaults": "boringssl", "defaults": "boringssl",
"exclude_configs": [], "exclude_configs": [],
"flaky": false, "flaky": false,
...@@ -23421,7 +23421,7 @@ ...@@ -23421,7 +23421,7 @@
"posix", "posix",
"windows" "windows"
], ],
"cpu_cost": 1000.0, "cpu_cost": 1,
"defaults": "boringssl", "defaults": "boringssl",
"exclude_configs": [], "exclude_configs": [],
"flaky": false, "flaky": false,
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment