Package org.nineml.coffeegrinder.util
Class Instrumentation
- java.lang.Object
-
- org.nineml.coffeegrinder.util.Instrumentation
-
public class Instrumentation extends java.lang.ObjectA class used for instrumenting parses.This is an internal, debugging class.
-
-
Constructor Summary
Constructors Constructor Description Instrumentation()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringcallStack()Add the callstack to the trace.static voidcount(java.lang.String format, java.lang.Object... params)Add a counter to the trace.static voidreport()Return the instrumentation report.static voidreport(long threshold)Return the instrumentation report, ignoring any counters less than threshold.static voidreset()Reset all counters
-
-
-
Method Detail
-
count
public static void count(java.lang.String format, java.lang.Object... params)Add a counter to the trace.- Parameters:
format- a {link String#format} string.params- the parameters
-
callStack
public static java.lang.String callStack()
Add the callstack to the trace.- Returns:
- a string representation of the call stack.
-
report
public static void report()
Return the instrumentation report.The default threshold is 0.
-
report
public static void report(long threshold)
Return the instrumentation report, ignoring any counters less than threshold.- Parameters:
threshold- the threshold.
-
reset
public static void reset()
Reset all counters
-
-