org.exist.xquery
Class Profiler

java.lang.Object
  extended byorg.exist.xquery.Profiler

public class Profiler
extends java.lang.Object

XQuery profiling output. Profiling information is written to a logger. The profiler can be enabled/disabled and configured via an XQuery pragma or "declare option" expression. Example:

declare option exist:profiling "enabled=yes verbosity=10 logger=profiler";

Author:
wolf

Field Summary
static int DEPENDENCIES
           
static int ITEM_COUNT
           
static int OPTIMIZATION_FLAGS
           
static int OPTIMIZATIONS
           
static int SEQUENCE_DUMP
           
static int SEQUENCE_PREVIEW
           
static int START_SEQUENCES
           
static int TIME
           
 
Constructor Summary
Profiler()
           
 
Method Summary
 void configure(Pragma pragma)
          Configure the profiler from an XQuery pragma.
 void end(Expression expr, java.lang.String message, Sequence result)
          Called by an expression to indicate the end of an operation.
 boolean isEnabled()
          Is profiling enabled?
 void message(Expression expr, int level, java.lang.String title, Sequence sequence)
          Print out a single profiling message for the given expression object.
 void message(Expression expr, int level, java.lang.String title, java.lang.String message)
           
 void reset()
           
 void setEnabled(boolean enabled)
           
 void setVerbosity(int verbosity)
           
 void start(Expression expr)
          Called by an expression to indicate the start of an operation.
 void start(Expression expr, java.lang.String message)
          Called by an expression to indicate the start of an operation.
 int verbosity()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIME

public static int TIME

OPTIMIZATIONS

public static int OPTIMIZATIONS

OPTIMIZATION_FLAGS

public static int OPTIMIZATION_FLAGS

DEPENDENCIES

public static int DEPENDENCIES

START_SEQUENCES

public static int START_SEQUENCES

ITEM_COUNT

public static int ITEM_COUNT

SEQUENCE_PREVIEW

public static int SEQUENCE_PREVIEW

SEQUENCE_DUMP

public static int SEQUENCE_DUMP
Constructor Detail

Profiler

public Profiler()
Method Detail

configure

public final void configure(Pragma pragma)
Configure the profiler from an XQuery pragma. Parameters are:

Parameters:
pragma -

isEnabled

public final boolean isEnabled()
Is profiling enabled?

Returns:

verbosity

public final int verbosity()
Returns:
the verbosity of the profiler.

start

public final void start(Expression expr)
Called by an expression to indicate the start of an operation. The profiler registers the start time.

Parameters:
expr - the expression.

start

public final void start(Expression expr,
                        java.lang.String message)
Called by an expression to indicate the start of an operation. The profiler registers the start time.

Parameters:
expr - the expression.
message - if not null, contains an optional message to print in the log.

end

public final void end(Expression expr,
                      java.lang.String message,
                      Sequence result)
Called by an expression to indicate the end of an operation. The profiler computes the elapsed time.

Parameters:
expr - the expression.
message - required: a message to be printed to the log.

message

public final void message(Expression expr,
                          int level,
                          java.lang.String title,
                          Sequence sequence)
Print out a single profiling message for the given expression object.

Parameters:
expr -

message

public final void message(Expression expr,
                          int level,
                          java.lang.String title,
                          java.lang.String message)

reset

public void reset()

setEnabled

public void setEnabled(boolean enabled)

setVerbosity

public void setVerbosity(int verbosity)


<oXygen/> XML Editor provides support for editing and debugging XQuery expressions against the eXist XML Database.