ray.util.metrics.Histogram
ray.util.metrics.Histogram#
- class ray.util.metrics.Histogram(name: str, description: str = '', boundaries: Optional[List[float]] = None, tag_keys: Optional[Tuple[str, ...]] = None)[source]#
Bases:
ray.util.metrics.MetricTracks the size and number of events in buckets.
Histograms allow you to calculate aggregate quantiles such as 25, 50, 95, 99 percentile latency for an RPC.
This corresponds to Prometheus’ histogram metric: https://prometheus.io/docs/concepts/metric_types/#histogram
- Parameters
name – Name of the metric.
description – Description of the metric.
boundaries – Boundaries of histogram buckets.
tag_keys – Tag keys of the metric.
DeveloperAPI: This API may change across minor Ray releases.
Methods
observe(value[, tags])Observe a given
valueand add it to the appropriate bucket.record(value[, tags, _internal])Record the metric point of the metric.
set_default_tags(default_tags)Set default tags of metrics.
Attributes
Return information about histogram metric.