lib/poise_boiler/helpers/rake/travis.rb
# Wrap a block in Travis-CI timer tags. These are read by the web UI
# to nicely format timing information.
#
# @param block [Proc] Block to time.
# @return [void]
Wrap a block in Travis-CI timer tags. These are read by the web UI
to nicely format timing information.
Wrap a block in Travis - CI timer tags . These are read by the web UI to nicely format timing information .
def travis_timer(&block)
          begin
            start_time = time_nanoseconds(Time.now)
            timer_id = '%08x' % Random.rand(0xFFFFFFFF)
            shell.say("travis_time:start:#{timer_id}")
            block.call
          ensure
            end_time = time_nanoseconds(Time.now)
            shell.say("travis_time:end:#{timer_id}:start=#{start_time},finish=#{end_time},duration=#{end_time - start_time}")
          end
        end
def travis_timer ( & block ) begin start_time = time_nanoseconds ( Time . now ) timer_id = '%08x' % Random . rand ( 0xFFFFFFFF ) shell . say ( "travis_time:start:#{timer_id}" ) block . call ensure end_time = time_nanoseconds ( Time . now ) shell . say ( "travis_time:end:#{timer_id}:start=#{start_time},finish=#{end_time},duration=#{end_time - start_time}" ) end end
Wrap a block in Travis-CI timer tags.
Wrap a block in Travis - CI timer tags .
None
void
block
Block to time.
Block to time .