Skip to content

Commit 7550537

Browse files
committed
Determine if the suite is ractor-only in the initializer
1 parent f0da3c3 commit 7550537

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/benchmark_suite.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
class BenchmarkSuite
1414
BENCHMARKS_DIR = "benchmarks"
1515
RACTOR_BENCHMARKS_DIR = "benchmarks-ractor"
16-
RACTOR_ONLY_CATEGORY = "ractor-only"
16+
RACTOR_ONLY_CATEGORY = ["ractor-only"].freeze
1717
RACTOR_CATEGORY = "ractor"
1818
RACTOR_HARNESS = "harness-ractor"
1919

@@ -28,6 +28,7 @@ def initialize(ruby:, ruby_description:, categories:, name_filters:, out_path:,
2828
@harness = harness
2929
@pre_init = pre_init ? expand_pre_init(pre_init) : nil
3030
@no_pinning = no_pinning
31+
@ractor_only = (categories == RACTOR_ONLY_CATEGORY)
3132
end
3233

3334
# Run all the benchmarks and record execution times
@@ -39,7 +40,7 @@ def run
3940
bench_dir = BENCHMARKS_DIR
4041
ractor_bench_dir = RACTOR_BENCHMARKS_DIR
4142

42-
if categories == [RACTOR_ONLY_CATEGORY]
43+
if @racktor_only
4344
bench_dir = ractor_bench_dir
4445
@harness = RACTOR_HARNESS
4546
@categories = []

0 commit comments

Comments
 (0)