Class NativeStats


  • public class NativeStats
    extends java.lang.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);
            
    • Method Detail

      • reset

        public void reset()
      • update

        public void update()
      • dump

        public void dump​(java.io.PrintStream ps)
        Dumps the stats to the print stream in a JSON format.
        Parameters:
        ps -