Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

final powermon / power analysis reporting changes (do not merge) #636

Draft
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

geeksville
Copy link
Member

not ready for prime time. I won't change to !draft until finished with all the reporting goo (a week or two?). Just creating now so I can check on CI compliance

meshtastic-py3.12kevinh@kdesktop:~/development/meshtastic/meshtastic-python$  cd /home/kevinh/development/meshtastic/meshtastic-python ; /usr/bin/env /home/kevinh/.cache/pypoetry/virtualenvs/meshtastic-l6tP90xw-py3.12/bin/python /home/kevinh/.vscode/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher 52521 -- -m meshtastic --slog --power-ppk2-meter --power-stress --power-voltage 3.3
INFO file:ppk2.py __init__ line:52 Connected to Power Profiler Kit II (PPK2)
INFO file:__main__.py create_power_meter line:1022 Setting power supply to 3.3 volts
Connected to radio
INFO file:slog.py __init__ line:183 Writing slogs to /home/kevinh/.local/share/meshtastic/slogs/20240706-123803
INFO file:stress.py syncPowerStress line:68 Sending power stress command PRINT_INFO
INFO file:stress.py run line:105 Running power stress test 48 for 5.0 seconds
INFO file:stress.py syncPowerStress line:68 Sending power stress command LED_ON
INFO file:stress.py run line:105 Running power stress test 80 for 5.0 seconds
INFO file:stress.py syncPowerStress line:68 Sending power stress command BT_OFF
INFO file:stress.py run line:105 Running power stress test 81 for 5.0 seconds
INFO file:stress.py syncPowerStress line:68 Sending power stress command BT_ON
INFO file:stress.py run line:105 Running power stress test 34 for 5.0 seconds
INFO file:stress.py syncPowerStress line:68 Sending power stress command CPU_FULLON
INFO file:stress.py run line:105 Running power stress test 32 for 5.0 seconds
INFO file:stress.py syncPowerStress line:68 Sending power stress command CPU_IDLE
INFO file:stress.py run line:105 Running power stress test 33 for 5.0 seconds
INFO file:stress.py syncPowerStress line:68 Sending power stress command CPU_DEEPSLEEP
INFO file:stress.py run line:108 Power stress test complete.
INFO file:slog.py close line:201 Closing slogs in /home/kevinh/.local/share/meshtastic/slogs/20240706-123803
WARNING file:arrow.py close line:67 Discarding empty file: /home/kevinh/.local/share/meshtastic/slogs/20240706-123803/slog.arrow
INFO file:arrow.py close line:70 Compressing log data into /home/kevinh/.local/share/meshtastic/slogs/20240706-123803/power.feather
meshtastic-py3.12kevinh@kdesktop:~/development/meshtastic/meshtastic-python$
+        # Devices should _not_ be including a newline at the end of each log-line str (especially when
+        # encapsulated as a LogRecord).  But to cope with old device loads, we check for that and fix it here:
+        if line.endswith("\n"):
+            line = line[:-1]

Also: auto reformatting per our trunk formatting rules.
# Conflicts:
#	meshtastic/mesh_interface.py
@geeksville geeksville marked this pull request as draft July 8, 2024 15:55
Copy link

codecov bot commented Jul 8, 2024

Codecov Report

Attention: Patch coverage is 30.00000% with 133 lines in your changes missing coverage. Please review.

Project coverage is 58.38%. Comparing base (3c772b5) to head (628a4cb).

Files Patch % Lines
meshtastic/slog/slog.py 25.00% 42 Missing ⚠️
meshtastic/powermon/ppk2.py 4.00% 24 Missing ⚠️
meshtastic/powermon/stress.py 20.00% 20 Missing ⚠️
meshtastic/mesh_interface.py 56.09% 18 Missing ⚠️
meshtastic/ble_interface.py 14.28% 12 Missing ⚠️
meshtastic/__main__.py 33.33% 10 Missing ⚠️
meshtastic/slog/arrow.py 22.22% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #636      +/-   ##
==========================================
- Coverage   59.08%   58.38%   -0.70%     
==========================================
  Files          23       23              
  Lines        3414     3487      +73     
==========================================
+ Hits         2017     2036      +19     
- Misses       1397     1451      +54     
Flag Coverage Δ
unittests 58.38% <30.00%> (-0.70%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant