New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query : Adds Request Charge to Query Metrics #4252
Query : Adds Request Charge to Query Metrics #4252
Conversation
Microsoft.Azure.Cosmos/src/Query/Core/Metrics/ServerSideMetricsInternalAccumulator.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Query/Core/Metrics/ServerSidePartitionedMetrics.cs
Outdated
Show resolved
Hide resolved
Updated to add a new ServerSideCumulativeMetrics member TotalRequestCharge. I'm also fine with just leaving this out. Adding this to ServerSideMetrics instead would make the abstraction less clean imo since we would have to add the request charge after the object has been created. Edit: updated to add to ServerSideMetrics. This required adding an internal setter on the public ServerSideMetrics class which I am kinda iffy about. Can discuss offline if you have a preference on where the requestcharge should be located. Follow up edit: Looks like this actually isn't allowed, from test: VerifyAllPublicClassesCanBeMocked : Assert.AreEqual failed. Expected:<0>. Actual:<1>. The following methods and properties should be virtual to allow mocking:Class:Microsoft.Azure.Cosmos.ServerSideMetrics; Member:set_RequestCharge. Sorry for the confusion, reverting update and moving RequestCharge back to ServerSideCumulativeMetrics. |
Microsoft.Azure.Cosmos/src/Query/Core/Metrics/ServerSideMetricsTraceExtractor.cs
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Query/Core/Metrics/ServerSideMetricsTraceExtractor.cs
Outdated
Show resolved
Hide resolved
Signing off on contracts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
Adds per-partition RequestCharge to
ServerSidePartitionedMetrics
and TotalRequestCharge toServerSideCumulativeMetrics
.Type of change
Please delete options that are not relevant.