Skip to content

feat: add CallbackExporter for in-memory event re-use in tests - #257

Merged
rapids-bot[bot] merged 1 commit into
rapidsai:mainfrom
johanpel:exporter-in-memory
Jun 25, 2026
Merged

feat: add CallbackExporter for in-memory event re-use in tests#257
rapids-bot[bot] merged 1 commit into
rapidsai:mainfrom
johanpel:exporter-in-memory

Conversation

@johanpel

@johanpel johanpel commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

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

@johanpel johanpel added feature request New feature or request non-breaking Introduces a non-breaking change labels Jun 25, 2026
@johanpel johanpel self-assigned this Jun 25, 2026
@johanpel
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
johanpel force-pushed the exporter-in-memory branch from 08b3dee to 8d160b9 Compare June 25, 2026 12:45
@johanpel
johanpel marked this pull request as ready for review June 25, 2026 12:46
@johanpel

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit db2a5e6 into rapidsai:main Jun 25, 2026
11 checks passed
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature request New feature or request non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants