jetbrains.buildServer.serverSide
Class BuildMetric

java.lang.Object
  extended by jetbrains.buildServer.serverSide.BuildMetric
All Implemented Interfaces:
ServerExtension, TeamCityExtension
Direct Known Subclasses:
StatisticsBuildMetric

public abstract class BuildMetric
extends java.lang.Object
implements ServerExtension

A named build metric. Can calculate some number by build.

Since:
7.0
Author:
kir

Field Summary
protected  java.lang.String myDescription
           
protected  java.lang.String myKey
           
 
Constructor Summary
BuildMetric(java.lang.String key, java.lang.String description)
           
 
Method Summary
abstract  java.math.BigDecimal calculateMetric(SBuild build)
          Metric calculator
 java.lang.String getDescription()
          Human-readable metric description in lower case
 java.lang.String getKey()
          Return metric key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myKey

protected final java.lang.String myKey

myDescription

protected final java.lang.String myDescription
Constructor Detail

BuildMetric

public BuildMetric(@NotNull
                   java.lang.String key,
                   @NotNull
                   java.lang.String description)
Method Detail

getKey

public java.lang.String getKey()
Return metric key. The key should be unique throughout the system. If two metrics have the same key, one of them will override another

Returns:
see above

getDescription

public java.lang.String getDescription()
Human-readable metric description in lower case

Returns:
see above

calculateMetric

public abstract java.math.BigDecimal calculateMetric(SBuild build)
Metric calculator

Returns:
metric value