mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-10 21:27:02 +01:00
Lifts the atop subprocess machinery into _usage_report_atop.py: running atop, streaming its parseable output, building/caching the atop_agg C helper, and reading its TSV. What stays is record parsing, epoch windows and per-day merging. Verified by the 100%-coverage tests from the previous commit. An AST comparison of all 16 functions against HEAD reports 16 identical, 0 mismatches. _usage_report_render.py imported _run from the parsing module; it now imports from the module that owns it. That is the same re-export barrel the last split shipped and had to fix in a follow-up - caught in the same commit this time. usage_report.py needed no edit at all. Both modules hold 100% line+branch (94/28 and 130/34, 0 missed). 179 tests before and after; the five new test files collect 8+6+4+14+5 = 37, which is last commit's 36 plus the one re-homed out of test_usage_report_modes.py, where it referenced a constant that had moved out from under it. The two test files added last commit were themselves over cap (373, 272) so they are split five ways here - the DropZone lesson from earlier today, where a lint fix silently added an over-cap file. Ran the program: a real report from today's logs, through the native atop_agg path, which is precisely the code this commit moved. Over-cap 39 -> 38. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY |
||
|---|---|---|
| .. | ||
| lib | ||
| __init__.py | ||
| conftest.py | ||
| test_android_guardian_post_fs_data.sh | ||
| test_android_guardian_service.sh | ||
| test_fast_count.py | ||
| test_hosts_file_monitor.sh | ||
| test_hosts_guard_pacman_integration.sh | ||
| test_i3blocks_efficiency.sh | ||
| test_i3blocks_persist_common.sh | ||
| test_makepkg_capped.sh | ||
| test_makepkg_wrapper.sh | ||
| test_monitor_report.py | ||
| test_music_parallelism.sh | ||
| test_network_diagnostics.bats | ||
| test_pacman_wrapper_security.sh | ||
| test_security_hardening.sh | ||
| test_session_autopsy_hooks.py | ||
| test_setup_dns_blocker.sh | ||
| test_shutdown_timer_monitor.sh | ||
| test_strip_workout_hosts.py | ||
| test_usage_monitoring_installer_efficiency.sh | ||
| test_usage_report_aggregate.py | ||
| test_usage_report_atop_build.py | ||
| test_usage_report_atop_io.py | ||
| test_usage_report_atop_pipeline.py | ||
| test_usage_report_format.py | ||
| test_usage_report_gpu_table.py | ||
| test_usage_report_host.py | ||
| test_usage_report_merge.py | ||
| test_usage_report_modes.py | ||
| test_usage_report_parse_records.py | ||
| test_usage_report_pmon_names.py | ||
| test_usage_report_render.py | ||
| test_usage_report_since.py | ||
| test_usage_report_tables.py | ||
| test_validate_contract.py | ||
| test_validate_evidence.py | ||