RDKEMW-14887 : Update Stats.memoryUsage api to return value in bytes#82
Open
swethasukumarr wants to merge 2 commits into
Open
RDKEMW-14887 : Update Stats.memoryUsage api to return value in bytes#82swethasukumarr wants to merge 2 commits into
swethasukumarr wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Stats.memoryUsage API surface to report memory values in bytes (instead of KiB), aligning the C++ types, JSON parsing, tests, and OpenRPC specs/examples with the new contract.
Changes:
- Switched
Firebolt::Stats::MemoryInfofields fromuint32_ttouint64_tand updated JSON deserialization to read byte-based field names. - Updated unit/component tests and the API demo app to validate/display byte-based values and updated field names.
- Updated OpenRPC specifications (core, legacy, and app schemas) to reflect byte units, new property names, and updated examples.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/statsTest.cpp | Updates unit assertions to use byte-field names and uint64_t expectations. |
| test/component/statsTest.cpp | Updates component assertions to use byte-field names and uint64_t expectations. |
| test/api_test_app/apis/statsDemo.cpp | Updates demo output strings to explicitly label values as bytes. |
| src/json_types/stats.h | Updates required JSON fields and parsing to userMemoryUsed/userMemoryLimit/gpuMemoryUsed/gpuMemoryLimit as uint64_t. |
| include/firebolt/stats.h | Updates public API struct field types to uint64_t and clarifies bytes in the doc comment. |
| docs/openrpc/the-spec/firebolt-open-rpc.json | Updates Stats.memoryUsage summary, example payload, and schema property names/descriptions to bytes. |
| docs/openrpc/the-spec/firebolt-open-rpc--legacy.json | Mirrors the same bytes/property-name updates for the legacy spec. |
| docs/openrpc/the-spec/firebolt-app-open-rpc.json | Updates the app-facing MemoryInfo schema to byte-based property names and constraints. |
| docs/openrpc/openrpc/stats.json | Updates the module OpenRPC definition (summary, examples, schema) to byte-based fields. |
satlead
approved these changes
Jun 24, 2026
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.
No description provided.