Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Devoxx 2018 - Async-Profiler, le profiler qu’il vous faut !

Devoxx 2018 - Async-Profiler, le profiler qu’il vous faut !

async-profiler vous surprendra par sa facilité à faire des flamegraph sur une JVM

Nicolas Peters

April 19, 2018
Tweet

More Decks by Nicolas Peters

Other Decks in Technology

Transcript

  1. #DevoxxFR Qui ? 2 “You Build It, You Run It”

    Nicolas Peters Lead Tech @nicolaspeters https://github.com/npeters
  2. #DevoxxFR Outillage classique pour le GC > jstat -gcutil <pid>

    1000 > java -XX:+PrintGCDetails -XX:+PrintGCTimeStamps … 16 > jmap -histo <pid> ou jmap -dump:live,format=b,file=heap.bin
  3. #DevoxxFR JMH > mvn archetype:generate \ -DinteractiveMode=false \ -DarchetypeGroupId=org.openjdk.jmh \

    -DarchetypeArtifactId=jmh-java-benchmark-archetype \ -DgroupId=org.sample \ -DartifactId=test \ -Dversion=1.0 23
  4. #DevoxxFR JMH public class MyBenchmark { @Benchmark public int testMethod()

    { ThreadLocalRandom random = ThreadLocalRandom.current(); return random.nextInt() + random.nextInt(); } } > mvn clean install ... > java -jar target/benchmarks.jar -tu ms -prof stack 24
  5. #DevoxxFR JMH public class MyBenchmark { @Benchmark public int testMethod()

    { ThreadLocalRandom random = ThreadLocalRandom.current(); return random.nextInt() + random.nextInt(); } } > mvn clean install ... > java -jar target/benchmarks.jar -tu ms -prof stack 25
  6. #DevoxxFR Références 29 • Playlist Youtube https://www.youtube.com/playlist?list=PLTT7JEJqc07b-Bx_GbSy7AU2HRu CmBEBc • The

    Art of JVM Profiling https://assets.ctfassets.net/oxjq45e8ilak/4mfbX5FJuw0A8M00UK4uKa/ce6 0f2cab12408e01ce927e90ebb2f7a/Andrey_Pangin__Vadim_Tsesko._The_Ar t_of_JVM_Profiling.pdf • Container performance JVM https://www.dropbox.com/s/kp4m0mjr3uo4f54/Container-performance-J VM.pptx?dl=0 • Lightbend https://developer.lightbend.com/blog/2018-04-09-profiling-JVM-applicatio ns/ • Nitsan Wakart http://psy-lob-saw.blogspot.fr/ • Sasha Goldshtein http://blogs.microsoft.co.il/sasha/ • sbt-jmh https://github.com/ktoso/sbt-jmh