You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by "ehds (via GitHub)" <gi...@apache.org> on 2023/02/24 07:23:10 UTC

[PR] naming timer sampling and worker threads (brpc)

ehds opened a new pull request, #2136:
URL: https://github.com/apache/brpc/pull/2136

   ### What problem does this PR solve?
   
   Issue Number: https://github.com/apache/brpc/issues/1923
   
   Problem Summary: Naming threads for debugging.
   
   ### What is changed and the side effects?
   No
   Changed:
   Naming sampling, timer and worker threads.
   Side effects:
   - Performance effects(性能影响):
   No
   - Breaking backward compatibility(向后兼容性): 
   No
   ---
   ### Check List:
   - Please make sure your changes are compilable(请确保你的更改可以通过编译).
   - When providing us with a new feature, it is best to add related tests(如果你向我们增加一个新的功能, 请添加相关测试).
   - Please follow [Contributor Covenant Code of Conduct](../../master/CODE_OF_CONDUCT.md).(请遵循贡献者准则).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [PR] naming timer sampling and worker threads (brpc)

Posted by "wwbmmm (via GitHub)" <gi...@apache.org>.
wwbmmm commented on code in PR #2136:
URL: https://github.com/apache/brpc/pull/2136#discussion_r1116771544


##########
src/bvar/detail/sampler.cpp:
##########
@@ -108,6 +109,7 @@ class SamplerCollector : public bvar::Reducer<Sampler*, CombineSampler> {
     void run();
 
     static void* sampling_thread(void* arg) {
+        butil::PlatformThread::SetName("brpc_sampling");

Review Comment:
   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?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [PR] naming timer sampling and worker threads (brpc)

Posted by "ehds (via GitHub)" <gi...@apache.org>.
ehds commented on PR #2136:
URL: https://github.com/apache/brpc/pull/2136#issuecomment-1445045408

   > UserCodeBackupPool
   
   done


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [PR] naming timer sampling and worker threads (brpc)

Posted by "wwbmmm (via GitHub)" <gi...@apache.org>.
wwbmmm commented on PR #2136:
URL: https://github.com/apache/brpc/pull/2136#issuecomment-1445553234

   LGTM


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [PR] naming timer sampling and worker threads (brpc)

Posted by "zyearn (via GitHub)" <gi...@apache.org>.
zyearn merged PR #2136:
URL: https://github.com/apache/brpc/pull/2136


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [PR] naming timer sampling and worker threads (brpc)

Posted by "ehds (via GitHub)" <gi...@apache.org>.
ehds commented on code in PR #2136:
URL: https://github.com/apache/brpc/pull/2136#discussion_r1117184963


##########
src/bvar/detail/sampler.cpp:
##########
@@ -108,6 +109,7 @@ class SamplerCollector : public bvar::Reducer<Sampler*, CombineSampler> {
     void run();
 
     static void* sampling_thread(void* arg) {
+        butil::PlatformThread::SetName("brpc_sampling");

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [PR] naming timer sampling and worker threads (brpc)

Posted by "chenBright (via GitHub)" <gi...@apache.org>.
chenBright commented on PR #2136:
URL: https://github.com/apache/brpc/pull/2136#issuecomment-1444990005

   https://github.com/apache/brpc/blob/d6df0f156ad6bd8ec6722a3c3c15691607bb62e7/src/brpc/details/usercode_backup_pool.cpp#L103-L106
   
   Can you also add names to UserCodeBackupPool?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org