-
Notifications
You must be signed in to change notification settings - Fork 87
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
DISPATCH-2235: Dump time delay before lock is acquired #1346
base: main
Are you sure you want to change the base?
Conversation
src/router_core/forwarder.c
Outdated
@@ -154,7 +154,9 @@ qdr_delivery_t *qdr_forward_new_delivery_CT(qdr_core_t *core, qdr_delivery_t *in | |||
out_dlv->delivery_id = next_delivery_id(); | |||
out_dlv->link_id = out_link->identity; | |||
out_dlv->conn_id = out_link->conn_id; | |||
out_dlv->dispo_lock = sys_mutex(); | |||
char name[64]; | |||
snprintf(name, sizeof(name), "delivery-%"PRIu32, out_dlv->delivery_id); |
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 snprintf is in the fast path. Is this a problem ?
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.
It's probably overkill, especially for this lock which is hardly used.
In fact we probably want to avoid storing the mutex name (strdup call) when we're not explicitly debugging the locks.
Update coming soon...
Codecov Report
@@ Coverage Diff @@
## main #1346 +/- ##
==========================================
- Coverage 84.73% 84.66% -0.08%
==========================================
Files 114 114
Lines 28394 28405 +11
==========================================
- Hits 24059 24048 -11
- Misses 4335 4357 +22
Continue to review full report at Codecov.
|
- top five total waits: $ sort --reverse --numeric --key 3 <output-file> | head -5 - top five with waits > 1000 nsc: $ sort --reverse --numeric --key 7 <output-file> | head -5 - top five maximum single-call wait times: sort --reverse --numeric --key 9 <output-file> | head -5
7385e53
to
4569070
Compare
$ sort --reverse --numeric --key 3 | head -5
$ sort --reverse --numeric --key 7 | head -5
sort --reverse --numeric --key 9 | head -5