Skip to content
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

Merged
merged 17 commits into from Jan 19, 2024

Conversation

Maya-Painter
Copy link
Contributor

@Maya-Painter Maya-Painter commented Jan 15, 2024

Description

Adds per-partition RequestCharge to ServerSidePartitionedMetrics and TotalRequestCharge to ServerSideCumulativeMetrics.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

@adityasa
Copy link
Contributor

public abstract class ServerSidePartitionedMetrics

Not an ask from this customer, but should we update the cumulative metrics as well?


Refers to: Microsoft.Azure.Cosmos/src/Query/Core/Metrics/ServerSidePartitionedMetrics.cs:10 in 4aa0a48. [](commit_id = 4aa0a48, deletion_comment = False)

@Maya-Painter
Copy link
Contributor Author

Maya-Painter commented Jan 16, 2024

public abstract class ServerSidePartitionedMetrics

Not an ask from this customer, but should we update the cumulative metrics as well?

Refers to: Microsoft.Azure.Cosmos/src/Query/Core/Metrics/ServerSidePartitionedMetrics.cs:10 in 4aa0a48. [](commit_id = 4aa0a48, deletion_comment = False)

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.

@kirankumarkolli
Copy link
Member

Signing off on contracts

Copy link
Contributor

@sboshra sboshra left a comment

Choose a reason for hiding this comment

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

:shipit:

Copy link
Contributor

@adityasa adityasa left a comment

Choose a reason for hiding this comment

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

:shipit:

@Maya-Painter Maya-Painter added the auto-merge Enables automation to merge PRs label Jan 19, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot merged commit 3c18156 into master Jan 19, 2024
21 checks passed
@microsoft-github-policy-service microsoft-github-policy-service bot deleted the users/mayapainter/querycharge branch January 19, 2024 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Enables automation to merge PRs QUERY
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants