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

fixing waiting time metric #276

Merged
merged 1 commit into from
Oct 9, 2024
Merged

Conversation

jt-dd
Copy link
Contributor

@jt-dd jt-dd commented Oct 1, 2024

Fixing waiting time metric.

before:

INFO[11:53:08] Dumping Metadata                             
INFO[11:53:08] Stats for the run time duration: 57.097094292s / wait: 3m11.202109s / throttling: 334.871873% 
INFO[11:53:08] Dumping Metadata done          
INFO[11:53:09] KubeHound dump run has been completed in 58.66889575s          

after:

INFO[12:07:15] Dumping Metadata                             
INFO[12:07:15] Stats for the run time duration: 5m19.270919416s / wait: 4m54.122048s / throttling: 92.123031% 
INFO[12:07:15] Dumping Metadata done                        
INFO[12:07:18] KubeHound dump run has been completed in 5m43.414716208s 

@jt-dd jt-dd marked this pull request as ready for review October 9, 2024 11:33
@jt-dd jt-dd requested a review from a team as a code owner October 9, 2024 11:33
@edznux-dd
Copy link
Contributor

edznux-dd commented Oct 9, 2024

did you notice slowdown because you're locking before doing the rl.Take() call ? (I'm unsure about the contention it create there. I think it's fine but i'd need to dig a bit deeper if I wanted to make sure :D)

The unit test seems to be ok with the -race flag so I'd assume it's good enough to not end up in a deadlock (and I think it can't unless the rl.Take also can lock indefinitely which I don't think it can)

@jt-dd jt-dd merged commit f1bcebf into main Oct 9, 2024
8 checks passed
@jt-dd jt-dd deleted the jt-dd/fix-waiting-time-race-condition branch October 9, 2024 12:47
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