Package jetbrains.buildServer.metrics
Interface MetricQueryBuilder
-
public interface MetricQueryBuilder
- Since:
- 2019.2
- Author:
- kir
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MetricQueryBuilder
addTag(String tagName, String tagValue)
Add to the query the tag with given name and given value.List<MetricValue>
build()
MetricQueryBuilder
dataType(MetricDataType type)
MetricValue
getMetricValue(String metricName, Map<String,String> nonCommonTags, boolean experimental)
Return a metric value for a specified metric by name and tags, should be a fast operation.MetricQueryBuilder
namePart(String namePart)
MetricQueryBuilder
withExperimental(boolean returnExperimental)
-
-
-
Method Detail
-
withExperimental
@NotNull MetricQueryBuilder withExperimental(boolean returnExperimental)
- Parameters:
returnExperimental
- if true, experimental metrics will be returned as well
-
dataType
@NotNull MetricQueryBuilder dataType(MetricDataType type)
- Parameters:
type
- allows to limit returned results to a particular data type
-
namePart
@NotNull MetricQueryBuilder namePart(@NotNull String namePart)
- Parameters:
namePart
- Part of the metric name to be returned
-
addTag
MetricQueryBuilder addTag(String tagName, String tagValue)
Add to the query the tag with given name and given value. Can be called several times for the same tagName. In this case, any of the provided `tagValue` will match the `build` query.- Parameters:
tagName
-tagValue
-- Returns:
- query builder
-
build
@NotNull List<MetricValue> build()
- Returns:
- all metric values which fit the current builder conditions
-
getMetricValue
@Nullable MetricValue getMetricValue(@NotNull String metricName, @NotNull Map<String,String> nonCommonTags, boolean experimental)
Return a metric value for a specified metric by name and tags, should be a fast operation. For this call, only one value for a requested tag is supported, i.e. if you cannot this builder with multiple `addTag` calls for the same tagName.- Parameters:
metricName
- name in the format "foo.bar" as when metric was creatednonCommonTags
- set of tags for this metricexperimental
- true if the metric was marked experimental, false otherwise, it is translated into 'experimental' tag.- Returns:
- see above
-
-