summary refs log tree commit diff stats
path: root/test/stuff/dirsize_benchmark.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-30 17:40:50 +0100
committerhut <hut@lavabit.com>2009-12-30 17:40:50 +0100
commitcd603ff4d0573c407c82f40cba9a164f7373585d (patch)
treef59b63105376c4321deba27cc8f905d1b2b35cdc /test/stuff/dirsize_benchmark.py
parent69a0e82727efa11efb97f965b562de051349d942 (diff)
downloadranger-cd603ff4d0573c407c82f40cba9a164f7373585d.tar.gz
removed test/stuff directory
It contained non-relevant scripts
Diffstat (limited to 'test/stuff/dirsize_benchmark.py')
-rw-r--r--test/stuff/dirsize_benchmark.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/test/stuff/dirsize_benchmark.py b/test/stuff/dirsize_benchmark.py
deleted file mode 100644
index 5784ee80..00000000
--- a/test/stuff/dirsize_benchmark.py
+++ /dev/null
@@ -1,28 +0,0 @@
-import os, time
-class Dirsize():
-	def a(path):
-		return len(os.listdir(path))
-
-	def b(path):
-		for _, dirs, files in os.walk(path):
-			return len(files) + len(dirs)
-
-	def c(path):
-		first = next(os.walk(path))
-		return len(first[1]) + len(first[2])
-
-paths = {
-		'/usr/lib': None,
-		'/usr/bin': None,
-		'/home/hut': None
-}
-
-for key in paths.keys():
-	paths[key] = Dirsize.a(key) # assume Dirsize.a() returns a correct result
-	for algo in ['a', 'b', 'c']:
-		t = time.time()
-		for i in range(4):
-			assert Dirsize.__dict__[algo](key) == paths[key]
-		print("algorithm %s: %20s: %f" % (algo, key, time.time() - t))
-
-# a !!
gt; 2010-03-12 02:00:53 +0100 committer hut <hut@lavabit.com> 2010-03-12 02:00:53 +0100 updated pydoc' href='/akspecs/ranger/commit/doc/pydoc/ranger.gui.html?h=v1.1.1&id=62cd83bace8e77cd1ff7028da6cf65d0d1defa27'>62cd83ba ^
f07bb12f ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31