Skip to content

Commit 4d29fa8

Browse files
committed
Abstract away job name suffix generation (JDK-machine-os-arch)
1 parent 29d1c48 commit 4d29fa8

File tree

2 files changed

+37
-30
lines changed

2 files changed

+37
-30
lines changed

ci/ci_common/common-utils.libsonnet

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010
hyphenize(a_list)::
1111
std.join("-", std.filterMap(function(el) el != null, function(el) std.toString(el), a_list)),
1212

13+
# generate a string that describes the specific hardware being executed on with format: <jdk_name>-<machine_name>-<os>-<arch>
14+
jdk_and_hardware(build)::
15+
self.hyphenize([
16+
if std.objectHasAll(build, 'jdk_name') then build.jdk_name else null,
17+
if std.objectHasAll(build, 'machine_name') then build.machine_name else null,
18+
if std.objectHasAll(build, 'os') then build.os else null,
19+
if std.objectHasAll(build, 'arch') then build.arch else null,
20+
]),
21+
1322
# Pattern for a guard.includes clause that captures all top-level CI files.
1423
top_level_ci:: ["*.json", "*.jsonnet", "*.libsonnet", "ci/**"],
1524

vm/ci/ci_common/common-bench.jsonnet

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -275,41 +275,39 @@ local repo_config = import '../../../ci/repo-configuration.libsonnet';
275275

276276
vm_bench_polybench_nfi_linux_amd64: self.vm_bench_common + vm_common.svm_common + self.vm_bench_polybench_nfi,
277277

278-
local hardware_name(b) = utils.hyphenize([b.jdk_name, if std.objectHasAll(b, 'machine_name') then b.machine_name else null, b.os, b.arch]),
279-
280278
local builds = [
281279
# We used to expand `${common_vm_linux}` here to work around some limitations in the version of pyhocon that we use in the CI
282-
vm_common.vm_base('linux', 'amd64', 'ondemand', bench=true) + self.vm_bench_js_linux_amd64('octane') + {name: 'ondemand-bench-vm-' + vm.vm_setup.short_name + '-js-octane-' + hardware_name(self)},
283-
vm_common.vm_base('linux', 'amd64', 'ondemand', bench=true) + self.vm_bench_js_linux_amd64('jetstream') + {name: 'ondemand-bench-vm-' + vm.vm_setup.short_name + '-js-jetstream-' + hardware_name(self)},
284-
vm_common.vm_base('linux', 'amd64', 'ondemand', bench=true) + self.vm_bench_js_linux_amd64('jetstream2') + {name: 'ondemand-bench-vm-' + vm.vm_setup.short_name + '-js-jetstream2-' + hardware_name(self)},
285-
vm_common.vm_base('linux', 'amd64', 'ondemand', bench=true) + self.vm_bench_js_linux_amd64('micro') + {name: 'ondemand-bench-vm-' + vm.vm_setup.short_name + '-js-micro-' + hardware_name(self)},
286-
vm_common.vm_base('linux', 'amd64', 'ondemand', bench=true) + self.vm_bench_js_linux_amd64('v8js') + {name: 'ondemand-bench-vm-' + vm.vm_setup.short_name + '-js-v8js-' + hardware_name(self)},
287-
vm_common.vm_base('linux', 'amd64', 'ondemand', bench=true) + self.vm_bench_js_linux_amd64('misc') + {name: 'ondemand-bench-vm-' + vm.vm_setup.short_name + '-js-misc-' + hardware_name(self)},
288-
vm_common.vm_base('linux', 'amd64', 'ondemand', bench=true) + self.vm_bench_js_linux_amd64('npm-regex') + {name: 'ondemand-bench-vm-' + vm.vm_setup.short_name + '-js-npm-regex-' + hardware_name(self)},
289-
290-
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybench_linux_interpreter + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybench-' + hardware_name(self), notify_groups:: ['polybench']},
291-
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybench_linux_compiler + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybench-compiler-' + hardware_name(self), notify_groups:: ['polybench']},
292-
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybench_linux_context_init + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybench-context-init-' + hardware_name(self), notify_groups:: ['polybench']},
293-
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybench_linux_warmup + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybench-warmup-' + hardware_name(self), notify_groups:: ['polybench']},
294-
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybench_linux_memory + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybench-memory-' + hardware_name(self), notify_groups:: ['polybench'] },
280+
vm_common.vm_base('linux', 'amd64', 'ondemand', bench=true) + self.vm_bench_js_linux_amd64('octane') + {name: 'ondemand-bench-vm-' + vm.vm_setup.short_name + '-js-octane-' + utils.jdk_and_hardware(self)},
281+
vm_common.vm_base('linux', 'amd64', 'ondemand', bench=true) + self.vm_bench_js_linux_amd64('jetstream') + {name: 'ondemand-bench-vm-' + vm.vm_setup.short_name + '-js-jetstream-' + utils.jdk_and_hardware(self)},
282+
vm_common.vm_base('linux', 'amd64', 'ondemand', bench=true) + self.vm_bench_js_linux_amd64('jetstream2') + {name: 'ondemand-bench-vm-' + vm.vm_setup.short_name + '-js-jetstream2-' + utils.jdk_and_hardware(self)},
283+
vm_common.vm_base('linux', 'amd64', 'ondemand', bench=true) + self.vm_bench_js_linux_amd64('micro') + {name: 'ondemand-bench-vm-' + vm.vm_setup.short_name + '-js-micro-' + utils.jdk_and_hardware(self)},
284+
vm_common.vm_base('linux', 'amd64', 'ondemand', bench=true) + self.vm_bench_js_linux_amd64('v8js') + {name: 'ondemand-bench-vm-' + vm.vm_setup.short_name + '-js-v8js-' + utils.jdk_and_hardware(self)},
285+
vm_common.vm_base('linux', 'amd64', 'ondemand', bench=true) + self.vm_bench_js_linux_amd64('misc') + {name: 'ondemand-bench-vm-' + vm.vm_setup.short_name + '-js-misc-' + utils.jdk_and_hardware(self)},
286+
vm_common.vm_base('linux', 'amd64', 'ondemand', bench=true) + self.vm_bench_js_linux_amd64('npm-regex') + {name: 'ondemand-bench-vm-' + vm.vm_setup.short_name + '-js-npm-regex-' + utils.jdk_and_hardware(self)},
287+
288+
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybench_linux_interpreter + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybench-' + utils.jdk_and_hardware(self), notify_groups:: ['polybench']},
289+
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybench_linux_compiler + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybench-compiler-' + utils.jdk_and_hardware(self), notify_groups:: ['polybench']},
290+
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybench_linux_context_init + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybench-context-init-' + utils.jdk_and_hardware(self), notify_groups:: ['polybench']},
291+
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybench_linux_warmup + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybench-warmup-' + utils.jdk_and_hardware(self), notify_groups:: ['polybench']},
292+
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybench_linux_memory + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybench-memory-' + utils.jdk_and_hardware(self), notify_groups:: ['polybench'] },
295293

296294
# Produces the graalvm-with-polybench artifact
297-
vm_common.vm_base('linux', 'amd64', 'ondemand') + self.vm_bench_polybenchmarks_linux_build + {name: 'ondemand-vm-build-' + vm.vm_setup.short_name + '-with-polybench-' + hardware_name(self), notify_groups:: ['polybench']},
295+
vm_common.vm_base('linux', 'amd64', 'ondemand') + self.vm_bench_polybenchmarks_linux_build + {name: 'ondemand-vm-build-' + vm.vm_setup.short_name + '-with-polybench-' + utils.jdk_and_hardware(self), notify_groups:: ['polybench']},
298296

299297
# Consume the graalvm-with-polybench artifact
300-
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybenchmarks_linux_common(vm_config='native') + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybenchmarks-default-native-' + hardware_name(self), notify_groups:: ['polybench']},
301-
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybenchmarks_linux_common(vm_config='jvm') + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybenchmarks-default-jvm-' + hardware_name(self), notify_groups:: ['polybench']},
302-
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybenchmarks_linux_common(vm_config='native', suite='awfy:r[.*py]') + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybenchmarks-awfy-py-native-' + hardware_name(self), notify_groups:: ['polybench']},
303-
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybenchmarks_linux_common(vm_config='jvm', suite='awfy:r[.*py]') + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybenchmarks-awfy-py-jvm-' + hardware_name(self), notify_groups:: ['polybench']},
304-
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybenchmarks_linux_common(vm_config='native', suite='awfy:r[.*rb]') + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybenchmarks-awfy-rb-native-' + hardware_name(self), notify_groups:: ['polybench']},
305-
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybenchmarks_linux_common(vm_config='jvm', suite='awfy:r[.*rb]') + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybenchmarks-awfy-rb-jvm-' + hardware_name(self), notify_groups:: ['polybench']},
306-
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybenchmarks_linux_common(vm_config='native', suite='awfy:r[.*jar]') + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybenchmarks-awfy-jar-native-' + hardware_name(self), notify_groups:: ['polybench']},
307-
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybenchmarks_linux_common(vm_config='jvm', suite='awfy:r[.*jar]') + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybenchmarks-awfy-jar-jvm-' + hardware_name(self), notify_groups:: ['polybench']},
298+
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybenchmarks_linux_common(vm_config='native') + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybenchmarks-default-native-' + utils.jdk_and_hardware(self), notify_groups:: ['polybench']},
299+
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybenchmarks_linux_common(vm_config='jvm') + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybenchmarks-default-jvm-' + utils.jdk_and_hardware(self), notify_groups:: ['polybench']},
300+
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybenchmarks_linux_common(vm_config='native', suite='awfy:r[.*py]') + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybenchmarks-awfy-py-native-' + utils.jdk_and_hardware(self), notify_groups:: ['polybench']},
301+
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybenchmarks_linux_common(vm_config='jvm', suite='awfy:r[.*py]') + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybenchmarks-awfy-py-jvm-' + utils.jdk_and_hardware(self), notify_groups:: ['polybench']},
302+
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybenchmarks_linux_common(vm_config='native', suite='awfy:r[.*rb]') + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybenchmarks-awfy-rb-native-' + utils.jdk_and_hardware(self), notify_groups:: ['polybench']},
303+
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybenchmarks_linux_common(vm_config='jvm', suite='awfy:r[.*rb]') + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybenchmarks-awfy-rb-jvm-' + utils.jdk_and_hardware(self), notify_groups:: ['polybench']},
304+
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybenchmarks_linux_common(vm_config='native', suite='awfy:r[.*jar]') + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybenchmarks-awfy-jar-native-' + utils.jdk_and_hardware(self), notify_groups:: ['polybench']},
305+
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybenchmarks_linux_common(vm_config='jvm', suite='awfy:r[.*jar]') + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybenchmarks-awfy-jar-jvm-' + utils.jdk_and_hardware(self), notify_groups:: ['polybench']},
308306

309-
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybench_nfi_linux_amd64 + vm.vm_java_21 + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybench-nfi-java21-' + hardware_name(self), notify_groups:: ['polybench']},
307+
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_polybench_nfi_linux_amd64 + vm.vm_java_21 + {name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-polybench-nfi-java21-' + utils.jdk_and_hardware(self), notify_groups:: ['polybench']},
310308

311-
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.js_bench_compilation_throughput(true) + vm.vm_java_Latest + { name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-libgraal-pgo-throughput-js-typescript-' + hardware_name(self) },
312-
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.js_bench_compilation_throughput(false) + vm.vm_java_Latest + { name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-libgraal-no-pgo-throughput-js-typescript-' + hardware_name(self) },
309+
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.js_bench_compilation_throughput(true) + vm.vm_java_Latest + { name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-libgraal-pgo-throughput-js-typescript-' + utils.jdk_and_hardware(self) },
310+
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.js_bench_compilation_throughput(false) + vm.vm_java_Latest + { name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-libgraal-no-pgo-throughput-js-typescript-' + utils.jdk_and_hardware(self) },
313311

314312
vm_common.vm_base('linux', 'amd64', 'daily', bench=true) + self.vm_bench_js_linux_amd64() + {
315313
# Override `self.vm_bench_js_linux_amd64.run`
@@ -320,12 +318,12 @@ local repo_config = import '../../../ci/repo-configuration.libsonnet';
320318
$.vm_bench_common.upload,
321319
],
322320
timelimit: '45:00',
323-
name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-agentscript-js-' + hardware_name(self),
321+
name: 'daily-bench-vm-' + vm.vm_setup.short_name + '-agentscript-js-' + utils.jdk_and_hardware(self),
324322
notify_groups:: ['javascript'],
325323
},
326324

327-
vm_common.vm_base('linux', 'amd64', 'gate') + self.vm_bench_polybenchmarks_linux_common(is_gate=true, shape='e4_36_256') + {name: 'gate-vm-' + vm.vm_setup.short_name + '-polybenchmarks-' + hardware_name(self)},
328-
vm_common.vm_base('linux', 'amd64', 'gate') + self.vm_gate_polybench_linux + {name: 'gate-vm-' + vm.vm_setup.short_name + '-polybench-' + hardware_name(self)},
325+
vm_common.vm_base('linux', 'amd64', 'gate') + self.vm_bench_polybenchmarks_linux_common(is_gate=true, shape='e4_36_256') + {name: 'gate-vm-' + vm.vm_setup.short_name + '-polybenchmarks-' + utils.jdk_and_hardware(self)},
326+
vm_common.vm_base('linux', 'amd64', 'gate') + self.vm_gate_polybench_linux + {name: 'gate-vm-' + vm.vm_setup.short_name + '-polybench-' + utils.jdk_and_hardware(self)},
329327
],
330328

331329
builds: utils.add_defined_in(builds, std.thisFile),

0 commit comments

Comments
 (0)