Class TestMetadataValueType
- java.lang.Object
-
- jetbrains.buildServer.serverSide.stat.TestMetadataValueType
-
- All Implemented Interfaces:
ValueProvider,ValueType
public class TestMetadataValueType extends Object implements ValueType
ValueType for numeric test metadata graphs. Key chart settings: testNameId, metadataKey, buildTypeId- Since:
- 2018.2
-
-
Constructor Summary
Constructors Constructor Description TestMetadataValueType(ValueProviderRegistry valueProviderRegistry, SQLRunnerEx sqlRunner, ProjectManager projectManager, TestName2Index testName2Index, TestMetadataStorage metadataStorage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<BuildValue>getDataSet(ChartSettings chartSettings)This should return dataset based given chartSettingsStringgetDescription(ChartSettings chartSettings)Metric textual description, i.e.StringgetExtendedDescription(ChartSettings chartSettings)Extended metric textual description (for tooltip), i.e.StringgetKey()Metric id i.e.StringgetSeriesColor(String s)Allows to provide special color coding for series.StringgetSeriesGenericName()Generic name for this value's seriesStringgetValueFormat()Format name for Values (point hints and axis).StringgetValueFormat(ChartSettings chartSettings)Return format type for the values, according to provided chartSettings.booleanhasData(ChartSettings chartSettings)Returns true if at least one not-null value is available for this ValueProvider for given settings
-
-
-
Constructor Detail
-
TestMetadataValueType
public TestMetadataValueType(@NotNull ValueProviderRegistry valueProviderRegistry, @NotNull SQLRunnerEx sqlRunner, @NotNull ProjectManager projectManager, @NotNull TestName2Index testName2Index, @NotNull TestMetadataStorage metadataStorage)
-
-
Method Detail
-
getDataSet
@NotNull public List<BuildValue> getDataSet(@NotNull ChartSettings chartSettings)
Description copied from interface:ValueProviderThis should return dataset based given chartSettings- Specified by:
getDataSetin interfaceValueProvider- Parameters:
chartSettings- to be applied to dataset- Returns:
- filtered dataset
-
hasData
public boolean hasData(ChartSettings chartSettings)
Description copied from interface:ValueProviderReturns true if at least one not-null value is available for this ValueProvider for given settings- Specified by:
hasDatain interfaceValueProvider- Parameters:
chartSettings- dataset chartSettings- Returns:
- true if there are some data available for this ValueProvider with given settings
-
getKey
@NotNull public String getKey()
Description copied from interface:ValueProviderMetric id i.e. "BuildDuration", this key should be unique- Specified by:
getKeyin interfaceValueProvider- Returns:
- Unique key name
-
getDescription
@NotNull public String getDescription(ChartSettings chartSettings)
Description copied from interface:ValueTypeMetric textual description, i.e. "Build Duration"- Specified by:
getDescriptionin interfaceValueType- Parameters:
chartSettings- the same settings as passed toValueProvider.getDataSet(ChartSettings)method- Returns:
- graph description, used in graph title on the web
-
getExtendedDescription
@NotNull public String getExtendedDescription(ChartSettings chartSettings)
Description copied from interface:ValueTypeExtended metric textual description (for tooltip), i.e. "Build Duration (includes stages A, B, C)"- Specified by:
getExtendedDescriptionin interfaceValueType- Parameters:
chartSettings- the same filter as passed toValueProvider.getDataSet(ChartSettings)method- Returns:
- graph description, used in graph title on the web
-
getValueFormat
@Nullable public String getValueFormat()
Description copied from interface:ValueTypeFormat name for Values (point hints and axis).
Following formats are supported by default:
- text - no special formatting, value is treat as float
- integer - only integer values
- duration - value is treat as milliseconds and is formatted
- size - value is treat as bytes and is formatted
- percent - value is treat as N%
- percentBy1 - value is treat as (N * 100)%
- Specified by:
getValueFormatin interfaceValueType- Returns:
- format name.
-
getValueFormat
@Nullable public String getValueFormat(@NotNull ChartSettings chartSettings)
Description copied from interface:ValueTypeReturn format type for the values, according to provided chartSettings. By default, delegates to getValueFormat()Format name for Values (point hints and axis).
Following formats are supported by default:
- text - no special formatting, value is treat as float
- integer - only integer values
- duration - value is treat as milliseconds and is formatted
- size - value is treat as bytes and is formatted
- percent - value is treat as N%
- percentBy1 - value is treat as (N * 100)%
- Specified by:
getValueFormatin interfaceValueType- Parameters:
chartSettings- context which can be used to determine the format- Returns:
- see above
-
getSeriesColor
@Nullable public String getSeriesColor(String s)
Description copied from interface:ValueTypeAllows to provide special color coding for series.
Color should be formatted as web color - hex "#rrggbb" (or short hex form "#rgb") or color name.
- Specified by:
getSeriesColorin interfaceValueType- Parameters:
s- series key- Returns:
- series color, null to autogenerate by renderer
-
getSeriesGenericName
public String getSeriesGenericName()
Description copied from interface:ValueTypeGeneric name for this value's series- Specified by:
getSeriesGenericNamein interfaceValueType- Returns:
- short name string
-
-