public class ProfilingUtil extends Object
Modifier and Type | Method and Description |
---|---|
static void |
dumpHeap(String fileName,
boolean live)
Call this method from your application whenever you want to dump the heap snapshot into a file.
|
static String |
getMemory() |
static long |
parseSize(String property)
A method for getting a property denoting a size in bytes (like size of cache for example)
If the property is not set the method returns -1, else it checks if it ends with a
k, K, m, M, g or G and multiplies the number before with the appropriate power of 2 before
returning it.
|
static void |
showMemory(String label) |
static String |
tidyFileSize(long size) |
public static void dumpHeap(String fileName, boolean live)
fileName
- name of the heap dump filelive
- flag that tells whether to dump
only the live objectspublic static String tidyFileSize(long size)
public static long parseSize(String property)
public static void showMemory(String label)
public static String getMemory()
Copyright © 2017 INSIGHT Centre for Data Analytics. All rights reserved.