org.fusesource.hawtjni.runtime
Class NativeStats
java.lang.Object
org.fusesource.hawtjni.runtime.NativeStats
public class NativeStats
- extends java.lang.Object
Instructions on how to use the NativeStats tool with a standalone SWT
example:
- Compile the native libraries defining the NATIVE_STATS flag.
- Add the following code around the sections of
interest to dump the native calls done in that section.
StatsInterface si = MyFooStatsInterface.INSTANCE;
NativeStats stats = new NativeStats(si);
... // your code
stats.diff().dump(System.out);
- Or add the following code at a given point to dump a snapshot of
the native calls done until that point.
stats.snapshot().dump(System.out);
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NativeStats
public NativeStats(NativeStats.StatsInterface... classes)
NativeStats
public NativeStats(java.util.Collection<NativeStats.StatsInterface> classes)
reset
public void reset()
update
public void update()
snapshot
public NativeStats snapshot()
copy
public NativeStats copy()
diff
public NativeStats diff()
dump
public void dump(java.io.PrintStream ps)
- Dumps the stats to the print stream in a JSON format.
- Parameters:
ps
-