Permalink
Switch branches/tags
Commits on Dec 7, 2010
  1. Add block param for benchmarks to allow them to do their own looping.

    phiggins committed Dec 7, 2010
    This helps in the case that a benchmark had some expensive setup. Previously,
    * The setup could be done once, outside the benchmark:
    
      expensive_setup()
      tach("method1") do
        # code to benchmark
      end
    
    * The setup could be done every test, skewing the benchmark:
    
      tach("method2") do
        expensive_setup()
        # code to benchmark
      end
    
    With this change, you have a third option.
    
    * The setup is done once, and the benchmark loops itself:
      tach("method3") do |n|
        expensive_setup()
        n.times do
          # code to benchmark
        end
      end
    
    One unfortunate side-effect of this is that using the new syntax will result in
    lower benchmark scores because of avoiding the overhead of calling a block
    multiple times.
Commits on Nov 29, 2010
  1. release v0.0.6

    geemus committed Nov 29, 2010
  2. Sort results by the float value of their runtime.

    phiggins committed with Wesley Beary Nov 28, 2010
      # With this sample file
      require 'tach'
    
      Tach.meter do
        [1, 11, 2].each do |n|
          tach("sleep #{n}") do
            sleep n
          end
        end
      end
    
      # Before
      $ ruby -Ilib sleep_test.rb
    
        [sleep 1, sleep 11, sleep 2]
    
        +----------+-----------+
        | tach     | total     |
        +----------+-----------+
        | sleep 1  | 1.000137  |
        +----------+-----------+
        | sleep 11 | 11.000419 |
        +----------+-----------+
        | sleep 2  | 2.000111  |
        +----------+-----------+
    
      # After
      $ ruby -Ilib sleep_test.rb
    
        [sleep 1, sleep 11, sleep 2]
    
        +----------+-----------+
        | tach     | total     |
        +----------+-----------+
        | sleep 1  | 1.000135  |
        +----------+-----------+
        | sleep 2  | 2.000272  |
        +----------+-----------+
        | sleep 11 | 11.000114 |
        +----------+-----------+
Commits on Nov 28, 2010
  1. Sort results by the float value of their runtime.

    phiggins committed Nov 28, 2010
      # With this sample file
      require 'tach'
    
      Tach.meter do
        [1, 11, 2].each do |n|
          tach("sleep #{n}") do
            sleep n
          end
        end
      end
    
      # Before
      $ ruby -Ilib sleep_test.rb
    
        [sleep 1, sleep 11, sleep 2]
    
        +----------+-----------+
        | tach     | total     |
        +----------+-----------+
        | sleep 1  | 1.000137  |
        +----------+-----------+
        | sleep 11 | 11.000419 |
        +----------+-----------+
        | sleep 2  | 2.000111  |
        +----------+-----------+
    
      # After
      $ ruby -Ilib sleep_test.rb
    
        [sleep 1, sleep 11, sleep 2]
    
        +----------+-----------+
        | tach     | total     |
        +----------+-----------+
        | sleep 1  | 1.000135  |
        +----------+-----------+
        | sleep 2  | 2.000272  |
        +----------+-----------+
        | sleep 11 | 11.000114 |
        +----------+-----------+
Commits on Nov 24, 2010
  1. Version bump to 0.0.5

    geemus committed Nov 24, 2010
  2. remove annals require

    geemus committed Nov 24, 2010
Commits on Nov 15, 2010
  1. Release 0.0.4

    geemus committed Nov 15, 2010
Commits on Nov 13, 2010
  1. Release 0.0.3

    geemus committed Nov 13, 2010
  2. nicer progress display for meter

    geemus committed Nov 13, 2010
Commits on Apr 14, 2010
  1. cleanup and a simple one-off time and report function

    geemus (Wesley Beary) committed Apr 14, 2010
Commits on Apr 9, 2010
  1. Version bump to 0.0.2

    geemus (Wesley Beary) committed Apr 9, 2010
  2. update description/summary

    geemus (Wesley Beary) committed Apr 9, 2010
  3. update readme

    geemus (Wesley Beary) committed Apr 9, 2010
  4. more performant and as consistent without threads

    geemus (Wesley Beary) committed Apr 9, 2010
  5. Version bump to 0.0.1

    geemus (Wesley Beary) committed Apr 9, 2010
  6. simpler, faster and more consistent

    geemus (Wesley Beary) committed Apr 9, 2010
Commits on Apr 8, 2010
  1. Version bump to 0.0.0

    geemus (Wesley Beary) committed Apr 8, 2010
  2. simple example for while I'm actively hacking

    geemus (Wesley Beary) committed Apr 8, 2010
  3. more details in the readme, cleanup/performance optimization

    geemus (Wesley Beary) committed Apr 8, 2010
  4. first pass

    geemus (Wesley Beary) committed Apr 8, 2010
  5. Initial commit to tach.

    geemus (Wesley Beary) committed Apr 8, 2010