projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
f15b8cf
)
python/demos/demo_reading_speed.py: avoid unused variable, use globals to get functio...
author
Paul Brossier
<piem@piem.org>
Tue, 10 May 2016 21:45:41 +0000
(23:45 +0200)
committer
Paul Brossier
<piem@piem.org>
Tue, 10 May 2016 21:45:41 +0000
(23:45 +0200)
python/demos/demo_reading_speed.py
patch
|
blob
|
history
diff --git
a/python/demos/demo_reading_speed.py
b/python/demos/demo_reading_speed.py
index
92d9c24
..
dbf7caf
100755
(executable)
--- a/
python/demos/demo_reading_speed.py
+++ b/
python/demos/demo_reading_speed.py
@@
-109,7
+109,7
@@
def load_file_aubio(filename):
def test_speed(function, filename):
times = []
- for
i
in range(10):
+ for
_
in range(10):
start = time.time()
try:
total_frames, samplerate = function(filename)
@@
-134,4
+134,6
@@
if __name__ == '__main__':
filename = sys.argv[1]
for f in test_functions:
- test_speed(eval(f), filename)
+ # get actual function from globals
+ test_function = globals()[f]
+ test_speed(test_function, filename)