From d476b01550247526ebe1f48b9e8f83e57cebfead Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Wed, 3 Mar 2021 16:52:17 -0500 Subject: [PATCH] Reset stats in railsbench Guarded with `defined?` so Rubies without uJIT can still run it. --- benchmarks/railsbench/run_once.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/benchmarks/railsbench/run_once.rb b/benchmarks/railsbench/run_once.rb index 9e0cc6db..3326e587 100644 --- a/benchmarks/railsbench/run_once.rb +++ b/benchmarks/railsbench/run_once.rb @@ -12,6 +12,9 @@ puts("***RUNNING BENCHMARK***") +# Don't want stats for loading the benchmark. +UJIT.reset_stats! if defined?(UJIT.reset_stats!) + visiting_routes.each do |path| # The app mutates `env`, so we need to create one every time. env = Rack::MockRequest::env_for("http://localhost#{path}")