Module: Hitimes
- Defined in:
 - lib/hitimes.rb,
lib/hitimes/paths.rb,
lib/hitimes/stats.rb,
lib/hitimes/metric.rb,
lib/hitimes/instant.rb,
lib/hitimes/version.rb,
lib/hitimes/interval.rb,
lib/hitimes/initialize.rb,
lib/hitimes/timed_metric.rb,
lib/hitimes/value_metric.rb,
lib/hitimes/mutexed_stats.rb,
lib/hitimes/timed_value_metric.rb 
Overview
– Copyright © 2008, 2009 Jeremy Hinegardner All rights reserved. See LICENSE and/or COPYING for details. ++
Defined Under Namespace
Modules: Initialize, Paths Classes: Error, Interval, Metric, Stats, TimedMetric, TimedValueMetric, ValueMetric
Constant Summary collapse
- CLOCK_ID =
          
Public: The clock_id to use in Process.clock_gettime
 Initialize.determine_clock_id.freeze
- NANOSECONDS_PER_SECOND =
          
Internal: The fraction of second of a nanosecond
 1e9- VERSION =
 "3.1.0"- MutexedStats =
          
MutexedStats is the start of a threadsafe Stats class. Currently, on MRI Ruby the Stats object is already threadsafe, so there is no need to use MutexedStats.
 Stats
Class Method Summary collapse
- 
  
    
      .clock_name  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Internal: The human readable clock name of the CLOCK_ID as a string.
 - 
  
    
      .measure(&block)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Hitimes.measure { } -> Float.
 - 
  
    
      .raw_instant  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Public: Get the raw instant.
 
Class Method Details
.clock_name ⇒ Object
Internal: The human readable clock name of the CLOCK_ID as a string
Returns the clock name as a String
      29 30 31 32 33 34 35 36 37 38 39  | 
    
      # File 'lib/hitimes/instant.rb', line 29 def clock_name case CLOCK_ID when Symbol CLOCK_ID.to_s else const = Process.constants.grep(/CLOCK/).find do |id| Process.const_get(id) == CLOCK_ID end "Process::#{const}" end end  |