Skip to content

Commit a7fafd7

Browse files
committed
[GR-17457] Pass benchmark flags in the order they are printed for clarity
PullRequest: truffleruby/2396
2 parents ff7a2b2 + a251e9c commit a7fafd7

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

bench/benchmark-interface/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,8 @@ loop printing the iterations per second as it goes. By default it runs for
164164
10s, printing the time every second, but you can use options like `--time 60`
165165
to run for 60 seconds, and `--freq 0.1` to print ten times a second.
166166

167-
You can also print the elapsed time since the benchmark started with the
168-
`--elapsed` flag, and the actual number of iterations with the `--iterations`
169-
flag.
167+
You can also print the actual number of iterations with the `--iterations` flag
168+
and the elapsed time since the benchmark started with the `--elapsed` flag.
170169

171170
#### `bm` and `bmbm`
172171

bench/rails/blog6-bundle-install.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# This is a long running benchmark and should
22
# be run using fixed iterations. E.g.
3-
# jt benchmark bench/rails/blog6-bundle-install.rb --elapsed --iterations --ips --fixed-iterations 1
4-
# RUBY_BENCHMARKS=true jt mx benchmark ecosystem
5-
#
3+
# jt benchmark bench/rails/blog6-bundle-install.rb --iterations --elapsed --ips --fixed-iterations 1
4+
# RUBY_BENCHMARKS=true jt mx benchmark ruby-warmup:rails/blog6-bundle-install
65

76
require_relative './blog6-setup.rb'
87

bench/rails/blog6-rails-routes.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# This is a long running benchmark and should
22
# be run using fixed iterations. E.g.
3-
# jt benchmark bench/rails/blog6-rails-routes.rb --elapsed --iterations --ips --fixed-iterations 1
4-
# RUBY_BENCHMARKS=true jt mx benchmark ecosystem
5-
#
3+
# jt benchmark bench/rails/blog6-rails-routes.rb --iterations --elapsed --ips --fixed-iterations 1
4+
# RUBY_BENCHMARKS=true jt mx benchmark ruby-warmup:rails/blog6-rails-routes
65

76
require_relative './blog6-setup.rb'
87
require_relative '../../tool/jt.rb'
@@ -12,6 +11,6 @@
1211

1312
benchmark 'blog6-rails-routes' do
1413
Dir.chdir(Blog6Setup::BLOG6_DIR) do
15-
JT.ruby(*%w[-S bin/rails routes])
14+
JT.ruby(*%w[bin/rails routes])
1615
end
1716
end

mx.truffleruby/mx_truffleruby_benchmark.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def runBenchmark(self, benchmark, bmSuiteArgs):
281281

282282
arguments = ['benchmark']
283283
if self.config()['kind'] == 'simple':
284-
arguments.extend(['--simple', '--elapsed', '--iterations'])
284+
arguments.extend(['--simple', '--iterations', '--elapsed'])
285285
time = self.time()
286286
if isinstance(time, dict):
287287
if benchmark in time:
@@ -295,7 +295,7 @@ def runBenchmark(self, benchmark, bmSuiteArgs):
295295
iterations_config = self.config()['iterations'][benchmark]
296296
fixed_iterations = sorted(iterations_config.keys())
297297
fixed_iterations_arg = ','.join([str(i) for i in fixed_iterations])
298-
arguments.extend(['--elapsed', '--iterations', '--ips'])
298+
arguments.extend(['--iterations', '--elapsed', '--ips'])
299299
arguments.extend(['--fixed-iterations'])
300300
arguments.extend([fixed_iterations_arg])
301301
if iterations_config != {1:'single-shot'}:

0 commit comments

Comments
 (0)