Skip to content

perf(diagnostics): bound RPC latency aggregation - #567

Open
beruro wants to merge 1 commit into
developfrom
junyu/rpc-diagnostics-lifecycle
Open

perf(diagnostics): bound RPC latency aggregation#567
beruro wants to merge 1 commit into
developfrom
junyu/rpc-diagnostics-lifecycle

Conversation

@beruro

@beruro beruro commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Problem

RPC latency aggregation and diagnostics retention can grow cardinality or preserve more raw detail than needed, increasing memory/persistence cost and privacy risk.

Solution

  • Bound RPC duration aggregation cardinality while preserving stable buckets.
  • Sanitize runtime counters before persistence/submission.
  • Retain only diagnostics detail required for performance investigation.
  • Add bucket-edge, queue, and sanitization coverage.
  • Validation: focused Vitest, TypeScript typecheck/ESLint, Rust usage-diagnostics tests/check/rustfmt, and diff check.

Potential risks

  • Over-aggressive sanitization or bucketing could remove useful diagnostic distinctions.
  • Bucket boundaries must remain stable for comparisons across versions.
  • This PR is independent of the async-resource and session stacks.

Verification

Previous GitHub CI on head ebd23423d:

  • pnpm install --frozen-lockfilePASS in Frontend (typecheck · lint · test).
  • pnpm typecheckPASS in Frontend (typecheck · lint · test).
  • pnpm lintPASS in Frontend (typecheck · lint · test).
  • pnpm run testPASS in Frontend (typecheck · lint · test).
  • node scripts/tauri/prepare-sidecars.cjs --profile debugPASS in Rust (clippy).
  • (cd src-tauri && cargo clippy --workspace --all-targets -- -D warnings)PASS in Rust (clippy).
  • AI-attribution history scan — PASS.

Current GitHub CI is re-running against the latest develop merge for head 173101a6a8; those results remain required before merge.

Pre-commit hook ran. Total eslint: 0, total circular: 0
@beruro
beruro force-pushed the junyu/rpc-diagnostics-lifecycle branch from 6c56ea8 to 173101a Compare August 10, 2026 05:24
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.

1 participant