Sha256: defff18624ad45898bb97d0cc6234be47d48429c24fc6cd6fe8e699f98cf586a

Contents?: true

Size: 700 Bytes

Versions: 9

Compression:

Stored size: 700 Bytes

Contents

#
# Copyright (c) 2012 Lorenzo Pasqualis - DreamBox Learning, Inc
# https://github.com/lpasqualis/rubyperf
#

class PerfTestExample
  def test(a,b,c)
    (0..100000).to_a.reverse.reverse.reverse # Do something heavy
  end

  def test_np
    (0..300000).to_a.reverse.reverse.reverse # Do something heavy
  end

  def self.static_method
    (0..300000).to_a.reverse.reverse.reverse # Do something heavy
  end

  def test_with_measure
    Perf::MeterFactory.get.measure(:test_with_measure_block) do
      test(1,2,3)
      PerfTestExample.static_method
    end
  end

  def test_with_measure_static
    Perf::MeterFactory.get.measure(:test_with_measure_block) do
      static_method
    end
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rubyperf-1.3.6 test/perf_test_example.rb
rubyperf-1.3.5 test/perf_test_example.rb
rubyperf-1.3.4 test/perf_test_example.rb
rubyperf-1.3.2 test/perf_test_example.rb
rubyperf-1.3.1 test/perf_test_example.rb
rubyperf-1.3.0 test/perf_test_example.rb
rubyperf-1.2.0 test/perf_test_example.rb
rubyperf-1.1.0 test/perf_test_example.rb
rubyperf-1.0.1 test/perf_test_example.rb