Rename metrics since slashes are not allowed in Prometheus (#1115)
parent
41f17e57cd
commit
5356bdf9a8
|
@ -316,24 +316,24 @@ void LocalTrajectoryBuilder2D::InitializeExtrapolator(const common::Time time) {
|
||||||
void LocalTrajectoryBuilder2D::RegisterMetrics(
|
void LocalTrajectoryBuilder2D::RegisterMetrics(
|
||||||
metrics::FamilyFactory* family_factory) {
|
metrics::FamilyFactory* family_factory) {
|
||||||
auto* latency = family_factory->NewGaugeFamily(
|
auto* latency = family_factory->NewGaugeFamily(
|
||||||
"/mapping/internal/2d/local_trajectory_builder/latency",
|
"mapping_internal_2d_local_trajectory_builder_latency",
|
||||||
"Duration from first incoming point cloud in accumulation to local slam "
|
"Duration from first incoming point cloud in accumulation to local slam "
|
||||||
"result");
|
"result");
|
||||||
kLocalSlamLatencyMetric = latency->Add({});
|
kLocalSlamLatencyMetric = latency->Add({});
|
||||||
auto score_boundaries = metrics::Histogram::FixedWidth(0.05, 20);
|
auto score_boundaries = metrics::Histogram::FixedWidth(0.05, 20);
|
||||||
auto* scores = family_factory->NewHistogramFamily(
|
auto* scores = family_factory->NewHistogramFamily(
|
||||||
"/mapping/internal/2d/local_trajectory_builder/scores",
|
"mapping_internal_2d_local_trajectory_builder_scores",
|
||||||
"Local scan matcher scores", score_boundaries);
|
"Local scan matcher scores", score_boundaries);
|
||||||
kFastCorrelativeScanMatcherScoreMetric =
|
kFastCorrelativeScanMatcherScoreMetric =
|
||||||
scores->Add({{"scan_matcher", "fast_correlative"}});
|
scores->Add({{"scan_matcher", "fast_correlative"}});
|
||||||
auto cost_boundaries = metrics::Histogram::ScaledPowersOf(2, 0.01, 100);
|
auto cost_boundaries = metrics::Histogram::ScaledPowersOf(2, 0.01, 100);
|
||||||
auto* costs = family_factory->NewHistogramFamily(
|
auto* costs = family_factory->NewHistogramFamily(
|
||||||
"/mapping/internal/2d/local_trajectory_builder/costs",
|
"mapping_internal_2d_local_trajectory_builder_costs",
|
||||||
"Local scan matcher costs", cost_boundaries);
|
"Local scan matcher costs", cost_boundaries);
|
||||||
kCeresScanMatcherCostMetric = costs->Add({{"scan_matcher", "ceres"}});
|
kCeresScanMatcherCostMetric = costs->Add({{"scan_matcher", "ceres"}});
|
||||||
auto distance_boundaries = metrics::Histogram::ScaledPowersOf(2, 0.01, 10);
|
auto distance_boundaries = metrics::Histogram::ScaledPowersOf(2, 0.01, 10);
|
||||||
auto* residuals = family_factory->NewHistogramFamily(
|
auto* residuals = family_factory->NewHistogramFamily(
|
||||||
"/mapping/internal/2d/local_trajectory_builder/residuals",
|
"mapping_internal_2d_local_trajectory_builder_residuals",
|
||||||
"Local scan matcher residuals", distance_boundaries);
|
"Local scan matcher residuals", distance_boundaries);
|
||||||
kScanMatcherResidualDistanceMetric =
|
kScanMatcherResidualDistanceMetric =
|
||||||
residuals->Add({{"component", "distance"}});
|
residuals->Add({{"component", "distance"}});
|
||||||
|
|
|
@ -300,24 +300,24 @@ LocalTrajectoryBuilder3D::InsertIntoSubmap(
|
||||||
void LocalTrajectoryBuilder3D::RegisterMetrics(
|
void LocalTrajectoryBuilder3D::RegisterMetrics(
|
||||||
metrics::FamilyFactory* family_factory) {
|
metrics::FamilyFactory* family_factory) {
|
||||||
auto* latency = family_factory->NewGaugeFamily(
|
auto* latency = family_factory->NewGaugeFamily(
|
||||||
"/mapping/internal/3d/local_trajectory_builder/latency",
|
"mapping_internal_3d_local_trajectory_builder_latency",
|
||||||
"Duration from first incoming point cloud in accumulation to local slam "
|
"Duration from first incoming point cloud in accumulation to local slam "
|
||||||
"result");
|
"result");
|
||||||
kLocalSlamLatencyMetric = latency->Add({});
|
kLocalSlamLatencyMetric = latency->Add({});
|
||||||
auto score_boundaries = metrics::Histogram::FixedWidth(0.05, 20);
|
auto score_boundaries = metrics::Histogram::FixedWidth(0.05, 20);
|
||||||
auto* scores = family_factory->NewHistogramFamily(
|
auto* scores = family_factory->NewHistogramFamily(
|
||||||
"/mapping/internal/3d/local_trajectory_builder/scores",
|
"mapping_internal_3d_local_trajectory_builder_scores",
|
||||||
"Local scan matcher scores", score_boundaries);
|
"Local scan matcher scores", score_boundaries);
|
||||||
kRealTimeCorrelativeScanMatcherScoreMetric =
|
kRealTimeCorrelativeScanMatcherScoreMetric =
|
||||||
scores->Add({{"scan_matcher", "real_time_correlative"}});
|
scores->Add({{"scan_matcher", "real_time_correlative"}});
|
||||||
auto cost_boundaries = metrics::Histogram::ScaledPowersOf(2, 0.01, 100);
|
auto cost_boundaries = metrics::Histogram::ScaledPowersOf(2, 0.01, 100);
|
||||||
auto* costs = family_factory->NewHistogramFamily(
|
auto* costs = family_factory->NewHistogramFamily(
|
||||||
"/mapping/internal/3d/local_trajectory_builder/costs",
|
"mapping_internal_3d_local_trajectory_builder_costs",
|
||||||
"Local scan matcher costs", cost_boundaries);
|
"Local scan matcher costs", cost_boundaries);
|
||||||
kCeresScanMatcherCostMetric = costs->Add({{"scan_matcher", "ceres"}});
|
kCeresScanMatcherCostMetric = costs->Add({{"scan_matcher", "ceres"}});
|
||||||
auto distance_boundaries = metrics::Histogram::ScaledPowersOf(2, 0.01, 10);
|
auto distance_boundaries = metrics::Histogram::ScaledPowersOf(2, 0.01, 10);
|
||||||
auto* residuals = family_factory->NewHistogramFamily(
|
auto* residuals = family_factory->NewHistogramFamily(
|
||||||
"/mapping/internal/3d/local_trajectory_builder/residuals",
|
"mapping_internal_3d_local_trajectory_builder_residuals",
|
||||||
"Local scan matcher residuals", distance_boundaries);
|
"Local scan matcher residuals", distance_boundaries);
|
||||||
kScanMatcherResidualDistanceMetric =
|
kScanMatcherResidualDistanceMetric =
|
||||||
residuals->Add({{"component", "distance"}});
|
residuals->Add({{"component", "distance"}});
|
||||||
|
|
|
@ -307,7 +307,7 @@ void ConstraintBuilder2D::DeleteScanMatcher(const SubmapId& submap_id) {
|
||||||
|
|
||||||
void ConstraintBuilder2D::RegisterMetrics(metrics::FamilyFactory* factory) {
|
void ConstraintBuilder2D::RegisterMetrics(metrics::FamilyFactory* factory) {
|
||||||
auto* counts = factory->NewCounterFamily(
|
auto* counts = factory->NewCounterFamily(
|
||||||
"/mapping/2d/pose_graph/constraint_builder/constraints",
|
"mapping_internal_constraints_constraint_builder_2d_constraints",
|
||||||
"Constraints computed");
|
"Constraints computed");
|
||||||
kConstraintsSearchedMetric =
|
kConstraintsSearchedMetric =
|
||||||
counts->Add({{"search_region", "local"}, {"matcher", "searched"}});
|
counts->Add({{"search_region", "local"}, {"matcher", "searched"}});
|
||||||
|
@ -318,11 +318,12 @@ void ConstraintBuilder2D::RegisterMetrics(metrics::FamilyFactory* factory) {
|
||||||
kGlobalConstraintsFoundMetric =
|
kGlobalConstraintsFoundMetric =
|
||||||
counts->Add({{"search_region", "global"}, {"matcher", "found"}});
|
counts->Add({{"search_region", "global"}, {"matcher", "found"}});
|
||||||
auto* queue_length = factory->NewGaugeFamily(
|
auto* queue_length = factory->NewGaugeFamily(
|
||||||
"/mapping/2d/pose_graph/constraint_builder/queue_length", "Queue length");
|
"mapping_internal_constraints_constraint_builder_2d_queue_length",
|
||||||
|
"Queue length");
|
||||||
kQueueLengthMetric = queue_length->Add({});
|
kQueueLengthMetric = queue_length->Add({});
|
||||||
auto boundaries = metrics::Histogram::FixedWidth(0.05, 20);
|
auto boundaries = metrics::Histogram::FixedWidth(0.05, 20);
|
||||||
auto* scores = factory->NewHistogramFamily(
|
auto* scores = factory->NewHistogramFamily(
|
||||||
"/mapping/2d/pose_graph/constraint_builder/scores",
|
"mapping_internal_constraints_constraint_builder_2d_scores",
|
||||||
"Constraint scores built", boundaries);
|
"Constraint scores built", boundaries);
|
||||||
kConstraintScoresMetric = scores->Add({{"search_region", "local"}});
|
kConstraintScoresMetric = scores->Add({{"search_region", "local"}});
|
||||||
kGlobalConstraintScoresMetric = scores->Add({{"search_region", "global"}});
|
kGlobalConstraintScoresMetric = scores->Add({{"search_region", "global"}});
|
||||||
|
|
|
@ -340,7 +340,7 @@ void ConstraintBuilder3D::DeleteScanMatcher(const SubmapId& submap_id) {
|
||||||
|
|
||||||
void ConstraintBuilder3D::RegisterMetrics(metrics::FamilyFactory* factory) {
|
void ConstraintBuilder3D::RegisterMetrics(metrics::FamilyFactory* factory) {
|
||||||
auto* counts = factory->NewCounterFamily(
|
auto* counts = factory->NewCounterFamily(
|
||||||
"/mapping/3d/pose_graph/constraint_builder/constraints",
|
"mapping_internal_constraints_constraint_builder_3d_constraints",
|
||||||
"Constraints computed");
|
"Constraints computed");
|
||||||
kConstraintsSearchedMetric =
|
kConstraintsSearchedMetric =
|
||||||
counts->Add({{"search_region", "local"}, {"matcher", "searched"}});
|
counts->Add({{"search_region", "local"}, {"matcher", "searched"}});
|
||||||
|
@ -351,11 +351,12 @@ void ConstraintBuilder3D::RegisterMetrics(metrics::FamilyFactory* factory) {
|
||||||
kGlobalConstraintsFoundMetric =
|
kGlobalConstraintsFoundMetric =
|
||||||
counts->Add({{"search_region", "global"}, {"matcher", "found"}});
|
counts->Add({{"search_region", "global"}, {"matcher", "found"}});
|
||||||
auto* queue_length = factory->NewGaugeFamily(
|
auto* queue_length = factory->NewGaugeFamily(
|
||||||
"/mapping/3d/pose_graph/constraint_builder/queue_length", "Queue length");
|
"mapping_internal_constraints_constraint_builder_3d_queue_length",
|
||||||
|
"Queue length");
|
||||||
kQueueLengthMetric = queue_length->Add({});
|
kQueueLengthMetric = queue_length->Add({});
|
||||||
auto boundaries = metrics::Histogram::FixedWidth(0.05, 20);
|
auto boundaries = metrics::Histogram::FixedWidth(0.05, 20);
|
||||||
auto* scores = factory->NewHistogramFamily(
|
auto* scores = factory->NewHistogramFamily(
|
||||||
"/mapping/3d/pose_graph/constraint_builder/scores",
|
"mapping_internal_constraints_constraint_builder_3d_scores",
|
||||||
"Constraint scores built", boundaries);
|
"Constraint scores built", boundaries);
|
||||||
kConstraintScoresMetric =
|
kConstraintScoresMetric =
|
||||||
scores->Add({{"search_region", "local"}, {"kind", "score"}});
|
scores->Add({{"search_region", "local"}, {"kind", "score"}});
|
||||||
|
|
|
@ -155,7 +155,7 @@ std::unique_ptr<TrajectoryBuilderInterface> CreateGlobalTrajectoryBuilder3D(
|
||||||
|
|
||||||
void GlobalTrajectoryBuilderRegisterMetrics(metrics::FamilyFactory* factory) {
|
void GlobalTrajectoryBuilderRegisterMetrics(metrics::FamilyFactory* factory) {
|
||||||
auto* results = factory->NewCounterFamily(
|
auto* results = factory->NewCounterFamily(
|
||||||
"/mapping/internal/global_trajectory_builder/local_slam_results",
|
"mapping_internal_global_trajectory_builder_local_slam_results",
|
||||||
"Local SLAM results");
|
"Local SLAM results");
|
||||||
kLocalSlamMatchingResults = results->Add({{"type", "MatchingResult"}});
|
kLocalSlamMatchingResults = results->Add({{"type", "MatchingResult"}});
|
||||||
kLocalSlamInsertionResults = results->Add({{"type", "InsertionResult"}});
|
kLocalSlamInsertionResults = results->Add({{"type", "InsertionResult"}});
|
||||||
|
|
Loading…
Reference in New Issue