Method: Bench::Commands::Reference#before

Defined in:
lib/bench9000/commands/reference.rb

#before(options, existing_measurements) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/bench9000/commands/reference.rb', line 14

def before(options, existing_measurements)
  if options.implementations.size != 1
    puts "needs exactly one implementation"
    exit 1
  end

  @file = File.open("reference.txt", "w")
  @file.puts "version #{CONFIG_VERSION}"
  @file.flush

  true
end