@Immutable public static class QueryResults.Statistics extends Object implements Comparable<QueryResults.Statistics>, Serializable
Modifier and Type | Field and Description |
---|---|
protected static QueryResults.Statistics |
EMPTY_STATISTICS |
Constructor and Description |
---|
Statistics() |
Statistics(long planningNanos) |
Statistics(long planningNanos,
long optimizationNanos,
long resultFormulationNanos,
long executionNanos) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(QueryResults.Statistics that) |
long |
getExecutionTime(TimeUnit unit)
Get the time required to execute the query.
|
long |
getOptimizationTime(TimeUnit unit)
Get the time required to determine or select a (more) optimal plan.
|
long |
getPlanningTime(TimeUnit unit)
Get the time required to come up with the canonical plan.
|
long |
getResultFormulationTime(TimeUnit unit)
Get the time required to formulate the structure of the results.
|
long |
getTotalTime(TimeUnit unit)
Get the time required to execute the query.
|
protected void |
readable(long nanos,
StringBuilder sb) |
String |
toString() |
protected long |
totalTime() |
QueryResults.Statistics |
withExecutionTime(long executionNanos)
Create a new statistics object that has the supplied execution time.
|
QueryResults.Statistics |
withExecutionTime(long execution,
TimeUnit unit)
Create a new statistics object that has the supplied execution time.
|
QueryResults.Statistics |
withOptimizationTime(long optimizationNanos)
Create a new statistics object that has the supplied optimization time.
|
QueryResults.Statistics |
withOptimizationTime(long optimization,
TimeUnit unit)
Create a new statistics object that has the supplied optimization time.
|
QueryResults.Statistics |
withPlanningTime(long planningNanos)
Create a new statistics object that has the supplied planning time.
|
QueryResults.Statistics |
withPlanningTime(long planning,
TimeUnit unit)
Create a new statistics object that has the supplied planning time.
|
QueryResults.Statistics |
withResultsFormulationTime(long resultFormulationNanos)
Create a new statistics object that has the supplied result formulation time.
|
QueryResults.Statistics |
withResultsFormulationTime(long resultFormulation,
TimeUnit unit)
Create a new statistics object that has the supplied result formulation time.
|
protected static final QueryResults.Statistics EMPTY_STATISTICS
public Statistics()
public Statistics(long planningNanos)
public Statistics(long planningNanos, long optimizationNanos, long resultFormulationNanos, long executionNanos)
public long getPlanningTime(TimeUnit unit)
unit
- the time unit that should be usedIllegalArgumentException
- if the unit is nullpublic long getOptimizationTime(TimeUnit unit)
unit
- the time unit that should be usedIllegalArgumentException
- if the unit is nullpublic long getResultFormulationTime(TimeUnit unit)
unit
- the time unit that should be usedIllegalArgumentException
- if the unit is nullpublic long getExecutionTime(TimeUnit unit)
unit
- the time unit that should be usedIllegalArgumentException
- if the unit is nullpublic long getTotalTime(TimeUnit unit)
unit
- the time unit that should be usedIllegalArgumentException
- if the unit is nullprotected long totalTime()
public QueryResults.Statistics withPlanningTime(long planningNanos)
planningNanos
- the number of nanoseconds required by planningIllegalArgumentException
- if the time value is negativepublic QueryResults.Statistics withOptimizationTime(long optimizationNanos)
optimizationNanos
- the number of nanoseconds required by optimizationIllegalArgumentException
- if the time value is negativepublic QueryResults.Statistics withResultsFormulationTime(long resultFormulationNanos)
resultFormulationNanos
- the number of nanoseconds required by result formulationIllegalArgumentException
- if the time value is negativepublic QueryResults.Statistics withExecutionTime(long executionNanos)
executionNanos
- the number of nanoseconds required to execute the queryIllegalArgumentException
- if the time value is negativepublic QueryResults.Statistics withPlanningTime(long planning, TimeUnit unit)
planning
- the time required to plan the queryunit
- the time unitIllegalArgumentException
- if the unit is null or if the time value is negativepublic QueryResults.Statistics withOptimizationTime(long optimization, TimeUnit unit)
optimization
- the time required by optimizationunit
- the time unitIllegalArgumentException
- if the unit is null or if the time value is negativepublic QueryResults.Statistics withResultsFormulationTime(long resultFormulation, TimeUnit unit)
resultFormulation
- the time required to formulate the resultsunit
- the time unitIllegalArgumentException
- if the unit is null or if the time value is negativepublic QueryResults.Statistics withExecutionTime(long execution, TimeUnit unit)
execution
- the time required to execute the queryunit
- the time unitIllegalArgumentException
- if the unit is null or if the time value is negativepublic int compareTo(QueryResults.Statistics that)
compareTo
in interface Comparable<QueryResults.Statistics>
protected void readable(long nanos, StringBuilder sb)
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.