Skip to content

feat(embedding): expose query execution statistics - #20

Merged
aunjgr merged 2 commits into
matrixorigin:upstream-dev-mergefrom
aunjgr:feature/28966-execution-stats
Sep 21, 2026
Merged

aunjgr merged 2 commits into
matrixorigin:upstream-dev-mergefrom
aunjgr:feature/28966-execution-stats

Conversation

@aunjgr

@aunjgr aunjgr commented Sep 21, 2026

Copy link
Copy Markdown

Description

Embedded MatrixOne parity and cutover evidence needs query-local proof that work actually ran on GPU and stayed within the bounded MO, TAE, and result ownership windows. This PR adds an ABI-v1 execution-statistics snapshot retained until query close, with first-terminal-wins status, source isolation, GPU task counts, and charged/admitted capacity telemetry.

The counters are query-owned and thread-safe. MO-only queries cannot populate TAE admission fields. Retained-charge gauges retire before budget credit wakes a replacement owner, so observed peaks cannot exceed a hard window through handoff ordering. Failed TAE admission does not count a permit that never existed. The existing ABI version and capability mask are unchanged.

The C API contract and field semantics are documented in docs/embedding-c-api.md. This is intentionally telemetry only; MatrixOne consumption and the five-route parity campaign are separate follow-up work.

Verification

  • Incremental Pixi build of sirius_native_control_unittest, sirius_c_smoke, sirius_native_result_integration, and sirius_native_gpu_unittest
  • 24 native input/result/stats CPU cases: 199 assertions
  • 7 native GPU ownership/admission/result cases: 10,423 assertions
  • Real C ABI smoke consumer
  • Production native integration: TAE multi-block result, ordered/unordered 96 MiB bounded results, cancellation, deadline, and borrowed lifetime
  • clang-format and diff checks
  • Independent lifecycle/accounting review; both findings fixed with deterministic regressions

Checklist

  • Read CONTRIBUTING.md and ensure PR meets reviewability checklist
  • Cover changes with new or existing tests
  • Document configuration changes in code and summarize in the description above (no configuration option changes)
  • Update human and agent documentation (C API documentation updated; no agent contract changes)

References

Refs matrixorigin/matrixone#28966

@aunjgr
aunjgr merged commit 759f826 into matrixorigin:upstream-dev-merge Sep 21, 2026
4 of 7 checks passed
zuyu pushed a commit that referenced this pull request Oct 14, 2026
* feat: expose query execution statistics

* style: apply repository clang-format
zuyu pushed a commit that referenced this pull request Oct 21, 2026
* feat: expose query execution statistics

* style: apply repository clang-format
zuyu pushed a commit that referenced this pull request Oct 22, 2026
* feat: expose query execution statistics

* style: apply repository clang-format
zuyu pushed a commit that referenced this pull request Nov 26, 2026
* feat: expose query execution statistics

* style: apply repository clang-format
zuyu pushed a commit that referenced this pull request Nov 26, 2026
* feat: expose query execution statistics

* style: apply repository clang-format
zuyu pushed a commit that referenced this pull request Nov 28, 2026
* feat: expose query execution statistics

* style: apply repository clang-format
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