0

I'm trying to visualize computer performance data using Java Swing and JFreeChart. On one chart I want to show CPU load (%) and user memory by some process. So, the possible values for CPU are 0..100, but for memory: from 10KB (10*1024b) to 500MB (500*1024*1024b), the difference is big.

What is the best way to present that data? Thank you!

Jason Braucht
  • 2,358
  • 19
  • 31
vmg
  • 9,920
  • 13
  • 61
  • 90
  • 4
    It depends on your values distribution and what can of values you want to make salient. I think I would try a logarithmic scale for that since you are probably looking for peaks in memory usage. – jeremy-george Jan 05 '12 at 13:57
  • More on logarithmic axes [here](http://stackoverflow.com/a/8590079/230513). – trashgod Jan 05 '12 at 18:33

1 Answers1

2

I'm assuming this will be a graph which is has time on the X axis and performance metric on the Y axis.

This being the case, I would display the memory as % of memory used instead of the number of (kilo|mega|giga)bytes in use. This way it could be overlaid on the CPU (and other performance metrics) without distorting the overall scale.

I no longer have a copy of the developer guide (this must be purchased from JFree.org) but as I recall, JFreeChart offers a way to add a tool-tip to points on a line graph. You could use this to provide the user a way to see the (kilo|mega|giga)bytes in use if they were interested in more than just the % of memory used.

Jason Braucht
  • 2,358
  • 19
  • 31