chenBright opened a new pull request, #3709:
URL: https://github.com/apache/brpc/pull/3709
### What problem does this PR solve?
Issue Number: resolve
Problem Summary:
Native IntRecorder and Reducer writes load the combiner pointer before
reading the AgentId
used to locate the TLS agent.
### What is changed and the side effects?
Changed:
- Cache the existing AgentId as a const member in native IntRecorder and
Reducer.
- Look up already-bound TLS agents directly, falling back to the original
initialization path for
missing or expired bindings.
Side effects:
- Performance effects:
Local benchmarks on Xeon Platinum 8469C with GCC 13.3 (-O2), pinned physical
cores,
10,000 metrics and 32 writers. Throughput is measured in millions of writes
per second (Mops/s).
| Workload | Before (Mops/s) | After (Mops/s) | Throughput improvement |
|---|---:|---:|---:|
| Adder | 1,359.367 | 2,279.835 | +67.71% |
| IntRecorder | 1,082.631 | 1,577.756 | +45.73% |
| LatencyRecorder | 141.827 | 154.465 | +8.91% |
| LatencyRecorder with sampling | 142.696 | 157.873 | +10.64% |
- 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]