Skip to content

feat(analyzer): add entity listing endpoint and remove long entities from resource timeline endpoint - #240

Closed
johanpel wants to merge 5 commits into
rapidsai:mainfrom
johanpel:list-entity-endpoint
Closed

feat(analyzer): add entity listing endpoint and remove long entities from resource timeline endpoint#240
johanpel wants to merge 5 commits into
rapidsai:mainfrom
johanpel:list-entity-endpoint

Conversation

@johanpel

Copy link
Copy Markdown
Contributor

Description

WIP

Related Issues

Part of #214
Alternative to: #217

@johanpel johanpel added breaking Introduces a breaking change feature request New feature or request labels Jun 22, 2026
@johanpel johanpel self-assigned this Jun 24, 2026
johanpel and others added 5 commits June 25, 2026 11:07
Add the entities module (EntityListEntry/Request, BulkEntityListRequest, list
and bulk responses), shared PageParams, a generic FiniteStateMachine::try_from_fsm,
and the /bulk umbrella request bundling timeline and entity-list queries under
one shared app_params. Remove the long-entity fields from the timeline
request/response — long entities now live on the dedicated entity-list query.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Implement list_entities and a single-pass bulk_list_entities ranking any
application FSM by its longest usage span on an optional scope, tiebroken by
entity UUID. Convert FsmCollection to associated-type form (the entity-list
seam) and drop the long-entity collection from the binned timeline builders.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add POST /entities (single) and POST /bulk (timelines + entity-lists bundled),
routing timelines through the existing chunk cache and entities through
bulk_list_entities. Trim the long-entity machinery from the timeline cache.
Export the new ts-rs bindings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…xed scenario

Refactor the fixed emitter into lib + bin so emit() and the entity UUIDs are
reusable, and add tests that emit the fixed scenario, import it, and assert
list_entities and bulk_list_entities for scope, UUID tiebreak, duration
ordering, min_usage filtering, and pagination.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Stopgap so the UI compiles against the trimmed timeline contract; the UI team
will migrate long-entity rendering to the /entities endpoint. getLongFsms
returns [] and the removed long_entities_threshold_s field is dropped from the
timeline request literals.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@johanpel
johanpel force-pushed the list-entity-endpoint branch from cd1ccb6 to 6555054 Compare June 25, 2026 09:15
rapids-bot Bot pushed a commit that referenced this pull request Jun 25, 2026
# Description

Replace `FsmCollection<F, T>` with a single associated `type Fsm`, and drop the
uncalled `contains_fsm_type`. Lets a collection expose exactly one FSM type and
unblocks bounding generic code on it. No behavior change.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

## Related Issues

Part of #214, split off from #240

Authors:
  - Johan Peltenburg (https://github.com/johanpel)

Approvers:
  - Matthijs Brobbel (https://github.com/mbrobbel)

URL: #256
rapids-bot Bot pushed a commit that referenced this pull request Jun 25, 2026
# 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<T> — 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

Authors:
  - Johan Peltenburg (https://github.com/johanpel)

Approvers:
  - Matthijs Brobbel (https://github.com/mbrobbel)

URL: #257
@johanpel johanpel added the DO NOT MERGE Hold off on merging; see PR for details label Jun 30, 2026
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
@johanpel

Copy link
Copy Markdown
Contributor Author

This is getting very stale, closing and will redo when needed

@johanpel johanpel closed this Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Introduces a breaking change DO NOT MERGE Hold off on merging; see PR for details feature request New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant