Package jetbrains.buildServer.serverSide
Class BuildMetric
- java.lang.Object
-
- jetbrains.buildServer.serverSide.BuildMetric
-
- All Implemented Interfaces:
ServerExtension,TeamCityExtension
- Direct Known Subclasses:
BuildLogSizeMetric,FailedTestCountMetric,IgnoredTestCountMetric,PassedTestCountMetric,StatisticsBuildMetric,TestCountMetric
public abstract class BuildMetric extends Object implements ServerExtension
A named build metric. Can calculate some number by build.- Since:
- 7.0
- Author:
- kir
-
-
Constructor Summary
Constructors Constructor Description BuildMetric(String key, String description)BuildMetric(String key, String description, String format)Creates new build metric with the specified key, description and format
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract BigDecimalcalculateMetric(SBuild build)Metric calculatorStringgetDescription()Human-readable metric description in lower caseStringgetFormat()Metric format used for metric value representation.StringgetKey()Return metric key.
-
-
-
Constructor Detail
-
BuildMetric
public BuildMetric(@NotNull String key, @NotNull String description, @Nullable String format)Creates new build metric with the specified key, description and format- Parameters:
key-getKey()description-getDescription()format-getFormat()
-
-
Method Detail
-
getKey
@NotNull public 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
@NotNull public String getDescription()
Human-readable metric description in lower case- Returns:
- see above
-
getFormat
@Nullable public String getFormat()
Metric format used for metric value representation. For supported formats seeValueType.getValueFormat()}- Returns:
- see above
-
calculateMetric
@Nullable public abstract BigDecimal calculateMetric(SBuild build)
Metric calculator- Returns:
- metric value
-
-