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

Add stats collector interface and impl #159

Merged
merged 2 commits into from
Oct 29, 2024
Merged

Add stats collector interface and impl #159

merged 2 commits into from
Oct 29, 2024

Conversation

pnwpedro
Copy link
Collaborator

Description

  • Add Stats class that presents an aggregate view of QueryStats
  • Add StatsCollector interface
  • Add StatsCollectorImpl as a default implementation
  • Add TestStatsCollectorImpl

This does NOT wire anything into the client yet.

Motivation and context

BT-4971

We need a class to aggregate query stats that's thread safe and can be instantiated per client. This handles stats tracking for pagination and other use cases where query stats from queries performed at lower levels aren't easily accessible, or where customers which to track stats through a single pane.

How was the change tested?

  • Added unit tests

Screenshots (if appropriate):

Change types

    • Bug fix (non-breaking change that fixes an issue)
    • New feature (non-breaking change that adds functionality)
    • Breaking change (backwards-incompatible fix or feature)

Checklist:

    • My code follows the code style of this project.
    • My change requires a change to Fauna documentation.
    • My change requires a change to the README, and I have updated it accordingly.

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

@pnwpedro pnwpedro requested a review from jdcryans October 29, 2024 13:34
@pnwpedro pnwpedro merged commit 7ff2777 into main Oct 29, 2024
1 check passed
@pnwpedro pnwpedro deleted the stats-collector-impl branch October 29, 2024 15:01
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.

2 participants