Skip to content

Commit

Permalink
o(∩∩)o...哈哈,修改了性能测试。
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricporter committed Jul 31, 2012
1 parent a9c0219 commit 6eec689
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions EffectLab/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
EffectLabCore.so: core.c
gcc -I/usr/include/python2.7 -fPIC -shared core.c -o EffectLabCore.so
gcc -O2 -I/usr/include/python2.7 -fPIC -shared core.c -o EffectLabCore.so

clean:
rm *.so
rm *.so
13 changes: 12 additions & 1 deletion TestEffectLab.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,15 @@ def main():
if __name__ == '__main__':
os.system('rm tmp/*')
# autoreload.main(main)
main()
# main()
from timeit import Timer
from functools import partial

img = Image.new("RGB", (100, 100))
wave = GlobalWaveEffect(1, 0.5)
test = partial(wave, img)

t = Timer('test()', 'from __main__ import test')

print avg(t.repeat(3, 100))

0 comments on commit 6eec689

Please sign in to comment.