Sha256: 8d41c8bcf0c574785fcbbbda065193964e22de10a4955cef2a3bff606edf3e80

Contents?: true

Size: 371 Bytes

Versions: 75

Compression:

Stored size: 371 Bytes

Contents

#!/usr/bin/env ruby
require "bundler"
Bundler.require(:default)

require "benchmark"

# Process.clock_gettime(Process::CLOCK_MONOTONIC, :millisecond)

Benchmark.bm do |x|
  x.report("Time.now:     ") { 1_000_000.times { (Time.now.to_f * 1000).floor } }
  x.report("get_clocktime:") { 1_000_000.times { Process.clock_gettime(Process::CLOCK_REALTIME, :millisecond) } }
end

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
instana-1.193.4 benchmarks/time_processing.rb
instana-1.193.3 benchmarks/time_processing.rb
instana-1.193.3.pre1 benchmarks/time_processing.rb
instana-1.193.2 benchmarks/time_processing.rb
instana-1.192.1 benchmarks/time_processing.rb
instana-1.192.0 benchmarks/time_processing.rb
instana-1.13.0 benchmarks/time_processing.rb
instana-1.12.0 benchmarks/time_processing.rb
instana-1.11.8-java benchmarks/time_processing.rb
instana-1.11.8 benchmarks/time_processing.rb
instana-1.11.7 benchmarks/time_processing.rb
instana-1.11.6 benchmarks/time_processing.rb
instana-1.11.6-java benchmarks/time_processing.rb
instana-1.11.5 benchmarks/time_processing.rb
instana-1.11.5-java benchmarks/time_processing.rb
instana-1.11.4-java benchmarks/time_processing.rb
instana-1.11.4 benchmarks/time_processing.rb
instana-1.11.3-java benchmarks/time_processing.rb
instana-1.11.3 benchmarks/time_processing.rb
instana-1.11.2-java benchmarks/time_processing.rb