Go to file
Krzysztof kuhy Rudnicki 20d5d1f89b fix(usage_report): stop charging atop's HZ field as CPU; bundle since-last-report mode
atop's `-P PRC` output inserts the clock-tick rate (HZ=100) between the
`state` and `utime` columns. Both the Python parser and the native C
aggregator read that constant as utime for every record, charging a flat
1 CPU-second per record — so cpu_seconds collapsed to pid_count and
short-lived fork-storm commands (xset, dd, chronyc) topped the CPU table
(xset showed 67h). The old test fixtures lacked the HZ field, so code and
tests agreed on the bug.

- _parse_prc / atop_agg.c: read utime/stime past the HZ field (after+2/+3,
  tokens[10]/[11]); bump the length guards accordingly
- restore C/atop_agg (deleted in 89b4f59) under linux_configuration/C/,
  where the build path resolves; corrected test fixtures to include HZ
- _atop_agg_binary: fall back to the Python parser when the C source tree
  is gone instead of trusting an orphaned cached binary
- add regression tests proving HZ is not summed as CPU
- bundle the in-progress since-last-report multi-day aggregation (segments,
  -b/-e bounding, persisted state, window merging) and its tests/conftest
- meta: gate linux_configuration/tests in pytest_changed_packages.py

Verified by running usage_report.py --date 20260604: Top CPU now led by
SkyrimSE; xset/dd/chronyc fall to ~0. C unit tests + full pytest suite green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 18:13:47 +02:00
.github Add Claude Code GitHub Workflow (#5) 2026-05-28 07:07:12 +02:00
.hippo style: prettier format .hippo memory files 2026-05-28 07:05:24 +02:00
.vscode chore: archive 41 unmaintained directories to testsAndMisc-archive 2026-05-14 20:21:05 +02:00
docs fix(usage_report): stop charging atop's HZ field as CPU; bundle since-last-report mode 2026-06-04 18:13:47 +02:00
linux_configuration fix(usage_report): stop charging atop's HZ field as CPU; bundle since-last-report mode 2026-06-04 18:13:47 +02:00
meta fix(usage_report): stop charging atop's HZ field as CPU; bundle since-last-report mode 2026-06-04 18:13:47 +02:00
phone_focus_mode fix(phone): restore Blackview launcher for recents gesture 2026-05-31 16:27:08 +02:00
python_pkg refactor: split wake_alarm modules, fix ruff violations, enforce global coverage 2026-05-30 22:13:32 +02:00
third_party/agent-skills style(prettier): apply markdown/json formatting updates 2026-05-07 22:08:00 +02:00
.copilotignore chore: archive 41 unmaintained directories to testsAndMisc-archive 2026-05-14 20:21:05 +02:00
.fvmrc chore: consolidate root configs into meta/, drop unused C dir + split/pdfCentered/geo_data 2026-05-14 20:40:12 +02:00
.gitignore morning_routine: unified alarm+lock orchestrator, fix alarm audio/reliability 2026-05-25 18:55:27 +02:00
.pre-commit-config.yaml Split modules, fix tests, fix pre-commit batching 2026-05-22 22:48:28 +02:00
CLAUDE.md style: prettier format CLAUDE.md and evidence JSON 2026-05-30 22:13:54 +02:00
lint_python.sh chore: consolidate root configs into meta/, drop unused C dir + split/pdfCentered/geo_data 2026-05-14 20:40:12 +02:00
pyproject.toml chore: consolidate root configs into meta/, drop unused C dir + split/pdfCentered/geo_data 2026-05-14 20:40:12 +02:00
README.md chore: consolidate root configs into meta/, drop unused C dir + split/pdfCentered/geo_data 2026-05-14 20:40:12 +02:00
requirements.txt chore: consolidate root configs into meta/, drop unused C dir + split/pdfCentered/geo_data 2026-05-14 20:40:12 +02:00
run.sh chore: consolidate root configs into meta/, drop unused C dir + split/pdfCentered/geo_data 2026-05-14 20:40:12 +02:00

testsAndMisc

A collection of personal projects, scripts, and experiments — from a GPS-based phone focus tool to Linux/Arch automation, with CI, linting, and pre-commit hooks across the board.

Highlights

Phone Focus Mode

Location-based app restriction for rooted Android. Automatically disables non-whitelisted apps within 500 m of home using ADB + Magisk. Features Haversine distance calculation, hysteresis to prevent toggling, fail-safe unlock, and state persistence. Bash, Android ADB.

Linux Configuration

Automated Arch Linux setup: fresh-install scripts, i3 window manager config, LaTeX environment, and system tests. Includes documentation and test result logging.

Scripts

Utility scripts for development workflows — build file validation, secret detection, and custom makepkg helpers.

Repository Layout

Path Description
python_pkg/ Python packages (each maintained subpackage lives here)
linux_configuration/ Arch Linux setup, i3 config, system maintenance scripts
phone_focus_mode/ GPS-based Android focus enforcer
scripts/ Workspace-level helper scripts and pre-commit hooks
docs/ Reference docs and historical reports
third_party/ Vendored upstream skills/agents
meta/ Repo-wide tooling: pyproject.toml, requirements.txt, .pre-commit-config.yaml, run.sh, lint_python.sh, .fvmrc. Symlinked into the repo root so tools that auto-discover from root keep working.

Archived / unmaintained projects live in the sibling repository testsAndMisc-archive.

Tooling

  • Python linting: Ruff with all rules enabled (see meta/pyproject.toml)
  • Dependencies: pip install -r meta/requirements.txt (combined runtime + dev)
  • CI: GitHub Actions — lint, build, and test on push
  • Testing: pytest (Python), custom shell-based test harness for scripts