ray.util.metrics.Gauge
ray.util.metrics.Gauge#
- class ray.util.metrics.Gauge(name: str, description: str = '', tag_keys: Optional[Tuple[str, ...]] = None)[source]#
Bases:
ray.util.metrics.MetricGauges keep the last recorded value and drop everything before.
Unlike counters, gauges can go up or down over time.
This corresponds to Prometheus’ gauge metric: https://prometheus.io/docs/concepts/metric_types/#gauge
- Parameters
name – Name of the metric.
description – Description of the metric.
tag_keys – Tag keys of the metric.
DeveloperAPI: This API may change across minor Ray releases.
Methods
record(value[, tags, _internal])Record the metric point of the metric.
set(value[, tags])Set the gauge to the given
value.set_default_tags(default_tags)Set default tags of metrics.
Attributes
Return the information of this metric.