summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-07 02:05:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-07 02:05:21 +0000
commit72ad092960c413b6a5687c552747b20a5ed78b22 (patch)
treee7657c731214e5ed14ec9ec2d895724f820ee094 /benchmark
parent9e3ffd41f5aa697bcfd2adac29498755f095d4a3 (diff)
Time.strptime benchmarks
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/time_strptime.yml13
1 files changed, 13 insertions, 0 deletions
diff --git a/benchmark/time_strptime.yml b/benchmark/time_strptime.yml
new file mode 100644
index 0000000000..8d89ebb7a7
--- /dev/null
+++ b/benchmark/time_strptime.yml
@@ -0,0 +1,13 @@
+prelude: |
+ require 'time'
+benchmark:
+ - Time.strptime("28/Aug/2005:06:54:20 +0000", "%d/%b/%Y:%T %z")
+ - Time.strptime("1", "%s")
+ - Time.strptime("0 +0100", "%s %z")
+ - Time.strptime("0 UTC", "%s %z")
+ - Time.strptime("1.5", "%s.%N")
+ - Time.strptime("1.000000000001", "%s.%N")
+ - Time.strptime("20010203 -0200", "%Y%m%d %z")
+ - Time.strptime("20010203 UTC", "%Y%m%d %z")
+ - Time.strptime("2018-365", "%Y-%j")
+ - Time.strptime("2018-091", "%Y-%j")