public class RunInfo extends Object implements Serializable
Constructor and Description |
---|
RunInfo(Period duration)
Creates a new RunInfo.
|
Modifier and Type | Method and Description |
---|---|
void |
addTag(String tag)
Associates a new tag with this measurement.
|
void |
addTags(Set<String> tags)
Adds a set of tags to be associated with the current measurement.
|
Period |
getDuration()
Gets the desired run duration
|
long |
getEndTime()
Gets Unix time of the measurement end.
|
long |
getIteration()
Gets the current iteration counter value.
|
long |
getNextIteration()
Gets the next iteration counter value.
|
double |
getPercentage()
Gets the current measurement progress in percents.
|
double |
getPercentage(long iteration)
Gets the theoretical measurement progress in percents based on the provided number of passed iterations.
|
long |
getRunTime()
Gets the current measurement run time in millisecond.
|
String |
getScenarioName()
Gets the current scenario name.
|
long |
getStartTime()
Gets Unix time of the measurement start.
|
Set<String> |
getTags()
Gets an unmodifiable set of tags associated with this measurement run.
|
int |
getThreads()
Returns number of threads that is currently used to generate the load.
|
boolean |
hasTag(String tag)
Checks for a presence of a given tag.
|
boolean |
isRunning()
Is there a running measurement?
|
boolean |
isStarted()
Was the measurement started?
|
void |
removeTag(String tag)
Removes a tag from this run.
|
void |
reset()
Resets this RunInfo to its original state.
|
void |
setScenarioName(String scenarioName)
Sets the current scenario name.
|
void |
setThreads(int threads)
Sets the information about the number of threads that is currently used to generate the load.
|
void |
start()
Starts a new measurement run.
|
void |
stop()
Stops the measurement run.
|
String |
toString() |
public RunInfo(Period duration)
duration
- Target duration of the run (time or iterations)public void start()
public void reset()
public void stop()
public long getIteration()
public long getNextIteration()
public long getRunTime()
public double getPercentage()
public double getPercentage(long iteration)
iteration
- The iteration for which we want to know the progress % number compared to the configured period duration.public long getStartTime()
public long getEndTime()
public boolean isRunning()
isStarted()
returns true and we did not reached
the final iterations.public boolean isStarted()
start()
has been called
and there has been no call to stop()
since then.public Set<String> getTags()
public boolean hasTag(String tag)
tag
- A tag to be checked.true
if the specified tag is set for this run info.public void addTag(String tag)
tag
- A new tag to be associated.public void addTags(Set<String> tags)
tags
- A set of tags to be associated.public void removeTag(String tag)
tag
- A tag to be removed.public Period getDuration()
public int getThreads()
public void setThreads(int threads)
threads
- The number of threads.public String getScenarioName()
ScenarioLoader
to the scenario file name.public void setScenarioName(String scenarioName)
scenarioName
- The name of current scenario.Copyright © 2010–2017 PerfCake Community. All rights reserved.