-
Notifications
You must be signed in to change notification settings - Fork 4k
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
naming timer sampling and worker threads #2136
Conversation
src/bvar/detail/sampler.cpp
Outdated
@@ -108,6 +109,7 @@ class SamplerCollector : public bvar::Reducer<Sampler*, CombineSampler> { | |||
void run(); | |||
|
|||
static void* sampling_thread(void* arg) { | |||
butil::PlatformThread::SetName("brpc_sampling"); |
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.
In addition to the sampling thread, bvar also has a grab thread and two dump threads. (see variable.cpp and collector.cpp) Can you also add names to them?
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.
done
cc836b1
to
c63edac
Compare
brpc/src/brpc/details/usercode_backup_pool.cpp Lines 103 to 106 in d6df0f1
Can you also add name to UserCodeBackupPool? |
done |
LGTM |
* naming timer sampling and worker threads * naming colloctor and varaiable * naming usercode backup thread --------- Co-authored-by: DongSheng He <hds@dipeak.com>
* naming timer sampling and worker threads * naming colloctor and varaiable * naming usercode backup thread --------- Co-authored-by: DongSheng He <hds@dipeak.com>
What problem does this PR solve?
Issue Number: #1923
Problem Summary: Naming threads for debugging.
线程命名方式:
brpc
开头 +线程用途
。其中 worker 线程以 id 作为区分。
What is changed and the side effects?
No
Changed:
Naming sampling, timer and worker threads.
Side effects:
No
No
Check List: