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 chartSettingsString
getDescription(ChartSettings chartSettings)
Metric textual description, i.e.String
getExtendedDescription(ChartSettings chartSettings)
Extended metric textual description (for tooltip), i.e.String
getKey()
Metric id i.e.String
getSeriesColor(String s)
Allows to provide special color coding for series.String
getSeriesGenericName()
Generic name for this value's seriesString
getValueFormat()
Format name for Values (point hints and axis).String
getValueFormat(ChartSettings chartSettings)
Return format type for the values, according to provided chartSettings.boolean
hasData(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:ValueProvider
This should return dataset based given chartSettings- Specified by:
getDataSet
in interfaceValueProvider
- Parameters:
chartSettings
- to be applied to dataset- Returns:
- filtered dataset
-
hasData
public boolean hasData(ChartSettings chartSettings)
Description copied from interface:ValueProvider
Returns true if at least one not-null value is available for this ValueProvider for given settings- Specified by:
hasData
in 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:ValueProvider
Metric id i.e. "BuildDuration", this key should be unique- Specified by:
getKey
in interfaceValueProvider
- Returns:
- Unique key name
-
getDescription
@NotNull public String getDescription(ChartSettings chartSettings)
Description copied from interface:ValueType
Metric textual description, i.e. "Build Duration"- Specified by:
getDescription
in 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:ValueType
Extended metric textual description (for tooltip), i.e. "Build Duration (includes stages A, B, C)"- Specified by:
getExtendedDescription
in 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:ValueType
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:
getValueFormat
in interfaceValueType
- Returns:
- format name.
-
getValueFormat
@Nullable public String getValueFormat(@NotNull ChartSettings chartSettings)
Description copied from interface:ValueType
Return 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:
getValueFormat
in 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:ValueType
Allows 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:
getSeriesColor
in interfaceValueType
- Parameters:
s
- series key- Returns:
- series color, null to autogenerate by renderer
-
getSeriesGenericName
public String getSeriesGenericName()
Description copied from interface:ValueType
Generic name for this value's series- Specified by:
getSeriesGenericName
in interfaceValueType
- Returns:
- short name string
-
-