Skip to content

feat(serverless): add --order-by to space metrics summary - #266

Merged
Robert-Stam merged 1 commit into
mainfrom
feat/serverless-metrics-summary-order-by
Nov 25, 2026
Merged

Robert-Stam merged 1 commit into
mainfrom
feat/serverless-metrics-summary-order-by

Conversation

@Robert-Stam

Copy link
Copy Markdown
Contributor

Summary

Adds --order-by to qcloud serverless space metrics summary. It maps to GetSpaceSummaryMetricsRequest.order_by, added in public API #571 and already in the v0.234.0 the CLI depends on.

Value Request Order
name (default) SPACE_COLLECTION_METRICS_ORDER_UNSPECIFIED collection name, ascending
points SPACE_COLLECTION_METRICS_ORDER_POINT_COUNT_DESC point count, largest first
storage SPACE_COLLECTION_METRICS_ORDER_USED_STORAGE_BYTES_DESC used storage, largest first
  • With --page-size N, points or storage gives the top N collections without fetching every page. This case is shown in the new example.
  • The order is sent on every page when auto-paginating. The CLI keeps the server's order and doesn't re-sort.
  • --order-by and --totals-only are mutually exclusive, because totals-only returns no items.
  • Shell completion is added for the three values.
  • Long notes that ties are ordered by name and that pages are not stable while metric values change, as the proto comment says.

Testing

  • New tests: each value maps to the right enum; the default is unspecified; the order is kept on all pages and the server's order is preserved; an invalid value is rejected without an API call; the combination with --totals-only is rejected.
  • make lint, make build, make test and make docs pass (docs regenerated).

🤖 Generated with Claude Code

Written with Overlord from https://overlord.qdrant.tech/r/1089/t/7445

Expose the order_by field of GetSpaceSummaryMetrics (public API #571):
--order-by name|points|storage. points and storage list the largest
collections first, so --page-size N gives the top N without fetching
every page. It can't be combined with --totals-only, which returns no
items.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Robert-Stam
Robert-Stam requested a review from a team November 25, 2026 13:45
@Robert-Stam
Robert-Stam requested a review from a team as a code owner November 25, 2026 13:45
@Robert-Stam
Robert-Stam merged commit 575016d into main Nov 25, 2026
6 checks passed
@Robert-Stam
Robert-Stam deleted the feat/serverless-metrics-summary-order-by branch November 25, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants