Skip to content

Conversation

@PapaPedro
Copy link
Contributor

We are currently sending the memory_usage_mb and timeInMs fields in
the agent overhead metadata, unfortunately the schema for those is INT
which means they are currently discarded when the profile is validated
at submission time. This does not prevent profiles from being accepted
but we lose the overhead data which means we will not show it in the UI.

This change converts them to int before we serialize the report.
It would be nice for the backend to accept decimals at least for the
memory since it is in MB and we may often be under 1MB. But at the
moment it is better to align to current schema.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@mirelap-amazon mirelap-amazon requested a review from a team July 21, 2021 17:22
We are currently sending the `memory_usage_mb` and `timeInMs` fields in
the agent overhead metadata, unfortunately the schema for those is INT
which means they are currently discarded when the profile is validated
at submission time. This does not prevent profiles from being accepted
but we lose the overhead data which means we will not show it in the UI.

This change converts them to int before we serialize the report.
It would be nice for the backend to accept decimals at least for the
memory since it is in MB and we may often be under 1MB. But at the
moment it is better to align to current schema.
@PapaPedro PapaPedro force-pushed the fix_agent_overhead_format branch from c145034 to cca9d6c Compare July 21, 2021 17:30
},
"agentOverhead": {
"memory_usage_mb": memory_usage_mb
"memory_usage_mb": int(memory_usage_mb)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be memoryInMB

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just checked the internal schema and that's right, I'll update, thanks for noticing this.

@mirelap-amazon mirelap-amazon requested a review from a team July 27, 2021 11:08
@mirelap-amazon mirelap-amazon self-assigned this Jul 27, 2021
@mirelap-amazon mirelap-amazon merged commit c0f4bf4 into main Jul 27, 2021
@mirelap-amazon mirelap-amazon deleted the fix_agent_overhead_format branch July 27, 2021 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants