Package alluxio.stress.master
Class MasterBenchTaskResult
- java.lang.Object
-
- alluxio.stress.master.MasterBenchTaskResult
-
- All Implemented Interfaces:
TaskResult,alluxio.util.JsonSerializable
public final class MasterBenchTaskResult extends java.lang.Object implements TaskResult
The task result for the master stress tests.
-
-
Constructor Summary
Constructors Constructor Description MasterBenchTaskResult()Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddErrorMessage(java.lang.String errMesssage)TaskResult.Aggregatoraggregator()BaseParametersgetBaseParameters()longgetDurationMs()longgetEndMs()java.util.List<java.lang.String>getErrors()long[]getMaxResponseTimeNs()MasterBenchParametersgetParameters()longgetRecordStartMs()MasterBenchTaskResultStatisticsgetStatistics()java.util.Map<java.lang.String,MasterBenchTaskResultStatistics>getStatisticsPerMethod()voidincrementNumSuccess(long numSuccess)Increments the number of successes by an amount.voidmerge(MasterBenchTaskResult result)Merges (updates) a task result with this result.voidputStatisticsForMethod(java.lang.String method, MasterBenchTaskResultStatistics statistics)voidsetBaseParameters(BaseParameters baseParameters)voidsetDurationMs(long durationMs)voidsetEndMs(long endMs)voidsetErrors(java.util.List<java.lang.String> errors)voidsetMaxResponseTimeNs(long[] maxResponseTimeNs)voidsetParameters(MasterBenchParameters parameters)voidsetRecordStartMs(long recordStartMs)voidsetStatistics(MasterBenchTaskResultStatistics statistics)voidsetStatisticsPerMethod(java.util.Map<java.lang.String,MasterBenchTaskResultStatistics> statisticsPerMethod)
-
-
-
Method Detail
-
merge
public void merge(MasterBenchTaskResult result) throws java.lang.Exception
Merges (updates) a task result with this result.- Parameters:
result- the task result to merge- Throws:
java.lang.Exception
-
getDurationMs
public long getDurationMs()
- Returns:
- the duration (in ms)
-
setDurationMs
public void setDurationMs(long durationMs)
- Parameters:
durationMs- the duration (in ms)
-
incrementNumSuccess
public void incrementNumSuccess(long numSuccess)
Increments the number of successes by an amount.- Parameters:
numSuccess- the amount to increment by
-
getBaseParameters
public BaseParameters getBaseParameters()
- Returns:
- the base parameters
-
setBaseParameters
public void setBaseParameters(BaseParameters baseParameters)
- Parameters:
baseParameters- the base parameters
-
getParameters
public MasterBenchParameters getParameters()
- Returns:
- the parameters
-
setParameters
public void setParameters(MasterBenchParameters parameters)
- Parameters:
parameters- the parameters
-
getMaxResponseTimeNs
public long[] getMaxResponseTimeNs()
- Returns:
- the array of max response times (in ns)
-
setMaxResponseTimeNs
public void setMaxResponseTimeNs(long[] maxResponseTimeNs)
- Parameters:
maxResponseTimeNs- the array of max response times (in ns)
-
getRecordStartMs
public long getRecordStartMs()
- Returns:
- the start time (in ms)
-
setRecordStartMs
public void setRecordStartMs(long recordStartMs)
- Parameters:
recordStartMs- the start time (in ms)
-
getEndMs
public long getEndMs()
- Returns:
- the end time (in ms)
-
setEndMs
public void setEndMs(long endMs)
- Parameters:
endMs- the end time (in ms)
-
getErrors
public java.util.List<java.lang.String> getErrors()
- Returns:
- the list of errors
-
setErrors
public void setErrors(java.util.List<java.lang.String> errors)
- Parameters:
errors- the list of errors
-
addErrorMessage
public void addErrorMessage(java.lang.String errMesssage)
- Parameters:
errMesssage- the error message to add
-
getStatistics
public MasterBenchTaskResultStatistics getStatistics()
- Returns:
- the statistics
-
setStatistics
public void setStatistics(MasterBenchTaskResultStatistics statistics)
- Parameters:
statistics- the statistics
-
getStatisticsPerMethod
public java.util.Map<java.lang.String,MasterBenchTaskResultStatistics> getStatisticsPerMethod()
- Returns:
- the statistics per method
-
setStatisticsPerMethod
public void setStatisticsPerMethod(java.util.Map<java.lang.String,MasterBenchTaskResultStatistics> statisticsPerMethod)
- Parameters:
statisticsPerMethod- the statistics per method
-
putStatisticsForMethod
public void putStatisticsForMethod(java.lang.String method, MasterBenchTaskResultStatistics statistics)- Parameters:
method- the name of the method to insert statistics forstatistics- the statistics for the method
-
aggregator
public TaskResult.Aggregator aggregator()
- Specified by:
aggregatorin interfaceTaskResult- Returns:
- the aggregator that can produce a summary
-
-