public class StatisticsCollectorImpl extends Object implements StatisticsCollector
Constructor and Description |
---|
StatisticsCollectorImpl(ImmutablePlan plan,
List<? extends ResultsSummary> results)
Class which takes in a
Collection of ResultStatisticsProvider objects
and produces some statistics about it. |
Modifier and Type | Method and Description |
---|---|
List<Integer> |
getAllTestBuildNumbers()
List of all build numbers in list
|
float |
getAverageElapsedBuilds()
Calculates the average number of builds between fixes.
|
long |
getAverageElapsedTime()
Returns the averag etime in milliseconds it takes for builds to be fixed
|
int |
getCreatedInBuild()
what is the first build number in this collection?
|
List<Integer> |
getFailedBuildNumbers()
List of build numbers which had fails
|
List<FailurePeriod> |
getFailurePeriods()
Get a set of "periods" in which there were failures.
|
int |
getLastRanInBuild()
What is the last number in this collection?
|
FailurePeriod |
getLongestElapsedBuildPeriod() |
FailurePeriod |
getLongestElapsedTimePeriod() |
List<Integer> |
getSuccessfulBuildNumbers()
List of build numbers which were successes.
|
double |
getSuccessPercentage() |
int |
getTotalFailures() |
int |
getTotalNumberOfResults() |
int |
getTotalSuccesses() |
void |
init(List<? extends ResultsSummary> results) |
public StatisticsCollectorImpl(@Nullable ImmutablePlan plan, @Nullable List<? extends ResultsSummary> results)
Collection
of ResultStatisticsProvider
objects
and produces some statistics about it.plan
- - these statistics are forresults
- - to generate statistics from/public void init(@NotNull List<? extends ResultsSummary> results)
public List<FailurePeriod> getFailurePeriods()
getFailurePeriods
in interface StatisticsCollector
List
of FailurePeriod
public double getSuccessPercentage()
getSuccessPercentage
in interface SuccessPercentageStatisticsBean
public int getTotalNumberOfResults()
getTotalNumberOfResults
in interface SuccessPercentageStatisticsBean
public int getTotalFailures()
getTotalFailures
in interface SuccessPercentageStatisticsBean
public int getTotalSuccesses()
getTotalSuccesses
in interface SuccessPercentageStatisticsBean
public List<Integer> getAllTestBuildNumbers()
getAllTestBuildNumbers
in interface StatisticsCollector
List
of Integer
representing success. Sorted ASC.public List<Integer> getSuccessfulBuildNumbers()
getSuccessfulBuildNumbers
in interface StatisticsCollector
List
of Integer
representing success build numbers. Sorted ASC.public List<Integer> getFailedBuildNumbers()
getFailedBuildNumbers
in interface StatisticsCollector
List
of Integer
representing failed build numbers . Sorted ASC.public int getCreatedInBuild()
getCreatedInBuild
in interface StatisticsCollector
public int getLastRanInBuild()
getLastRanInBuild
in interface StatisticsCollector
@Nullable public FailurePeriod getLongestElapsedTimePeriod()
getLongestElapsedTimePeriod
in interface StatisticsCollector
FailurePeriod
with the longest elapsed time periodpublic FailurePeriod getLongestElapsedBuildPeriod()
getLongestElapsedBuildPeriod
in interface StatisticsCollector
FailurePeriod
with the longest elapsed builds.public long getAverageElapsedTime()
getAverageElapsedTime
in interface StatisticsCollector
public float getAverageElapsedBuilds()
getAverageElapsedBuilds
in interface StatisticsCollector
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.