Package mondrian.olap
Class QueryTiming
java.lang.Object
mondrian.olap.QueryTiming
Provides hooks for recording timing information of components of Query execution.
NOTE: This class is experimental and subject to change/removal without notice.
Code that executes as part of a Query can call markStart(String)
before executing, and
markEnd(String)
afterwards, or can track execution times manually and call
markFull(String, long)
.
To read timing information, add a handler to the statement using Statement.enableProfiling(mondrian.spi.ProfileHandler)
and implement the ProfileHandler.explain(String, QueryTiming)
method.
- Author:
- jbarnett
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
done()
void
init
(boolean enabled) Initializes (or re-initializes) a query timing, also setting whether enabled.final void
Marks the end of a Query component's execution.final void
Marks the duration of a Query component's execution.final void
Marks the start of a Query component's execution.toString()
-
Constructor Details
-
QueryTiming
public QueryTiming()
-
-
Method Details
-
init
public void init(boolean enabled) Initializes (or re-initializes) a query timing, also setting whether enabled. All previous stats are removed.- Parameters:
enabled
- Whether to collect stats in future
-
done
public void done() -
markStart
Marks the start of a Query component's execution.- Parameters:
name
- Name of the component
-
markEnd
Marks the end of a Query component's execution.- Parameters:
name
- Name of the component
-
markFull
Marks the duration of a Query component's execution. markFull is synchronized because it may be called from either Actor's spawn thread or RolapResultShepherd thread- Parameters:
name
- Name of the componentduration
- Duration of the execution
-
toString
-