Repository navigation
refactor: redesign basic query templates as RESTful resources with pagination - #46
Merged
Merged
Conversation
…gination Replace 4 specialized templates (active_blocks, blocks_by_size, events_by_action, memory_timeline) with 3 generic resource-style templates (block, event, allocation): - block: all fields support equality; size/allocEventId/freeEventId additionally support range (min_*/max_*); removes state filter; address output type changed from hex to int - event: all fields support equality; id additionally supports range; includes offset for pagination - allocation: returns (id, allocated, active, reserved) for timeline charts; removes action parameter and column; includes offset All three templates now support offset parameter alongside limit. Closes #45
codeasier
force-pushed
the
feat/restful-basic-query-templates
branch
from
April 18, 2026 14:20
295acbb to
e3a977e
Compare
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.
Summary
active_blocks,blocks_by_size,events_by_action,memory_timeline) with 3 RESTful-style resource templates (block,event,allocation)offsetparameter for paginationblock: all fields support equality;size/allocEventId/freeEventIdadditionally support range; removesstatefilter;addressoutput type changed fromhextointevent: all fields support equality;idadditionally supports rangeallocation: returns only(id, allocated, active, reserved)for timeline charts; removesactionparameter and columnTest plan
pytest -vpasses (225 passed, 1 pre-existing unrelated failure)pt-snap query --listshows the 3 new basic templatespt-snap query --template-use block --device 0 --min_size 1048576 --limit 10workspt-snap query --template-use event --device 0 --action 4 --limit 50 --offset 10workspt-snap query --template-use allocation --device 0 --min_id 0 --max_id 1000worksCloses #45