Source

perfmon /

Filename Size Date modified Message
dist
src/main/java/eu/plumbr/tools
65 B
1.1 KB
210 B

Plumbr PerfMon

Small Java agent to measure memory usage of you app and record measurements to a log file for postprocessing.

Usage

Add following argument to your java command:
-javaagent:<path-to>/perfmon-1.0.jar[=option[,option]]

Where options are one of the following

  • out=<output file> – redirect output to <output file>. Default is System.out
  • period=<x> – set the period for measurement in milliseconds. Default is 1000ms (1sec).

Interpreting output

As a result of working you’ll get a file with a content similar to this:

# time totalheap freeheap usedheap
0 63766528 61065504 2701024
101 63766528 57837352 5929176
203 63766528 57259992 6506536
304 63766528 57259992 6506536
405 63766528 57259992 6506536
506 63766528 57259992 6506536
607 63766528 56182464 7584064
708 63766528 55644968 8121560

These columns read following:

  1. time – time counting since the app started
  2. totalheap – total amount of heap available to your app
  3. freeheap – free heap
  4. usedheap – used heap

Next you can feed this data to your favourive plotting software to get the charts.