Package 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);
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NativeStats.NativeFunction
static interface
NativeStats.StatsInterface
-
Constructor Summary
Constructors Constructor Description NativeStats(java.util.Collection<NativeStats.StatsInterface> classes)
NativeStats(NativeStats.StatsInterface... classes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NativeStats
copy()
NativeStats
diff()
void
dump(java.io.PrintStream ps)
Dumps the stats to the print stream in a JSON format.void
reset()
NativeStats
snapshot()
void
update()
-
-
-
Constructor Detail
-
NativeStats
public NativeStats(NativeStats.StatsInterface... classes)
-
NativeStats
public NativeStats(java.util.Collection<NativeStats.StatsInterface> classes)
-
-
Method Detail
-
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
-
-
-