* feat(cli): add `checks stats` command for batch check analytics
Adds a new `checks stats` subcommand that shows availability, response times,
latency, and packet loss across all checks using the batch analytics endpoint.
Supports adaptive columns based on check types present, filtering by tag/type/search,
pagination, and json/md/table output formats.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(cli): add right-alignment for numeric columns in table output
Adds optional `align: 'right'` to ColumnDef for decimal-aligned numbers.
Applied to all metric columns in checks stats (availability, response time,
latency, packet loss) for easier visual comparison. Markdown tables get
`---:` separator for right-aligned columns.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(cli): respect --output flag for empty checks stats result
Return valid JSON with empty data array when no checks match and
output is json, instead of plain text.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* test(cli): add e2e tests for checks stats command
Adds populated account tests (default output, json, markdown, limit,
range, empty search filter) and empty account tests (plain text and
json empty state).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs(cli): explain why BatchQuickRange excludes last30Days and thisMonth
Rolling windows defeat ClickHouse caching under concurrency. lastMonth
is kept because its frozen data allows long cache TTLs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(cli): add trailing gap after right-aligned table columns
Right-aligned columns had no spacing between them because all padding
went to the left. Reserve a 2-char trailing gap within the column width
so columns don't stick together.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(cli): use consistent ms formatting in stats table for decimal alignment
Replace formatMetricValue with a table-specific formatTableMetric that
always keeps ms values in milliseconds with comma separators (340ms,
1,240ms, 25,070ms) instead of switching to seconds at 1000ms. This
ensures all values in a column share the same suffix, so right-alignment
produces true decimal alignment for easy visual comparison.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(cli): improve stats table formatting — seconds with 3dp and last-column alignment
Display timing metrics as seconds with 3 decimal places (e.g. 0.034s, 14.710s)
for readable comparison across all magnitudes. Fix right-alignment on the last
table column by adding trailingGap parameter to padColumn.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>