qxo edited a comment on issue #3068: improve ContextManager.stopSpan 
performance: call ThreadLocal only once
URL: https://github.com/apache/skywalking/pull/3068#issuecomment-511168430
 
 
   for java8:
   ```
   mvn exec:java -Dexec.mainClass="org.openjdk.jmh.Main" 
-Dexec.args="org.apache.skywalking.apm.agent.core.context.ThreadLocalGetXTimeBenchmark
 -w 1 -r 1   -wi 5 -i 10 -f 0 -tu ms"  -Dexec.classpathScope=test   -f 
apm-sniffer/apm-agent-core/pom.xml
   
   # VM version: JDK 1.8.0_211, Java HotSpot(TM) 64-Bit Server VM, 25.211-b12
   # VM invoker: D:\JDK\jdk1.8.0X64\jre\bin\java.exe
   # VM options: -Dclassworlds.conf=D:\maven\maven\bin\..\bin\m2.conf 
-Dmaven.home=D:\maven\maven\bin\.. 
-Dlibrary.jansi.path=D:\maven\maven\bin\..\lib\jansi-native 
-Dmaven.multiModuleProjectDirectory=E:\GitHub\dev4skywalking1 
-Djava.library.path=D:/java/nativelib
   # Warmup: 5 iterations, 1 s each
   # Measurement: 10 iterations, 1 s each
   # Timeout: 10 min per iteration
   # Threads: 1 thread, will synchronize iterations
   # Benchmark mode: Throughput, ops/time
   # Benchmark: 
org.apache.skywalking.apm.agent.core.context.ThreadLocalGetXTimeBenchmark.getThreadLocalOnce1
   
   T480 ComputerInfo [
   CPU=8 cpu
   JAVA=Windows 8.1     amd64   6.3
   ]
   
   Benchmark                                             Mode  Cnt       Score  
    Error   Units  Score/min
   ThreadLocalGetXTimeBenchmark.getThreadLocalFourTime  thrpt   10   74873.499 
±  787.621  ops/ms      1.000
   ThreadLocalGetXTimeBenchmark.getThreadLocalOnce1     thrpt   10  330795.756 
± 1954.710  ops/ms      4.418
   ThreadLocalGetXTimeBenchmark.getThreadLocalTwice     thrpt   10  191911.226 
± 1084.482  ops/ms      2.563
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to