Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.atlassian.bamboo.build.statistics
Class StatisticsCollectorImpl

    java.lang.Object
      com.atlassian.bamboo.build.statistics.StatisticsCollectorImpl

All Implemented Interfaces:
  StatisticsCollector

    public class StatisticsCollectorImpl

extends Object
implements StatisticsCollector

Constructor Summary
`StatisticsCollectorImpl(Build build, BuildResultsSummaryManager buildResultsSummaryManager, List results)` Class which takes in a `Collection` of `ResultStatisticsProvider` objects and produces some statistics about it.

Method Summary
`List` | `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` | `getFailedBuildNumbers()` List of build numbers which had fails
`List` | `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` | `getSuccessfulBuildNumbers()` List of build numbers which were successes.
`double` | `getSuccessPercentage()`
`int` | `getTotalFailures()`
`int` | `getTotalNumberOfResults()`
`int` | `getTotalSuccesses()`
`void` | `init(List results)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### StatisticsCollectorImpl

    public StatisticsCollectorImpl(Build build,
                                   BuildResultsSummaryManager buildResultsSummaryManager,
                                   List results)

  Class which takes in a `Collection` of `ResultStatisticsProvider` objects and produces some statistics about it.

  Parameters:
    `build` -
    `buildResultsSummaryManager` -
    `results` -

Method Detail

### init

    public void init(List results)

### getFailurePeriods

    public List getFailurePeriods()

  Get a set of "periods" in which there were failures. A failure "period" is one in which there are continuous failures by build number.

  Specified by:
    `getFailurePeriods` in interface `StatisticsCollector`
  Returns:
    `List` of `FailurePeriod`

### getSuccessPercentage

    public double getSuccessPercentage()

  Specified by:
    `getSuccessPercentage` in interface `StatisticsCollector`
  Returns:
    percentage of success

### getTotalNumberOfResults

    public int getTotalNumberOfResults()

  Specified by:
    `getTotalNumberOfResults` in interface `StatisticsCollector`
  Returns:
    total number of results in list.

### getTotalFailures

    public int getTotalFailures()

  Specified by:
    `getTotalFailures` in interface `StatisticsCollector`
  Returns:
    number of failures.

### getTotalSuccesses

    public int getTotalSuccesses()

  Specified by:
    `getTotalSuccesses` in interface `StatisticsCollector`
  Returns:
    Number of successes.

### getAllTestBuildNumbers

    public List getAllTestBuildNumbers()

  List of all build numbers in list

  Specified by:
    `getAllTestBuildNumbers` in interface `StatisticsCollector`
  Returns:
    `List` of `Integer` representing success. Sorted ASC.

### getSuccessfulBuildNumbers

    public List getSuccessfulBuildNumbers()

  List of build numbers which were successes.

  Specified by:
    `getSuccessfulBuildNumbers` in interface `StatisticsCollector`
  Returns:
    `List` of `Integer` representing success build numbers. Sorted ASC.

### getFailedBuildNumbers

    public List getFailedBuildNumbers()

  List of build numbers which had fails

  Specified by:
    `getFailedBuildNumbers` in interface `StatisticsCollector`
  Returns:
    `List` of `Integer` representing failed build numbers . Sorted ASC.

### getCreatedInBuild

    public int getCreatedInBuild()

  what is the first build number in this collection?

  Specified by:
    `getCreatedInBuild` in interface `StatisticsCollector`
  Returns:
    first build number;

### getLastRanInBuild

    public int getLastRanInBuild()

  What is the last number in this collection?

  Specified by:
    `getLastRanInBuild` in interface `StatisticsCollector`
  Returns:
    last build number

### getLongestElapsedTimePeriod

    public FailurePeriod getLongestElapsedTimePeriod()

  Specified by:
    `getLongestElapsedTimePeriod` in interface `StatisticsCollector`
  Returns:
    `FailurePeriod` with the longest elapsed time period

### getLongestElapsedBuildPeriod

    public FailurePeriod getLongestElapsedBuildPeriod()

  Specified by:
    `getLongestElapsedBuildPeriod` in interface `StatisticsCollector`
  Returns:
    `FailurePeriod` with the longest elapsed builds.

### getAverageElapsedTime

    public long getAverageElapsedTime()

  Returns the averag etime in milliseconds it takes for builds to be fixed

  Specified by:
    `getAverageElapsedTime` in interface `StatisticsCollector`
  Returns:
    time in milliseconds

### getAverageElapsedBuilds

    public float getAverageElapsedBuilds()

  Calculates the average number of builds between fixes.

  Specified by:
    `getAverageElapsedBuilds` in interface `StatisticsCollector`
  Returns:
    approximate number of builds elapsed before a fix

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 Atlassian Software Systems. All Rights Reserved.