Hourly monitoring reports improvements + new K008

This MR improves the hourly query reports and adds a new one.

Changes

  • Add K008: Top queries by shared blocks hit+read
    • Ranks queries by (shared hit bytes + shared read bytes).
    • Uses a new internal helper to do hourly topk by sum of two metrics (avoids the incorrect “union(top hits, top reads)” approach).
    • Includes schema + unit tests + wiring into generate_all_reports() and CLI --check-id.
  • Clarify K003 naming
    • Renames/clarifies K003 title to explicitly reflect total time = exec + plan (schema/title update).
  • Fix per-query-id extraction
    • Improves extraction logic so per-query JSON generation correctly discovers queryids from reports (unit tested).
  • Misc hourly reporting adjustments
    • Updates report names, query limits, and multi-cluster filename prefix behavior (docs/tests adjusted accordingly).

Files touched

  • reporter/postgres_reports.py
  • reporter/schemas/K003.schema.json, K004.schema.json, K005.schema.json, K006.schema.json, K007.schema.json, K008.schema.json
  • tests/reporter/test_extract_queryids_from_reports_unit.py
  • tests/reporter/test_generators_hourly_unit.py
  • tests/reporter/test_generators_unit.py
  • tests/reporter/test_report_schemas_hourly.py
  • README.md
  • reporter/requirements-dev.txt

Issue: https://gitlab.com/postgres-ai/platform/-/issues/346

Merge request reports

Loading