Interface MetricsContext<S extends AllMetricsSnapshot>
-
- All Superinterfaces:
java.lang.AutoCloseable,java.lang.Comparable<MetricsContext<S>>
- All Known Subinterfaces:
DistributedMetricsContext<S>
- All Known Implementing Classes:
DistributedMetricsContextImpl,MetricsContextBase,MetricsContextImpl
public interface MetricsContext<S extends AllMetricsSnapshot> extends java.lang.AutoCloseable, java.lang.Comparable<MetricsContext<S>>
Created by andrey on 14.07.16.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_RESERVOIR_SIZEstatic intDEFAULT_SNAPSHOT_UPDATE_PERIOD_MILLIS
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanavgPersistEnabled()voidclose()java.lang.Stringcomment()intconcurrencyLimit()intconcurrencyThreshold()longelapsedTimeMillis()voidenterThresholdState()voidexitThresholdState()booleanisStarted()com.github.akurilov.commons.system.SizeInBytesitemDataSize()longlastOutputTs()voidlastOutputTs(long ts)SlastSnapshot()java.lang.StringloadStepId()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)java.util.Mapmetadata()OpTypeopType()longoutputPeriodMillis()voidrefreshLastSnapshot()longrunId()voidstart()longstartTimeStamp()booleanstdOutColorEnabled()booleansumPersistEnabled()MetricsContextthresholdMetrics()booleanthresholdStateEntered()booleanthresholdStateExited()
-
-
-
Field Detail
-
DEFAULT_SNAPSHOT_UPDATE_PERIOD_MILLIS
static final int DEFAULT_SNAPSHOT_UPDATE_PERIOD_MILLIS
- See Also:
- Constant Field Values
-
DEFAULT_RESERVOIR_SIZE
static final int DEFAULT_RESERVOIR_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
metadata
java.util.Map metadata()
-
loadStepId
java.lang.String loadStepId()
-
runId
long runId()
-
opType
OpType opType()
-
concurrencyLimit
int concurrencyLimit()
-
itemDataSize
com.github.akurilov.commons.system.SizeInBytes itemDataSize()
-
markSucc
void markSucc(long bytes, long duration, long latency)
-
markPartSucc
void markPartSucc(long bytes, long duration, long latency)
-
markSucc
void markSucc(long count, long bytes, long[] durationValues, long[] latencyValues)
-
markPartSucc
void markPartSucc(long bytes, long[] durationValues, long[] latencyValues)
-
markFail
void markFail()
-
markFail
void markFail(long count)
-
start
void start()
-
isStarted
boolean isStarted()
-
startTimeStamp
long startTimeStamp()
-
refreshLastSnapshot
void refreshLastSnapshot()
-
lastSnapshot
S lastSnapshot()
-
concurrencyThreshold
int concurrencyThreshold()
-
thresholdStateEntered
boolean thresholdStateEntered()
-
enterThresholdState
void enterThresholdState() throws java.lang.IllegalStateException- Throws:
java.lang.IllegalStateException
-
thresholdStateExited
boolean thresholdStateExited()
-
thresholdMetrics
MetricsContext thresholdMetrics()
-
exitThresholdState
void exitThresholdState() throws java.lang.IllegalStateException- Throws:
java.lang.IllegalStateException
-
stdOutColorEnabled
boolean stdOutColorEnabled()
-
avgPersistEnabled
boolean avgPersistEnabled()
-
sumPersistEnabled
boolean sumPersistEnabled()
-
outputPeriodMillis
long outputPeriodMillis()
-
lastOutputTs
long lastOutputTs()
-
lastOutputTs
void lastOutputTs(long ts)
-
elapsedTimeMillis
long elapsedTimeMillis()
-
comment
java.lang.String comment()
-
close
void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
-