lib/grntest/tester.rb in grntest-1.6.6 vs lib/grntest/tester.rb in grntest-1.6.7
- old
+ new
@@ -1,6 +1,6 @@
-# Copyright (C) 2012-2023 Sutou Kouhei <kou@clear-code.com>
+# Copyright (C) 2012-2024 Sutou Kouhei <kou@clear-code.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@@ -159,10 +159,11 @@
:mark,
:"buffered-mark",
:stream,
:inplace,
:progress,
+ :"benchmark-json",
]
available_reporter_labels = available_reporters.join(", ")
parser.on("--reporter=REPORTER", available_reporters,
"Report test result by REPORTER",
"[#{available_reporter_labels}]",
@@ -295,9 +296,17 @@
end
parser.on("--random-seed=SEED", Integer,
"Seed for random numbers") do |seed|
srand(seed)
+ end
+
+ parser.on("--[no-]benchmark",
+ "Set options for benchmark") do |benchmark|
+ if benchmark
+ tester.n_workers = 1
+ tester.reporter = :"benchmark-json"
+ end
end
parser.on("--version",
"Show version and exit") do
puts(VERSION)