Class: Expressir::Commands::BenchmarkCache

Inherits:
Base
  • Object
show all
Defined in:
lib/expressir/commands/benchmark_cache.rb

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods inherited from Base

#exit_with_error, #initialize, #say

Constructor Details

This class inherits a constructor from Expressir::Commands::Base

Instance Method Details

#run(path) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/expressir/commands/benchmark_cache.rb', line 4

def run(path)
  configure_benchmarking

  # Run benchmarks with cache
  cache_path = options[:cache_path] || generate_temp_cache_path

  if [".yml", ".yaml"].include?(File.extname(path).downcase)
    benchmark_cache_from_manifest(path, cache_path)
  else
    benchmark_cache_file(path, cache_path)
  end
end