test: add unit tests for perf-metrics module#175
Conversation
Cover all public exports: incrementPerfCounter, setPerfGauge, recordPerfDuration, measurePerf, startPerfTimer, getPerfMetricsSnapshot, resetPerfMetrics, and formatPerfMetric. Includes edge cases for custom deltas, rounding precision, and duration recording on thrown errors.
Triage resultHuman attention: Quick readThis PR is a narrow test-only change that adds unit coverage for IntentAdd focused unit tests for the perf-metrics helpers so the module's public API and edge cases are covered without changing runtime behavior. WhyThe underlying gap was missing direct coverage for perf-metrics behavior. The added tests cover all public exports, including counters, gauges, timing snapshots, reset behavior, formatting, custom deltas, rounding to 3 decimals, and duration recording when Codex reviewNormalized GitHub Codex review data for the current head is empty. CI/CDTargeted feature validation passed on the PR branch with RecommendationThis is ready for a human landing decision. The change is right-sized, validated, review-clean, and conflict-clean, so the next step is a maintainer decision on merge or land. |
|
Landed via temp rebase onto main.\n\n- Gate: validation completed for this repo's change scope\n- Land commit: 1e18843\n- Merge commit: d63fa52\n\nThanks @Bortlesboat! |
Summary
src/perf-metrics.tsincrementPerfCounter,setPerfGauge,recordPerfDuration,measurePerf,startPerfTimer,getPerfMetricsSnapshot,resetPerfMetrics,formatPerfMetricTest plan
oxlint,oxfmt,tsc --noEmitclean