use const& in metrics interface

master
Andre Puschmann 5 years ago
parent 77522a6b69
commit b0bfc7956d

@ -46,7 +46,7 @@ template <typename metrics_t>
class metrics_listener
{
public:
virtual void set_metrics(metrics_t& m, const uint32_t period_usec) = 0;
virtual void set_metrics(const metrics_t& m, const uint32_t period_usec) = 0;
virtual void stop() = 0;
};

@ -44,7 +44,7 @@ public:
metrics_csv(std::string filename);
~metrics_csv();
void set_metrics(enb_metrics_t& m, const uint32_t period_usec);
void set_metrics(const enb_metrics_t& m, const uint32_t period_usec);
void set_handle(enb_metrics_interface* enb_);
void stop();

@ -41,7 +41,7 @@ public:
metrics_stdout();
void toggle_print(bool b);
void set_metrics(enb_metrics_t& m, const uint32_t period_usec);
void set_metrics(const enb_metrics_t& m, const uint32_t period_usec);
void set_handle(enb_metrics_interface* enb_);
void stop(){};

@ -59,7 +59,7 @@ void metrics_csv::stop()
}
}
void metrics_csv::set_metrics(enb_metrics_t& metrics, const uint32_t period_usec)
void metrics_csv::set_metrics(const enb_metrics_t& metrics, const uint32_t period_usec)
{
if (file.is_open() && enb != NULL) {
if (n_reports == 0) {

@ -73,7 +73,7 @@ void metrics_stdout::toggle_print(bool b)
do_print = b;
}
void metrics_stdout::set_metrics(enb_metrics_t& metrics, const uint32_t period_usec)
void metrics_stdout::set_metrics(const enb_metrics_t& metrics, const uint32_t period_usec)
{
if (!do_print || enb == nullptr) {
return;

@ -44,7 +44,7 @@ public:
metrics_csv(std::string filename);
~metrics_csv();
void set_metrics(ue_metrics_t& m, const uint32_t period_usec);
void set_metrics(const ue_metrics_t& m, const uint32_t period_usec);
void set_ue_handle(ue_metrics_interface* ue_);
void stop();

@ -42,7 +42,7 @@ public:
metrics_stdout();
void toggle_print(bool b);
void set_metrics(ue_metrics_t& m, const uint32_t period_usec);
void set_metrics(const ue_metrics_t& m, const uint32_t period_usec);
void set_ue_handle(ue_metrics_interface* ue_);
void stop(){};

@ -63,7 +63,7 @@ void metrics_csv::stop()
pthread_mutex_unlock(&mutex);
}
void metrics_csv::set_metrics(ue_metrics_t& metrics, const uint32_t period_usec)
void metrics_csv::set_metrics(const ue_metrics_t& metrics, const uint32_t period_usec)
{
pthread_mutex_lock(&mutex);
if (file.is_open() && ue != NULL) {

@ -75,7 +75,7 @@ void metrics_stdout::toggle_print(bool b)
do_print = b;
}
void metrics_stdout::set_metrics(ue_metrics_t& metrics, const uint32_t period_usec)
void metrics_stdout::set_metrics(const ue_metrics_t& metrics, const uint32_t period_usec)
{
if (ue == nullptr) {
return;

Loading…
Cancel
Save