jess.tools
Class Profiler

java.lang.Object
  extended byjess.tools.Profiler

public class Profiler
extends java.lang.Object

A poor man's profiler. You can call "inc" and "dec" to increment and decrement a named counter. This class automatically produces a report at shutdown if anything is ever counted. There's nothing Jess-specific about this class; it's just a useful utility.

(C) Sandia National Laboratories


Constructor Summary
Profiler()
           
 
Method Summary
static void dec(java.lang.String name)
          Decrement the cound associated with the given name.
static void inc(java.lang.String name)
          Increment the cound associated with the given name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Profiler

public Profiler()
Method Detail

inc

public static void inc(java.lang.String name)
Increment the cound associated with the given name. If the name hasn't been used before, a new counter is created and initialized to zero before incrementing it.

Parameters:
name - any string

dec

public static void dec(java.lang.String name)
Decrement the cound associated with the given name. If the name hasn't been used before, a new counter is created and initialized to zero before decrementing it.

Parameters:
name - any string

© 2007 Sandia Corporation