-
Notifications
You must be signed in to change notification settings - Fork 9
t1456: count all full-loop workers in pulse utilization #4234
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1682,7 +1682,7 @@ prefetch_contribution_watch() { | |||||
| ####################################### | ||||||
| count_active_workers() { | ||||||
| local count | ||||||
| count=$(ps axo command | grep '\.opencode run' | grep '/full-loop Implement issue #' | grep -v '/pulse' | grep -c -v grep) || count=0 | ||||||
| count=$(ps axo command | grep '\.opencode run' | grep '/full-loop' | grep -v '/pulse' | grep -v 'Supervisor Pulse' | grep -c -v grep) || count=0 | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This chain of
Suggested change
References
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make the supervisor exclusion more specific. Line 1685 filters out any argv containing |
||||||
| echo "$count" | ||||||
| return 0 | ||||||
| } | ||||||
|
|
||||||
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.
This long chain of
grepcommands can be made more efficient and arguably more readable by using a singleawkcommand. This avoids spawning multiple processes for filtering and counting.References
grepchains) into a single, more efficient tool likeawkto improve performance, similar to replacinggrep | sedwith a singlesedcommand.