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 dequeue enqueue stats #98

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add dequeue enqueue stats #98

wants to merge 3 commits into from

Conversation

CorentinB
Copy link
Collaborator

No description provided.

@CorentinB CorentinB requested a review from equals215 July 26, 2024 16:40
@CorentinB CorentinB self-assigned this Jul 26, 2024
@@ -174,9 +174,6 @@ func (q *PersistentGroupedQueue) calculateAverageDuration(samples []Sample) OpAv
}

func (q *PersistentGroupedQueue) addSample(duration time.Duration, sampleType SampleType) {
q.stats.Lock()
Copy link
Member

Choose a reason for hiding this comment

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

you sure this will not cause any data race?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

you sure this will not cause any data race?

I'm not sure any lock is needed at the stats level here considering the entire queue struct (which hold the stats) is locked in Enqueue and Dequeue ?

@equals215
Copy link
Member

also can we display the stats using --live-stats flag?

@CorentinB
Copy link
Collaborator Author

also can we display the stats using --live-stats flag?

Nah, I don't think we should add too much stuff to live-stats.. We already added a lot with the recent PRs.

Base automatically changed from queue to main August 4, 2024 18:36
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