From f09c9fc24083afd6c31bffe4918626f83eb29d8b Mon Sep 17 00:00:00 2001 From: Randy Stauner <randy.stauner@shopify.com> Date: Mon, 12 Feb 2024 07:58:39 -0700 Subject: [PATCH] Delete rails logs from lobsters and railsbench --- benchmarks/erubi-rails/benchmark.rb | 2 +- benchmarks/lobsters/benchmark.rb | 4 ++++ benchmarks/railsbench/benchmark.rb | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/benchmarks/erubi-rails/benchmark.rb b/benchmarks/erubi-rails/benchmark.rb index 17207ec3..38c22634 100644 --- a/benchmarks/erubi-rails/benchmark.rb +++ b/benchmarks/erubi-rails/benchmark.rb @@ -20,4 +20,4 @@ # This benchmark will keep writing the production log on every request. It adds up. # Let's not fill the disk. -File.unlink(File.join(__dir__, "log/production.log")) rescue nil +File.unlink(File.join(__dir__, "log/#{ENV['RAILS_ENV']}.log")) rescue nil diff --git a/benchmarks/lobsters/benchmark.rb b/benchmarks/lobsters/benchmark.rb index 688e0566..240c50c9 100644 --- a/benchmarks/lobsters/benchmark.rb +++ b/benchmarks/lobsters/benchmark.rb @@ -49,3 +49,7 @@ end end end + +# This benchmark will keep writing the production log on every request. It adds up. +# Let's not fill the disk. +File.unlink(File.join(__dir__, "log/#{ENV['RAILS_ENV']}.log")) rescue nil diff --git a/benchmarks/railsbench/benchmark.rb b/benchmarks/railsbench/benchmark.rb index a80aeac2..20a83020 100644 --- a/benchmarks/railsbench/benchmark.rb +++ b/benchmarks/railsbench/benchmark.rb @@ -31,3 +31,7 @@ end end end + +# This benchmark will keep writing the production log on every request. It adds up. +# Let's not fill the disk. +File.unlink(File.join(__dir__, "log/#{ENV['RAILS_ENV']}.log")) rescue nil