Files
gitlab-foss/config/initializers/seed_fu.rb
2024-10-30 03:17:32 +00:00

22 lines
380 B
Ruby

# frozen_string_literal: true
require 'benchmark'
seed_timer = Module.new do
def run
duration = Benchmark.realtime { super }
printf "== Seeding took %.2f seconds\n", duration
end
private
def run_file(filename)
duration = Benchmark.realtime { super }
printf "== %s took %.2f seconds\n", filename, duration
end
end
SeedFu::Runner.prepend seed_timer