Class: Rgot::BenchmarkResult

Inherits:
Object
  • Object
show all
Defined in:
lib/rgot/benchmark_result.rb

Instance Method Summary collapse

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_sObject



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