1
#pragma once
2

            
3
#include "envoy/upstream/host_description.h"
4

            
5
#include "xds/data/orca/v3/orca_load_report.pb.h"
6

            
7
namespace Envoy {
8
namespace Orca {
9

            
10
// List of metric names to report to the LRS.
11
using LrsReportMetricNames = std::vector<std::string>;
12

            
13
// Adds metrics with `metric_names` from the `report` to the `stats`.
14
void addOrcaLoadReportToLoadMetricStats(const LrsReportMetricNames& metric_names,
15
                                        const xds::data::orca::v3::OrcaLoadReport& report,
16
                                        Upstream::LoadMetricStats& stats);
17

            
18
// Returns the maximum value of metrics with `metric_names` in the `report`.
19
double getMaxUtilization(const LrsReportMetricNames& metric_names,
20
                         const xds::data::orca::v3::OrcaLoadReport& report);
21

            
22
} // namespace Orca
23
} // namespace Envoy