org.fusesource.hawtjni.runtime
Class NativeStats

java.lang.Object
  extended by org.fusesource.hawtjni.runtime.NativeStats

public class NativeStats
extends Object

Instructions on how to use the NativeStats tool with a standalone SWT example:

  1. Compile the native libraries defining the NATIVE_STATS flag.
  2. 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);
          
  3. 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);
          

Author:
Hiram Chirino

Nested Class Summary
static class NativeStats.NativeFunction
           
static interface NativeStats.StatsInterface
           
 
Constructor Summary
NativeStats(Collection<NativeStats.StatsInterface> classes)
           
NativeStats(NativeStats.StatsInterface... classes)
           
 
Method Summary
 NativeStats copy()
           
 NativeStats diff()
           
 void dump(PrintStream ps)
          Dumps the stats to the print stream in a JSON format.
 void reset()
           
 NativeStats snapshot()
           
 void update()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeStats

public NativeStats(NativeStats.StatsInterface... classes)

NativeStats

public NativeStats(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(PrintStream ps)
Dumps the stats to the print stream in a JSON format.

Parameters:
ps -


Copyright © 2009-2011 FuseSource, Corp.. All Rights Reserved.