
require 'spec_helper'
require 'thread'

def time_it(cat, &blk)
  start = Time.now

  blk.call

  time = Time.now - start

  puts("TIME: #{cat}: #{time}")
end

describe Router do

  message_factory = MessageFactory.new

  describe "heartbeats" do

    it "hehe" do
      time_it('strings') {

        10000.times {
          #heartbeat = message_factory.heartbeat()
         #puts heartbeat.to_s
          #heartbeat.to_s
          blurp = "hello mr turkey how are you"
          blurp.to_s
        }
      }
    end

    it "teehee" do

      time_it('pb') {

        10000.times {
          heartbeat = message_factory.heartbeat()
          heartbeat.to_s
          #heartbeat.to_s
          #blurp = "hello mr turkey how are you"
          #blurp
        }
      }
    end
  end
end


