Add benchmarks to create Time instances
This commit is contained in:
parent
e802587433
commit
11fd3fec53
4
benchmark/time_new.yml
Normal file
4
benchmark/time_new.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
benchmark:
|
||||||
|
- 'Time.new(2021)'
|
||||||
|
- 'Time.new(2021, 8, 22)'
|
||||||
|
- 'Time.new(2021, 8, 22, in: "+09:00")'
|
8
benchmark/time_parse.yml
Normal file
8
benchmark/time_parse.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
prelude: |
|
||||||
|
require 'time'
|
||||||
|
inspect = "2021-08-23 09:57:02 +0900"
|
||||||
|
iso8601 = "2021-08-23T09:57:02+09:00"
|
||||||
|
benchmark:
|
||||||
|
- Time.iso8601(iso8601)
|
||||||
|
- Time.parse(iso8601)
|
||||||
|
- Time.parse(inspect)
|
Loading…
x
Reference in New Issue
Block a user