1111
1212# BenchmarkSuite runs a collection of benchmarks and collects their results
1313class BenchmarkSuite
14+ BENCHMARKS_DIR = "benchmarks"
15+ RACTOR_BENCHMARKS_DIR = "benchmarks-ractor"
16+ RACTOR_ONLY_CATEGORY = "ractor-only"
17+ RACTOR_CATEGORY = "ractor"
18+ RACTOR_HARNESS = "harness-ractor"
19+
1420 attr_reader :ruby , :ruby_description , :categories , :name_filters , :out_path , :harness , :pre_init , :no_pinning
1521
1622 def initialize ( ruby :, ruby_description :, categories :, name_filters :, out_path :, harness :, pre_init : nil , no_pinning : false )
@@ -30,12 +36,12 @@ def run
3036 bench_data = { }
3137 bench_failures = { }
3238
33- bench_dir = "benchmarks"
34- ractor_bench_dir = "benchmarks-ractor"
39+ bench_dir = BENCHMARKS_DIR
40+ ractor_bench_dir = RACTOR_BENCHMARKS_DIR
3541
36- if categories == [ "ractor-only" ]
42+ if categories == [ RACTOR_ONLY_CATEGORY ]
3743 bench_dir = ractor_bench_dir
38- @harness = "harness-ractor"
44+ @harness = RACTOR_HARNESS
3945 @categories = [ ]
4046 end
4147
@@ -47,7 +53,7 @@ def run
4753 filter . match? ( entry )
4854 end
4955
50- if categories == [ "ractor" ]
56+ if categories == [ RACTOR_CATEGORY ]
5157 # We ignore the category filter here because everything in the
5258 # benchmarks-ractor directory should be included when we're benchmarking the
5359 # Ractor category
0 commit comments