Metric.msg

Overview

Metric.msg represents a single metric value, optionally labeled, that can be one of three types: counter, gauge, or histogram. It mirrors the metric model used internally by Cartographer’s metrics infrastructure.

Constants

Constant

Value

Meaning

TYPE_COUNTER

0

A monotonically increasing counter.

TYPE_GAUGE

1

A value that can increase and decrease.

TYPE_HISTOGRAM

2

A distribution of values across buckets.

Fields

Field

Type

Description

type

uint8

One of the TYPE_* constants above.

labels

cartographer_ros_msgs/MetricLabel[]

Key/value labels attached to this metric.

value

float64

The metric value, valid for TYPE_COUNTER or TYPE_GAUGE.

counts_by_bucket

cartographer_ros_msgs/HistogramBucket[]

The per-bucket counts, valid for TYPE_HISTOGRAM.

Usage

  • For counters and gauges, populate value and leave counts_by_bucket empty.

  • For histograms, populate counts_by_bucket; value is unused.

  • Metrics are grouped into families via MetricFamily.msg.