spec/ddtrace/benchmark/support/benchmark_helper.rb
def write_result(result, subtype = nil)
    type = @type
    type = "#{type}-#{subtype}" if subtype

    STDERR.puts(@test, type, result)

    path = File.join('tmp', 'benchmark', @test, type)
    FileUtils.mkdir_p(File.dirname(path))

    File.write(path, JSON.pretty_generate(result))

    STDERR.puts("Result written to #{path}")
  end
# Report JSON result objects to ./tmp/benchmark/ folder
# Theses results can be historically tracked (e.g. plotting) if needed.
Report JSON result objects to ./tmp/benchmark/ folder
Theses results can be historically tracked  if needed.
Report JSON result objects to . / tmp / benchmark / folder Theses results can be historically tracked if needed .
def write_result(result, subtype = nil)
    type = @type
    type = "#{type}-#{subtype}" if subtype
    STDERR.puts(@test, type, result)
    path = File.join('tmp', 'benchmark', @test, type)
    FileUtils.mkdir_p(File.dirname(path))
    File.write(path, JSON.pretty_generate(result))
    STDERR.puts("Result written to #{path}")
  end
def write_result ( result , subtype = nil ) type = @type type = "#{type}-#{subtype}" if subtype STDERR . puts ( @test , type , result ) path = File . join ( 'tmp' , 'benchmark' , @test , type ) FileUtils . mkdir_p ( File . dirname ( path ) ) File . write ( path , JSON . pretty_generate ( result ) ) STDERR . puts ( "Result written to #{path}" ) end
Report JSON result objects to ./tmp/benchmark/ folder
Theses results can be historically tracked (e.g.
Report JSON result objects to . / tmp / benchmark / folder Theses results can be historically tracked ( e . g .
result
subtype