Sha256: 4687224e9672deec1757b5fae061696ebb1fa8fb0abce040aa4c04c19eec8f35

Contents?: true

Size: 662 Bytes

Versions: 12

Compression:

Stored size: 662 Bytes

Contents

#!/usr/bin/env ruby

require 'bundler/setup'
require 'market_bot'

require 'benchmark'

loops = 5
test_files = %w{app_1.txt app_2.txt app_3.txt}
test_files.each do |test_file|
  puts '----------------------------------------------------'
  puts "Benchmark App Parser: #{test_file}"
  puts '----------------------------------------------------'
  file_path = File.join(File.dirname(__FILE__), '..', 'spec', 'market_bot', 'play', 'data', test_file)
  html = File.read(file_path)

  total = 0.0
  loops.times do
    total += Benchmark.realtime { MarketBot::Play::App.parse(html) }
  end
  average = total.to_f / loops.to_f

  puts "average: #{average} seconds"
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
market_bot-1.3.1 bin/benchmark_parser_app
market_bot-1.3.0 bin/benchmark_parser_app
market_bot-1.2.0 bin/benchmark_parser_app
market_bot-1.1.0 bin/benchmark_parser_app
market_bot-1.0.7 bin/benchmark_parser_app
market_bot-1.0.6 bin/benchmark_parser_app
market_bot-1.0.5 bin/benchmark_parser_app
market_bot-1.0.4 bin/benchmark_parser_app
market_bot-1.0.3 bin/benchmark_parser_app
market_bot-1.0.2 bin/benchmark_parser_app
market_bot-1.0.1 bin/benchmark_parser_app
market_bot-1.0.0 bin/benchmark_parser_app