Sha256: cc31f4aa4aba936856d93bbeb6852ad94ae2669a56bc5c817ccfadc05a652aca

Contents?: true

Size: 1.1 KB

Versions: 15

Compression:

Stored size: 1.1 KB

Contents

#--
# Copyright (c) 2008 Jeremy Hinegardner
# All rights reserved.  See LICENSE and/or COPYING for details.
#++

#
# The top level module containing the contents of the hitimes library
#
# use the library with:
#
#   require 'hitimes'
#
module Hitimes
  #
  # Base class of all errors in Hitimes
  #
  class Error < ::StandardError; end

  # Hitimes.measure { } -> Float
  #
  # Times the execution of the block, returning the number of seconds it took
  def self.measure(&block)
    Hitimes::Interval.measure(&block)
  end
end
require 'hitimes/paths'
require 'hitimes/version'

# Load the binary extension, try loading one for the specific version of ruby
# and if that fails, then fall back to one in the top of the library.
# this is the method recommended by rake-compiler
begin
  # this will be for windows
  require "hitimes/#{RUBY_VERSION.sub(/\.\d$/,'')}/hitimes"
rescue LoadError
  # everyone else.
  require 'hitimes/hitimes'
end

require 'hitimes/stats'
require 'hitimes/mutexed_stats'

require 'hitimes/metric'
require 'hitimes/value_metric'
require 'hitimes/timed_metric'
require 'hitimes/timed_value_metric'

Version data entries

15 entries across 13 versions & 4 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/hitimes-1.2.2/lib/hitimes.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/hitimes-1.2.2/lib/hitimes.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/hitimes-1.2.2/lib/hitimes.rb
scoot-0.0.4 .bundle/gems/ruby/2.2.0/gems/hitimes-1.2.2/lib/hitimes.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/hitimes-1.2.2/lib/hitimes.rb
hitimes-1.2.2-x86-mingw32 lib/hitimes.rb
hitimes-1.2.2-x86-mswin32-60 lib/hitimes.rb
hitimes-1.2.2-java lib/hitimes.rb
hitimes-1.2.2 lib/hitimes.rb
hitimes-1.2.1-java lib/hitimes.rb
hitimes-1.2.1-x86-mswin32 lib/hitimes.rb
hitimes-1.2.1 lib/hitimes.rb
hitimes-1.2.0-x86-mswin32 lib/hitimes.rb
hitimes-1.2.0-java lib/hitimes.rb
hitimes-1.2.0 lib/hitimes.rb