Commit e4b6e02c authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Merge pull request #25 from dbrabera/extended_benchmark_summary

Strip binaries in benchmarks
parents 164cd109 4eed812e
...@@ -41,8 +41,8 @@ def benchmark(testfolder): ...@@ -41,8 +41,8 @@ def benchmark(testfolder):
result = { result = {
"name": testfolder[:-1], "name": testfolder[:-1],
"size": { "size": {
"ada": os.path.getsize(llvm_bin), "ada": size(llvm_bin),
"llvm": os.path.getsize(ada_bin), "llvm": size(ada_bin),
}, },
"time": { "time": {
"ada": time(ada_bin), "ada": time(ada_bin),
...@@ -53,6 +53,11 @@ def benchmark(testfolder): ...@@ -53,6 +53,11 @@ def benchmark(testfolder):
return result return result
def size(file):
call(["strip", os.path.abspath(file)])
return os.path.getsize(file)
def time(file, iters=1000): def time(file, iters=1000):
start = t.time() start = t.time()
call(["/bin/bash", "-c", "for i in {1..%s} ; do %s ; done" % (iters, file)]) call(["/bin/bash", "-c", "for i in {1..%s} ; do %s ; done" % (iters, file)])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment