Sha256: ab6d5ff0edce5e720eb4e3f41fcf79e86cb6c8cff99f4d6cecad8b11d02f8d37

Contents?: true

Size: 278 Bytes

Versions: 2

Compression:

Stored size: 278 Bytes

Contents

# frozen_string_literal: true

module Rgot
  class BenchmarkResult
    # @dynamic n, t
    attr_reader :n
    attr_reader :t

    def initialize(n:, t:)
      @n = n
      @t = t
    end

    def to_s
      sprintf("%d\t%d ns/op", @n, @t / @n * 1_000_000_000)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rgot-1.4.0 lib/rgot/benchmark_result.rb
rgot-1.3.0 lib/rgot/benchmark_result.rb