Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2016-08-27 01:25:56 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2016-08-27 01:25:56 +0300
commit367afb1971126697c9f2519f9004a5ef740e7cd1 (patch)
tree7fed225727f9c04c0ff921e33a2e896acca184ea /scripts
parent2e77a08611eec5391831d139994ca4a12e33c324 (diff)
Much to my surprise, algorithm::shared_fs_mutex::memory_map almost nearly worked first time. Performance, as expected, is a full order of magnitude faster than byte_ranges. CppCon will be pleased :)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/benchmark_locking_matrix.py38
1 files changed, 20 insertions, 18 deletions
diff --git a/scripts/benchmark_locking_matrix.py b/scripts/benchmark_locking_matrix.py
index 20745111..d8a6beea 100644
--- a/scripts/benchmark_locking_matrix.py
+++ b/scripts/benchmark_locking_matrix.py
@@ -1,12 +1,13 @@
#!/usr/bin/python3
-benchmark_locking_path="../build/x64/Release/benchmark_locking"
+benchmark_locking_path="../programs/build_vs2015/bin/Release/benchmark-locking"
max_waiters = 8
max_entities = 8
-algorithms = [ "lock_files", "byte_ranges", "atomic_append" ]
-algorithms += [ "!lock_files", "!byte_ranges", "!atomic_append" ]
+#algorithms = [ "lock_files", "byte_ranges", "atomic_append" ]
+#algorithms += [ "!lock_files", "!byte_ranges", "!atomic_append" ]
+algorithms = [ "memory_map", "!memory_map" ]
results = []
for y in range(0, max_waiters):
@@ -21,21 +22,22 @@ with open("benchmark_locking_matrix.csv", "wt") as oh:
os.chdir(os.path.dirname(benchmark_locking_path))
for algorithm in algorithms:
- for y in range(0, max_waiters):
+ try:
+ for y in range(0, max_waiters):
+ for x in range(0, max_entities):
+ ph = subprocess.check_call(['benchmark-locking', algorithm, str(x+1), str(y+1)])
+ with open("benchmark_locking.csv", "rt") as ih:
+ ih.readline()
+ results[y][x]=int(ih.readline())
+ finally:
+ oh.write(algorithm+'\n')
for x in range(0, max_entities):
- ph = subprocess.check_call(['benchmark_locking', algorithm, str(x+1), str(y+1)])
- with open("benchmark_locking.csv", "rt") as ih:
- ih.readline()
- results[y][x]=int(ih.readline())
-
- oh.write(algorithm+'\n')
- for x in range(0, max_entities):
- oh.write(',"'+str(x+1)+' entities"')
- oh.write('\n')
- for y in range(0, max_waiters):
- oh.write('"'+str(y+1)+' waiters"')
- for x in range(0, max_entities):
- oh.write(','+str(results[y][x]))
+ oh.write(',"'+str(x+1)+' entities"')
+ oh.write('\n')
+ for y in range(0, max_waiters):
+ oh.write('"'+str(y+1)+' waiters"')
+ for x in range(0, max_entities):
+ oh.write(','+str(results[y][x]))
+ oh.write('\n')
oh.write('\n')
- oh.write('\n')