@InterfaceStability.Experimental @InterfaceAudience.Public public class N1qlMetrics extends Object implements Serializable
A class that represents N1QL metrics.
Note that the server could omit the metrics or part of the metrics, in which case an EMPTY_METRICS
will be returned.
Modifier and Type | Field and Description |
---|---|
static N1qlMetrics |
EMPTY_METRICS
The empty metrics object.
|
static String |
NO_TIME
Human-readable representation of the absence of duration, as “0s”.
|
Constructor and Description |
---|
N1qlMetrics(JsonObject rawMetrics) |
Modifier and Type | Method and Description |
---|---|
JsonObject |
asJsonObject()
Exposes the underlying raw form of the metrics, as a
JsonObject . |
String |
elapsedTime() |
int |
errorCount() |
String |
executionTime() |
int |
mutationCount() |
int |
resultCount() |
long |
resultSize() |
int |
sortCount() |
String |
toString() |
int |
warningCount() |
public static final N1qlMetrics EMPTY_METRICS
The empty metrics object. All numerical values will be 0 and human-readable times will be NO_TIME
.
public static final String NO_TIME
Human-readable representation of the absence of duration, as “0s”.
public N1qlMetrics(JsonObject rawMetrics)
public String elapsedTime()
public String executionTime()
public int sortCount()
public int resultCount()
public long resultSize()
public int mutationCount()
public int errorCount()
public int warningCount()
public JsonObject asJsonObject()
Exposes the underlying raw form of the metrics, as a JsonObject
.
Note that values exposed as methods are cached at instantiation, so this object is not backed by the returned JsonObject.
Copyright © 2014 Couchbase, Inc.