feat: add CallbackExporter for in-memory event re-use in tests - #257
Merged
Conversation
johanpel
marked this pull request as draft
June 25, 2026 12:07
Add a `quent-exporter-callback` crate (exposed via the umbrella's opt-in `callback` feature and `ExporterOptions::Callback`) that forwards each event, type-erased as a boxed `Event<T>`, to a thread-safe callback. Lets tests give a context a callback, collect events in an `Arc<Mutex<Vec<_>>>`, and inspect them after dropping the context — no serialization, no files. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
johanpel
force-pushed
the
exporter-in-memory
branch
from
June 25, 2026 12:45
08b3dee to
8d160b9
Compare
johanpel
marked this pull request as ready for review
June 25, 2026 12:46
mbrobbel
approved these changes
Jun 25, 2026
Contributor
Author
|
/merge |
johanpel
added a commit
to johanpel/quent
that referenced
this pull request
Jun 29, 2026
Add a dedicated, paginated entity-list query: POST /api/engines/{id}/entities.
The contract (entities module: scope, window, filter, sort, page, plus per-query
application params) and a generic FiniteStateMachine::try_from_fsm live in
quent-ui; UiAnalyzer::list_entities and its analyzer helper rank any application
FSM by its longest usage span on an optional scope, tiebroken by entity UUID.
Application-specific filters ride in the per-query params: the simulator filters
by operator via OperatorFilter, mirroring the timeline. Additive only — no
timeline changes.
The functional test captures the fixed scenario in memory via a CallbackExporter
(rapidsai#257) and reconstructs the event stream with a new
quent-simulator-instrumentation::test_utils helper. ts-rs bindings included.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
rapids-bot Bot
pushed a commit
that referenced
this pull request
Jul 13, 2026
# Description
Adds `POST /api/engines/{engine_id}/entities`: a paginated query listing a
query's FSM entities ranked by longest resource-usage span (tiebroken by UUID),
to back the UI's long-entities view. Additive — no timeline changes.
Request: optional scope (resource / group), query-relative window, filters
(`entity_type_name`, `min_usage_s`), sort, page, and a per-query `OperatorFilter`.
Contract lives in `quent-ui`; a generic `entities::list_entities` ranks any
`FsmCollection` FSM, with operator filtering applied by the analyzer (kept out of
the generic filter).
Functional test over the fixed scenario captures events in memory via
`CallbackExporter` and reconstructs them with a new
`quent-simulator-instrumentation::test_utils` helper.
Depends on #256 and #257 (merged).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
## Related Issues
Part of #214, isolated from #240
Authors:
- Johan Peltenburg (https://github.com/johanpel)
Approvers:
- Dhruv Vats (https://github.com/dhruv9vats)
URL: #258
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a quent-exporter-callback crate, exposed through the umbrella's opt-in callback feature as ExporterOptions::Callback, that forwards each event — type-erased as a boxed Event — to a thread-safe callback. This lets tests give a context a callback, collect emitted events in an Arc<Mutex<Vec<_>>>, and re-use them after dropping the context, with no serialization or files.
🤖 Generated with Claude Code (https://claude.com/claude-code)
Related Issues
Useful for tests such as those that will be added as a part of #214 + #240