Class: Rgot::BenchmarkResult
- Inherits:
-
Object
- Object
- Rgot::BenchmarkResult
- Defined in:
- lib/rgot/benchmark_result.rb
Instance Method Summary collapse
-
#initialize(n:, t:) ⇒ BenchmarkResult
constructor
A new instance of BenchmarkResult.
- #to_s ⇒ Object
Constructor Details
#initialize(n:, t:) ⇒ BenchmarkResult
Returns a new instance of BenchmarkResult.
3 4 5 6 |
# File 'lib/rgot/benchmark_result.rb', line 3 def initialize(n:, t:) @n = n @t = t end |
Instance Method Details
#to_s ⇒ Object
8 9 10 |
# File 'lib/rgot/benchmark_result.rb', line 8 def to_s sprintf("%d\t%d ns/op", @n, @t / @n * 1_000_000_000) end |