Skip to content

Commit

Permalink
Showing 3 changed files with 25 additions and 5 deletions.
21 changes: 19 additions & 2 deletions ci.hocon
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
jt: [ruby, tool/jt.rb]

common-setup: [
[rm, -rf, mx.jruby],
[mx, sclone, --kind, git, "https://github.com/jruby/jruby-build-pack.git", jruby-build-pack],
[cp, bin/jruby.bash, bin/jruby],
[chmod, +x, bin/jruby],
@@ -36,6 +35,7 @@ no-graal: {

graal-core: {
setup: ${common-setup} [
[rm, -rf, mx.jruby],
[mkdir, graal-workspace],
[cd, graal-workspace],
[mx, sclone, --kind, git, "https://github.com/graalvm/graal-core.git", graal-core],
@@ -96,6 +96,18 @@ gate-caps: {
capabilities: [linux, amd64, gate, post-push]
}

bench-caps: {
capabilities: [x52, linux, amd64, bench]
}

metrics: {
run: [
[mx, benchmark, allocation],
[tool/truffle/post-process-results-json.rb, bench-results.json, bench-results-processed.json],
[cat, bench-results-processed.json]
]
}

builds: [
{name: ruby-test-fast} ${common} ${gate-caps} {run: [${jt} [test, fast]]},
{name: ruby-test-specs-command-line} ${common} ${gate-caps} {run: [${jt} [test, specs, ":command_line"]]},
@@ -106,6 +118,11 @@ builds: [
{name: ruby-test-integration} ${common} ${gate-caps} {run: [${jt} [test, integration]]},
{name: ruby-test-tck} ${common} ${gate-caps} {run: [${jt} [test, tck]]},
{name: ruby-tarball} ${common} ${gate-caps} {run: [${jt} [tarball]]},

{name: ruby-test-compiler-graal-core} ${common} ${graal-core} ${gate-caps} {run: [${jt} [test, compiler]]},
{name: ruby-test-compiler-graalvm} ${common} ${graalvm} ${gate-caps} {run: [${jt} [test, compiler]]}
{name: ruby-test-compiler-graalvm} ${common} ${graalvm} ${gate-caps} {run: [${jt} [test, compiler]]},

{name: ruby-test-metrics-noindy} ${common} ${no-graal} ${bench-caps} ${jruby-noindy} ${metrics},
{name: ruby-test-metrics-indy} ${common} ${no-graal} ${bench-caps} ${jruby-indy} ${metrics},
{name: ruby-test-metrics-truffle} ${common} ${no-graal} ${bench-caps} ${jruby-truffle} ${metrics}
]
3 changes: 2 additions & 1 deletion mx.jruby/mx_jruby.py
Original file line number Diff line number Diff line change
@@ -170,7 +170,8 @@ def runBenchmark(self, benchmark, bmSuiteArgs):
'metric.name': 'memory',
'metric.value': data['median'],
'metric.unit': 'B',
'extra.metric.error-num': data['error']
'extra.metric.error-num': data['error'],
'extra.metric.human': data['human']
}

return result
6 changes: 4 additions & 2 deletions tool/jt.rb
Original file line number Diff line number Diff line change
@@ -763,13 +763,15 @@ def metrics_alloc(*args)
range = samples.max - samples.min
error = range / 2
median = samples.min + error
human_readable = "#{Utilities.human_size(median)} ± #{Utilities.human_size(error)}"
if use_json
puts JSON.generate({
median: median,
error: error
error: error,
human: human_readable
})
else
puts "#{Utilities.human_size(median)} ± #{Utilities.human_size(error)}"
puts human_readable
end
end

0 comments on commit 009ea4f

Please sign in to comment.