Skip to content

Commit 4cb8656

Browse files
committed
Update specs a bit.
1 parent b71cf5c commit 4cb8656

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Diff for: shard.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ dependencies:
1818
development_dependencies:
1919
ameba:
2020
github: crystal-ameba/ameba
21-
version: ~> 1.6
21+
version: ~> 1.6.1

Diff for: spec/csuuid_spec.cr

+12
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,16 @@ describe CSUUID do
139139
uuid1.should_not eq uuid2
140140
uuid2.should be > uuid1
141141
end
142+
143+
it "can benchmark against the system UUIDs" do
144+
CSUUID.prng = Random::PCG32.new
145+
146+
puts
147+
148+
Benchmark.ips do |benchmark|
149+
benchmark.report("CSUUID.unique") { CSUUID.unique }
150+
benchmark.report("CSUUID.new") { CSUUID.new }
151+
benchmark.report("UUID.v7") { UUID.v7 }
152+
end
153+
end
142154
end

0 commit comments

Comments
 (0)