diff --git a/harness/harness-common.rb b/harness/harness-common.rb index 6fd0e888..2d9ceb74 100644 --- a/harness/harness-common.rb +++ b/harness/harness-common.rb @@ -136,7 +136,7 @@ def get_maxrss end # Do expand_path at require-time, not when returning results, before the benchmark is likely to chdir -default_path = "data/results-#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}-#{Time.now.strftime('%F-%H%M%S')}.json" +default_path = File.expand_path("../data/results-#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}-#{Time.now.strftime('%F-%H%M%S')}.json", __dir__) yb_env_var = ENV.fetch("RESULT_JSON_PATH", default_path) YB_OUTPUT_FILE = File.expand_path yb_env_var diff --git a/harness/harness.rb b/harness/harness.rb index 8e660296..7c3b79a4 100644 --- a/harness/harness.rb +++ b/harness/harness.rb @@ -9,7 +9,7 @@ # Minimum benchmarking time in seconds MIN_BENCH_TIME = Integer(ENV.fetch('MIN_BENCH_TIME', 10)) -default_path = "data/results-#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}-#{Time.now.strftime('%F-%H%M%S')}.csv" +default_path = File.expand_path("../data/results-#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}-#{Time.now.strftime('%F-%H%M%S')}.csv", __dir__) OUT_CSV_PATH = File.expand_path(ENV.fetch('OUT_CSV_PATH', default_path)) RSS_CSV_PATH = ENV['RSS_CSV_PATH'] ? File.expand_path(ENV['RSS_CSV_PATH']) : nil