No description
Find a file
2018-05-17 15:53:44 +02:00
src preparedstatement recording 2018-05-17 15:45:31 +02:00
.gitignore remove hostkey from sources 2018-05-15 22:30:56 +02:00
agent.iml preparedstatement recording 2018-05-17 15:45:31 +02:00
pom.xml preparedstatement recording 2018-05-17 15:45:31 +02:00
README.md Update README.md 2018-05-17 15:53:44 +02:00

perfix

Pretty basic profiling tool for JVM's

Highlights:

  • Provides method and SQL statement execution times. (Somehow it gives me more info than Java Mission Control)
  • Meant for development time (after process stops, data is gone).
  • Minimalistic commandline interface (ssh).
  • Execution time is measured in nanoseconds, reported in milliseconds (this way the totals and averages are most precise, but also human readable).
  • No manual instrumentation necessary using loadtime bytecode manipulation (javassist).
  • No special jdbc configuration necessary (ie no wrapped jdbc driver).
  • The agent is also the server (unlike commercial tooling). This way there is no overhead in interprocess communication.
  • Minimal memory footprint (agent is 2.5 mb).
  • Overhead (in method execution time) not clear yet. I wouldn't use it in production.

Usage

  • Agent that instruments loaded classes: -javaagent:/perfix.jar
  • Include classes for instrumentation with -Dperfix.includes=com.project. ...etc (includes subpackages)
  • Ssh interface to report executed methods and sql query excutions:
    * #invocations
    * total execution time for the method in nanoseconds (this is also the sorting order)
    * average time in nanoseconds per method (= total/#invocations)
  • The ssh server starts on port 2048 by default. Use -Dperfix.port=... to adjust.

roadmap

  • Finish jdbc query recording (CallableStatement)
  • Make output format configurable
  • Implement password login (now any)
  • Add web interface (maybe)
  • Implement an actual call stack the way commercial tools work

DISCLAIMER:

This has only been tested on oracle java8 in spring-boot using tomcat web-container