Class DistributedMetricsContextImpl<S extends DistributedAllMetricsSnapshotImpl>
- java.lang.Object
-
- com.emc.mongoose.base.metrics.context.MetricsContextBase<S>
-
- com.emc.mongoose.base.metrics.context.DistributedMetricsContextImpl<S>
-
- All Implemented Interfaces:
DistributedMetricsContext<S>,MetricsContext<S>,java.lang.AutoCloseable,java.lang.Comparable<MetricsContext<S>>
public class DistributedMetricsContextImpl<S extends DistributedAllMetricsSnapshotImpl> extends MetricsContextBase<S> implements DistributedMetricsContext<S>
-
-
Field Summary
-
Fields inherited from class com.emc.mongoose.base.metrics.context.MetricsContextBase
concurrencyThreshold, lastSnapshot, metadata, outputPeriodMillis, stdOutColorFlag, thresholdMetricsCtx, ts
-
Fields inherited from interface com.emc.mongoose.base.metrics.context.MetricsContext
DEFAULT_RESERVOIR_SIZE, DEFAULT_SNAPSHOT_UPDATE_PERIOD_MILLIS
-
-
Constructor Summary
Constructors Constructor Description DistributedMetricsContextImpl(java.util.Map metaData, java.util.function.IntSupplier nodeCountSupplier, int concurrencyThreshold, int updateIntervalSec, boolean stdOutColorFlag, boolean avgPersistFlag, boolean sumPersistFlag, java.util.function.Supplier<java.util.List<AllMetricsSnapshot>> snapshotsSupplier, java.util.List<java.lang.Double> quantileValues)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanavgPersistEnabled()static DistributedContextBuilderbuilder()voidclose()booleanequals(java.lang.Object other)voidmarkFail()voidmarkFail(long count)voidmarkPartSucc(long bytes, long[] durationValues, long[] latencyValues)voidmarkPartSucc(long bytes, long duration, long latency)voidmarkSucc(long bytes, long duration, long latency)voidmarkSucc(long count, long bytes, long[] durationValues, long[] latencyValues)protected DistributedMetricsContextImpl<S>newThresholdMetricsContext()java.util.List<java.lang.String>nodeAddrs()intnodeCount()java.util.List<java.lang.Double>quantileValues()voidrefreshLastSnapshot()booleansumPersistEnabled()java.lang.StringtoString()-
Methods inherited from class com.emc.mongoose.base.metrics.context.MetricsContextBase
comment, compareTo, concurrencyLimit, concurrencyThreshold, elapsedTimeMillis, enterThresholdState, exitThresholdState, hashCode, isStarted, itemDataSize, lastOutputTs, lastOutputTs, lastSnapshot, loadStepId, metadata, opType, outputPeriodMillis, runId, start, startTimeStamp, stdOutColorEnabled, thresholdMetrics, thresholdStateEntered, thresholdStateExited
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.emc.mongoose.base.metrics.context.DistributedMetricsContext
lastSnapshot
-
Methods inherited from interface com.emc.mongoose.base.metrics.context.MetricsContext
comment, concurrencyLimit, concurrencyThreshold, elapsedTimeMillis, enterThresholdState, exitThresholdState, isStarted, itemDataSize, lastOutputTs, lastOutputTs, loadStepId, metadata, opType, outputPeriodMillis, runId, start, startTimeStamp, stdOutColorEnabled, thresholdMetrics, thresholdStateEntered, thresholdStateExited
-
-
-
-
Constructor Detail
-
DistributedMetricsContextImpl
public DistributedMetricsContextImpl(java.util.Map metaData, java.util.function.IntSupplier nodeCountSupplier, int concurrencyThreshold, int updateIntervalSec, boolean stdOutColorFlag, boolean avgPersistFlag, boolean sumPersistFlag, java.util.function.Supplier<java.util.List<AllMetricsSnapshot>> snapshotsSupplier, java.util.List<java.lang.Double> quantileValues)
-
-
Method Detail
-
markSucc
public void markSucc(long bytes, long duration, long latency)- Specified by:
markSuccin interfaceMetricsContext<S extends DistributedAllMetricsSnapshotImpl>
-
markPartSucc
public void markPartSucc(long bytes, long duration, long latency)- Specified by:
markPartSuccin interfaceMetricsContext<S extends DistributedAllMetricsSnapshotImpl>
-
markSucc
public void markSucc(long count, long bytes, long[] durationValues, long[] latencyValues)- Specified by:
markSuccin interfaceMetricsContext<S extends DistributedAllMetricsSnapshotImpl>
-
markPartSucc
public void markPartSucc(long bytes, long[] durationValues, long[] latencyValues)- Specified by:
markPartSuccin interfaceMetricsContext<S extends DistributedAllMetricsSnapshotImpl>
-
markFail
public void markFail()
- Specified by:
markFailin interfaceMetricsContext<S extends DistributedAllMetricsSnapshotImpl>
-
markFail
public void markFail(long count)
- Specified by:
markFailin interfaceMetricsContext<S extends DistributedAllMetricsSnapshotImpl>
-
nodeAddrs
public java.util.List<java.lang.String> nodeAddrs()
- Specified by:
nodeAddrsin interfaceDistributedMetricsContext<S extends DistributedAllMetricsSnapshotImpl>
-
nodeCount
public int nodeCount()
- Specified by:
nodeCountin interfaceDistributedMetricsContext<S extends DistributedAllMetricsSnapshotImpl>
-
quantileValues
public java.util.List<java.lang.Double> quantileValues()
- Specified by:
quantileValuesin interfaceDistributedMetricsContext<S extends DistributedAllMetricsSnapshotImpl>
-
avgPersistEnabled
public boolean avgPersistEnabled()
- Specified by:
avgPersistEnabledin interfaceMetricsContext<S extends DistributedAllMetricsSnapshotImpl>
-
sumPersistEnabled
public boolean sumPersistEnabled()
- Specified by:
sumPersistEnabledin interfaceMetricsContext<S extends DistributedAllMetricsSnapshotImpl>
-
refreshLastSnapshot
public void refreshLastSnapshot()
- Specified by:
refreshLastSnapshotin interfaceMetricsContext<S extends DistributedAllMetricsSnapshotImpl>- Overrides:
refreshLastSnapshotin classMetricsContextBase<S extends DistributedAllMetricsSnapshotImpl>
-
newThresholdMetricsContext
protected DistributedMetricsContextImpl<S> newThresholdMetricsContext()
- Specified by:
newThresholdMetricsContextin classMetricsContextBase<S extends DistributedAllMetricsSnapshotImpl>
-
equals
public final boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
toString
public final java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
close
public final void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceMetricsContext<S extends DistributedAllMetricsSnapshotImpl>- Overrides:
closein classMetricsContextBase<S extends DistributedAllMetricsSnapshotImpl>
-
builder
public static DistributedContextBuilder builder()
-
-