Skip to content

Commit c369340

Browse files
committed
pathname: Add simple benchmarks
1 parent 3a07050 commit c369340

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

benchmark/pathname.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
prelude: |
2+
abs = Pathname("/a")
3+
rel = Pathname("a")
4+
p1 = Pathname.new('foo/././././bar')
5+
p2 = Pathname.new('foo/bar/./../..')
6+
p3 = Pathname.new('foo/bar/zot')
7+
benchmark:
8+
p1+p2: p1+p2
9+
abs.root?: abs.root?
10+
rel.root?: rel.root?
11+
abs.absolute?: abs.absolute?
12+
rel.absolute?: rel.absolute?
13+
p1.cleanpath: p1.cleanpath
14+
p2.cleanpath: p2.cleanpath
15+
relative_path_from: p3.relative_path_from('foo/bar/qux/quax')

0 commit comments

Comments
 (0)