Commit 3c7a7bc
committed
[yugabyte#28803] docdb: Canonicalize thread names for perf endpoint
Summary:
The beta `/perf` endpoint generates flamegraphs. The default stack-collapse.pl script combines threads by name, but some of our threads have index numbers. This diff canonicalizes the thread names by truncating at the first numerical character and replacing all numbers with 0, so `prepare_347_wor` becomes `prepare_0`. (The code in this diff was created by @kfranz, I am just putting up the diff.)
Jira: DB-18514
Test Plan:
Checked perf endpoint and the stacks are correctly aggregated across workers now:
{F404101}
The stacks used to look like this, since each worker thread was a separate tower:
{F404103}
Reviewers: hsunder, kfranz
Reviewed By: kfranz
Subscribers: kfranz, ybase
Differential Revision: https://phorge.dev.yugabyte.com/D474961 parent 56d7846 commit 3c7a7bc
1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
287 | 294 | | |
288 | 295 | | |
289 | 296 | | |
| |||
0 commit comments