Sha256: fdedbd0c42072c54c87ad57e8cbb85ccb5dca312778cfd1c61b4500515578edf

Contents?: true

Size: 536 Bytes

Versions: 4

Compression:

Stored size: 536 Bytes

Contents

class BenchmarkCLI
  module Compare
    # 'A + B' comparison.
    class APlusB < Base
      TITLE = 'A + B: one step implementation, input provided as kwargs'.freeze
      NAME = :a_plus_b

      def report_class_call(benchmark, title, klass)
        benchmark.report title do
          klass.call(a: 100, b: 200)
        end
      end

      def report_instance_call(benchmark, title, klass)
        instance = klass.new
        benchmark.report title do
          instance.call(a: 100, b: 200)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
flows-0.6.0 bin/benchmark_cli/compare/a_plus_b.rb
flows-0.5.1 bin/benchmark_cli/compare/a_plus_b.rb
flows-0.5.0 bin/benchmark_cli/compare/a_plus_b.rb
flows-0.4.0 bin/benchmark_cli/compare/a_plus_b.rb