improve ContextManager.stopSpan performance: call ThreadLocal only once (#3068)
* improve ContextManager.stopSpan and awaitFinishAsync performance: call ThreadLocal only once For the [JMH benchmark test](https://gitlab.com/qxo1/Common-JMH-benchmark/-/jobs/251025992) : On gitlab CI(java 8): call ThreadLocal once vs twice fast over 10% My T480 java 8 : fast over 40%; java 11: fast over 50%; [The JMH benchmark code ](https://github.com/qxo/Common-JMH-benchmark/blob/master/src/main/java/test/ThreadLocalGetXTimeBenchmark.java) * Update apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/ContextManager.java Co-Authored-By: Nkezhenxu94 <kezhenxu94@163.com> * Update apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/ContextManager.java Co-Authored-By: Nkezhenxu94 <kezhenxu94@163.com> * Update apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/ContextManager.java Co-Authored-By: 吴晟 Wu Sheng <wu.sheng@foxmail.com>
Showing
想要评论请 注册 或 登录