Open dzervas opened 4 years ago
Added some more prints
❯ grep "^\[go\]\[process_timeouts\] " /tmp/kmk_all.log | ../stats.py
Amount of samples: 1366
Max: 31.25
Min: 0.0
Average: 0.11438506588579796
Median: 0.0
Median Low: 0.0
Median High: 0.0
I tested ramping up I2C at 1.7MHz (max for MCP):
❯ command grep "^\[go\] " /tmp/kmk_1.7.log | ../stats.py
Amount of samples: 1601
Max: 93.75
Min: 0.0
Average: 40.34587757651468
Median: 31.25
Median Low: 31.25
Median High: 31.25
I'm losing some keystrokes here and there and I also want to implement display features, so it's sane to do a bit of a performance hit research. I'm not into GDB and regular profiling (I suck) so bunch of prints should be able to tell us just some basic info.
Stats captured with MCP23017 on all columns with I2C on 100kHz
Setup
I a bunch of prints using
time.monotonic()
deltas and a quick python script to compute the statistics. The prints diff (based on commit aebf516ffdf4eb4b9e393ac72547ce85e36a84b1 on my fork):Python script to parse all these:
stats.py
Usage
First of all, dump all serial output to a log file - with debug DISABLED:
miniterm.py --raw /dev/ttyACM0 115200 | tee /tmp/kmk.log
Find all available log messages
Find stats for a specific log (whole go function):
Results
Whole go function
scan_for_changes
_send_hid