-
Notifications
You must be signed in to change notification settings - Fork 48
Add USDT probes for Nexus background tasks #8567
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
Open
bnaecker
wants to merge
3
commits into
main
Choose a base branch
from
nexus-background-task-probes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/sbin/dtrace -Zqs | ||
|
||
/* This script prints the result of every background task's activation. | ||
* It includes the task name, its iteration, the reason the task ran, | ||
* and the result and duration of the execution. Here's an example: | ||
* | ||
* task_name="dns_servers_internal" iteration=2 reason=Signaled details={"addresses":["[::1]:56144"]} duration=22054us | ||
* task_name="dns_servers_external" iteration=2 reason=Signaled details={"addresses":["[::1]:56161"]} duration=21254us | ||
* task_name="dns_propagation_internal" iteration=2 reason=Dependency details={"error":"no config"} duration=511us | ||
* task_name="dns_propagation_external" iteration=2 reason=Dependency details={"error":"no config"} duration=19us | ||
* task_name="v2p_manager" iteration=13 reason=Signaled details={} duration=432252us | ||
* task_name="dns_servers_internal" iteration=2 reason=Signaled details={"addresses":["[::1]:36483"]} duration=21347us | ||
* task_name="dns_servers_external" iteration=2 reason=Signaled details={"addresses":["[::1]:50606"]} duration=20789us | ||
* task_name="dns_propagation_internal" iteration=2 reason=Dependency details={"error":"no config"} duration=38us | ||
* task_name="dns_propagation_external" iteration=2 reason=Dependency details={"error":"no config"} duration=11us | ||
* task_name="vpc_route_manager" iteration=10 reason=Signaled details={} duration=485381us | ||
*/ | ||
|
||
nexus*:::background-task-activate-start | ||
{ | ||
this->task_name = copyinstr(arg0); | ||
iters[this->task_name] = arg1; | ||
reasons[this->task_name] = copyinstr(arg2); | ||
ts[this->task_name] = timestamp; | ||
} | ||
|
||
nexus*:::background-task-activate-done | ||
/iters[copyinstr(arg0)] == arg1/ | ||
{ | ||
this->task_name = copyinstr(arg0); | ||
this->duration = timestamp - ts[this->task_name]; | ||
printf( | ||
"task_name=\"%s\" iteration=%d reason=%s details=%s duration=%dus\n", | ||
this->task_name, | ||
iters[this->task_name], | ||
reasons[this->task_name], | ||
copyinstr(arg2), | ||
this->duration / 1000 | ||
); | ||
iters[this->task_name] = 0; | ||
reasons[this->task_name] = 0; | ||
ts[this->task_name] = 0; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Like the other one, some example output would be useful here.
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.
Added in c873b46