Package org.fusesource.hawtjni.runtime
Class NativeStats
java.lang.Object
org.fusesource.hawtjni.runtime.NativeStats
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 ClassesModifier and TypeClassDescriptionstatic class
static interface
-
Constructor Summary
ConstructorsConstructorDescriptionNativeStats
(Collection<NativeStats.StatsInterface> classes) NativeStats
(NativeStats.StatsInterface... classes) -
Method Summary
-
Constructor Details
-
NativeStats
-
NativeStats
-
-
Method Details
-
reset
public void reset() -
update
public void update() -
snapshot
-
copy
-
diff
-
dump
Dumps the stats to the print stream in a JSON format.- Parameters:
ps
- Print stream.
-