public class QueryTiming extends Object
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.
| Constructor and Description |
|---|
QueryTiming() |
| Modifier and Type | Method and Description |
|---|---|
void |
done() |
void |
init(boolean enabled)
Initializes (or re-initializes) a query timing, also setting whether enabled.
|
void |
markEnd(String name)
Marks the end of a Query component's execution.
|
void |
markFull(String name,
long duration)
Marks the duration of a Query component's execution.
|
void |
markStart(String name)
Marks the start of a Query component's execution.
|
String |
toString() |
public void init(boolean enabled)
enabled - Whether to collect stats in futurepublic void done()
public final void markStart(String name)
name - Name of the componentpublic final void markEnd(String name)
name - Name of the componentpublic final void markFull(String name, long duration)
name - Name of the componentduration - Duration of the executionCopyright © 2021 Hitachi Vantara. All rights reserved.