wwbmmm commented on issue #1822: URL: https://github.com/apache/incubator-brpc/issues/1822#issuecomment-1202082072
> **Describe alternatives you've considered (描述你想到的折衷方案)** > bthread_attr_t 增加 fn,再切换时支持统计 看了下百度内部现有的bthread_attr_t自定义fn的方式不太满足这里的需求,因为server端bthread是由框架创建而不是由用户创建的,传不了自定义的bthread_attr_t。 因此,这个需求还需要重新开发。如果只是统计bthread的cpu消耗,可以考虑扩展一下bthread::TaskStatistics,加个cpu消耗的统计项,并且在bthread切换时更新该值。 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
