Sha256: 6cf378c7a7c54db2ca4631b24ab1ee1fc75bdfd70a4b800ca3ca12d0b94e9c83
Contents?: true
Size: 872 Bytes
Versions: 48
Compression:
Stored size: 872 Bytes
Contents
#!/usr/bin/env ruby require 'rubygems' $LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__), 'lib')) require 'bench' # 1) Extract Bench title title = ARGV[0] # 2) create result directory structure ['bench_results', ARGV[1]].each do |dir| next if dir.nil? Bench.create_subdir dir Dir.chdir dir end result_dir = Dir.pwd ['raw_data'].each do |dir| Bench.create_subdir dir end # 3) create meta.yml file meta_hash = {:x_keys => {}, :metrics => {}, :label => title} x_keys = ARGV[2].split() if $ARGV[1] x_keys ||= [] counter = 0 x_keys = x_keys.sort_by(&Bench.sort_natural_order) x_keys.each do |x_key| meta_hash[:x_keys][x_key] = counter counter += 1 end meta_hash[:metrics] = {'Throughput' => 0, 'Av.Time' => 1} File.open(File.join(result_dir,'raw_data','meta.yml'), 'w') do |file| file.write meta_hash.to_yaml unless meta_hash.empty? end
Version data entries
48 entries across 48 versions & 1 rubygems