add CSV metrics to UE

master
Andre Puschmann 7 years ago
parent 6eb6468ba9
commit 15d89c3e95

@ -107,6 +107,8 @@ typedef struct {
float metrics_period_secs;
bool pregenerate_signals;
std::string ue_cateogry;
bool metrics_csv_enable;
std::string metrics_csv_filename;
}expert_args_t;
typedef struct {

@ -38,6 +38,7 @@
#include "ue.h"
#include "metrics_stdout.h"
#include "metrics_csv.h"
#include "srslte/common/metrics_hub.h"
#include "srslte/version.h"
@ -135,6 +136,14 @@ void parse_args(all_args_t *args, int argc, char *argv[]) {
bpo::value<float>(&args->expert.metrics_period_secs)->default_value(1.0),
"Periodicity for metrics in seconds")
("expert.metrics_csv_enable",
bpo::value<bool>(&args->expert.metrics_csv_enable)->default_value(false),
"Write UE metrics to CSV file")
("expert.metrics_csv_filename",
bpo::value<string>(&args->expert.metrics_csv_filename)->default_value("/tmp/ue_metrics.csv"),
"Metrics CSV filename")
("expert.pregenerate_signals",
bpo::value<bool>(&args->expert.pregenerate_signals)->default_value(false),
"Pregenerate uplink signals after attach. Improves CPU performance.")
@ -363,11 +372,16 @@ int main(int argc, char *argv[])
exit(1);
}
metricshub.init(ue, args.expert.metrics_period_secs);
metricshub.add_listener(&metrics_screen);
metrics_screen.set_ue_handle(ue);
metrics_csv metrics_file(args.expert.metrics_csv_filename);
if (args.expert.metrics_csv_enable) {
metricshub.add_listener(&metrics_file);
metrics_file.set_ue_handle(ue);
}
pthread_t input;
pthread_create(&input, NULL, &input_loop, &args);

@ -130,6 +130,10 @@ enable = false
#
# pregenerate_signals: Pregenerate uplink signals after attach. Improves CPU performance.
#
# metrics_csv_enable: Write UE metrics to CSV file.
#
# metrics_csv_filename: File path to use for CSV metrics.
#
#####################################################################
[expert]
#ue_category = 4
@ -149,6 +153,8 @@ enable = false
#sss_algorithm = full
#estimator_fil_w = 0.1
#pregenerate_signals = false
#metrics_csv_enable = false
#metrics_csv_filename = /tmp/ue_metrics.csv
#####################################################################
# Manual RF calibration

Loading…
Cancel
Save