|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.LexGrid.util.SimpleMemUsageReporter
public class SimpleMemUsageReporter
Tool for simple "heap profiling" over long runs where it is inconvenient to use an actual profiling tool.
Nested Class Summary | |
---|---|
static class |
SimpleMemUsageReporter.Snapshot
Convenience class for holding information about the heap |
Constructor Summary | |
---|---|
SimpleMemUsageReporter()
|
Method Summary | |
---|---|
static java.lang.String |
formatMemStat(long value)
Static method for changing a long representing memory size to a human friendly string |
static java.lang.String |
formatTimeDiff(long timeDiff)
Used to convert the time difference between snapshots to a human readable format |
static void |
init()
Initialize values |
static void |
main(java.lang.String[] args)
A simple test to make sure the output is sensible |
static void |
print(SimpleMemUsageReporter.Snapshot snap)
Convenience printer |
static void |
print(SimpleMemUsageReporter.Snapshot snap,
java.lang.String message)
Convenience printer with description |
static void |
reset()
Reinitialize |
static SimpleMemUsageReporter.Snapshot |
snapshot()
Takes a snapshot of the current heap |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleMemUsageReporter()
Method Detail |
---|
public static void init()
public static void reset()
public static SimpleMemUsageReporter.Snapshot snapshot()
public static void print(SimpleMemUsageReporter.Snapshot snap)
snap
- - the Snapshot to print to System.outpublic static void print(SimpleMemUsageReporter.Snapshot snap, java.lang.String message)
snap
- - the Snapshot to print to System.outmessage
- - the message to tack on for later identificationpublic static java.lang.String formatMemStat(long value)
value
-
public static java.lang.String formatTimeDiff(long timeDiff)
timeDiff
-
public static void main(java.lang.String[] args)
args
-
|
Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |