Class: ImageOptim::BenchmarkResult
- Inherits:
-
Object
- Object
- ImageOptim::BenchmarkResult
- Defined in:
- lib/image_optim/benchmark_result.rb
Overview
Benchmark result for one worker+src
Instance Attribute Summary collapse
-
#bytes ⇒ Object
readonly
Returns the value of attribute bytes.
-
#elapsed ⇒ Object
readonly
Returns the value of attribute elapsed.
-
#worker ⇒ Object
readonly
Returns the value of attribute worker.
Instance Method Summary collapse
-
#initialize(src, dst, elapsed, worker) ⇒ BenchmarkResult
constructor
A new instance of BenchmarkResult.
Constructor Details
#initialize(src, dst, elapsed, worker) ⇒ BenchmarkResult
Returns a new instance of BenchmarkResult.
8 9 10 11 12 |
# File 'lib/image_optim/benchmark_result.rb', line 8 def initialize(src, dst, elapsed, worker) @bytes = bytes_saved(src, dst) @elapsed = elapsed @worker = worker.class.bin_sym.to_s end |
Instance Attribute Details
#bytes ⇒ Object (readonly)
Returns the value of attribute bytes.
6 7 8 |
# File 'lib/image_optim/benchmark_result.rb', line 6 def bytes @bytes end |
#elapsed ⇒ Object (readonly)
Returns the value of attribute elapsed.
6 7 8 |
# File 'lib/image_optim/benchmark_result.rb', line 6 def elapsed @elapsed end |
#worker ⇒ Object (readonly)
Returns the value of attribute worker.
6 7 8 |
# File 'lib/image_optim/benchmark_result.rb', line 6 def worker @worker end |