Sha256: f7d22dab695b3016cc17747bf0fbb33465b34c33e45281150ff31aa6aa60b5e7
Contents?: true
Size: 797 Bytes
Versions: 1
Compression:
Stored size: 797 Bytes
Contents
# frozen_string_literal: true def delete_file(file_path) File.delete(file_path) if File.exist?(file_path) end def truncate_profiles RSpeed::Redis.destroy(RSpeed::Variable::PROFILE_PATTERN) end def populate_profiles data = [ { file: './spec/2_0_spec.rb', time: 2.0 }.to_json, { file: './spec/1_5_spec.rb', time: 1.5 }.to_json, { file: './spec/1_1_spec.rb', time: 1.1 }.to_json, { file: './spec/0_7_spec.rb', time: 0.7 }.to_json, { file: './spec/0_4_spec.rb', time: 0.4 }.to_json, { file: './spec/0_3_spec.rb', time: 0.3 }.to_json, { file: './spec/0_2_spec.rb', time: 0.2 }.to_json, ] RSpeed::Splitter.new.append(items: data, key: RSpeed::Variable.profile) end def redis_object @redis_object ||= Redis.new(db: RSpeed::Env.db, host: RSpeed::Env.host) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rspeed-0.5.2 | spec/spec_helper.rb |