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

   ### What problem does this PR solve?
   
   Issue Number: resolve #2675
   
   Problem Summary:
   
   bvar::detail::AgentCombiner use LOCK or CAS operation as a general 
implementation for counter, but  the LOCK or CAS operation may be avoidable.
   
   ### What is changed and the side effects?
   
   Changed:
   
   Refer to 
[use-counter-with-bvar](https://github.com/baidu/babylon/tree/main/example/use-counter-with-bvar)
 to use babylon counter to implement bvar and improve bvar performance.
   
   Use bvar with babylon(>= 1.4.4) counter through `bazel build --define 
with_babylon_counter=true //:brpc`.
   
   Side effects:
   - Performance effects:
   
   Performance report from 
[use-counter-with-bvar](https://github.com/baidu/babylon/tree/main/example/use-counter-with-bvar):
   
   | AMD EPYC 7W83 64-Core Processor | bvar      | babylon bvar |
   |---------------------------------|-----------|----------|
   | adder                           | 12.51 ns  | 7.68 ns  |
   | maxer                           | 12.53 ns  | 8.21 ns  |
   | int_recorder                    | 15.48 ns  | 9.82 ns  |
   | latency_recorder                | 132.36 ns | 28.66 ns |
   
   - Breaking backward compatibility: 
   
   ---
   ### 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](https://github.com/apache/brpc/blob/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: [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]

Reply via email to