Skip to content

Instantly share code, notes, and snippets.

@dasl-
Created July 6, 2019 13:28
Show Gist options
  • Save dasl-/085b5026ba07b88b5a235ed96d341e5a to your computer and use it in GitHub Desktop.
Save dasl-/085b5026ba07b88b5a235ed96d341e5a to your computer and use it in GitHub Desktop.
(57.617-50.337)/57.617 = 12.6%
BEFORE:
ncalls tottime percall cumtime percall filename:lineno(function)
1038/1 0.042 0.000 63.622 63.622 {built-in method builtins.exec}
1 0.000 0.000 63.622 63.622 video:2(<module>)
1 0.004 0.004 60.960 60.960 videoprocessor.py:56(process_and_play)
1 0.999 0.999 60.954 60.954 videoprocessor.py:104(__process_and_play_video)
1776 0.011 0.000 57.617 0.032 videoplayer.py:25(playFrame)
1776 7.538 0.004 52.474 0.030 videoplayer.py:41(__setFramePixels)
895104 6.080 0.000 21.884 0.000 videoplayer.py:65(__setPixel)
895104 10.581 0.000 21.111 0.000 gamma.py:26(getScaledRGBOutputForColorFrame)
895104 4.160 0.000 15.804 0.000 apa102.py:170(set_pixel_rgb)
896640 10.636 0.000 11.663 0.000 apa102.py:143(set_pixel)
2685312 10.530 0.000 10.530 0.000 gamma.py:40(getScaledOutputForPixel)
1779 0.083 0.000 5.140 0.003 apa102.py:192(show)
60486 0.135 0.000 4.840 0.000 SPI.py:78(write)
60486 4.705 0.000 4.705 0.000 {method 'writebytes' of 'SpiDev' objects}
AFTER:
ncalls tottime percall cumtime percall filename:lineno(function)
1038/1 0.043 0.000 63.669 63.669 {built-in method builtins.exec}
1 0.000 0.000 63.669 63.669 video:2(<module>)
1 0.004 0.004 61.001 61.001 videoprocessor.py:56(process_and_play)
1 3.640 3.640 60.995 60.995 videoprocessor.py:104(__process_and_play_video)
1776 0.011 0.000 50.337 0.028 videoplayer.py:25(playFrame)
1776 5.880 0.003 45.285 0.025 videoplayer.py:41(__setFramePixels)
895104 10.589 0.000 20.967 0.000 gamma.py:26(getScaledRGBOutputForColorFrame)
895104 6.674 0.000 18.437 0.000 videoplayer.py:63(__setPixel)
896640 10.746 0.000 11.781 0.000 apa102.py:143(set_pixel)
2685312 10.378 0.000 10.378 0.000 gamma.py:40(getScaledOutputForPixel)
1779 0.090 0.000 5.050 0.003 apa102.py:192(show)
60486 0.136 0.000 4.748 0.000 SPI.py:78(write)
60486 4.612 0.000 4.612 0.000 {method 'writebytes' of 'SpiDev' objects}
731713/731368 1.908 0.000 2.502 0.000 {built-in method builtins.len}
1072/5 0.026 0.000 2.336 0.467 <frozen importlib._bootstrap>:966(_find_and_load)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment