Module: DateByExample
- Defined in:
- lib/date_by_example.rb,
lib/date_by_example/version.rb
Constant Summary collapse
- VERSION =
"0.1.1".freeze
Class Method Summary collapse
Class Method Details
.benchmark ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/date_by_example.rb', line 10 def self.benchmark dt = DateTime.new(2018, 6, 9, 13, 15) Benchmark.bm do |x| x.report do 1_000_000.times do ExampleFormatter.new("2 Jan 06 15:04").format(dt) end end end # GSUB version is 16.15 seconds end |