Print buffer pool status every 10s (Debugging commit)

master
Ismael Gomez 7 years ago
parent 206e41a244
commit dc65061dbb

@ -173,6 +173,9 @@ public:
pool->deallocate(b); pool->deallocate(b);
b = NULL; b = NULL;
} }
void print_all_buffers() {
pool->print_all_buffers();
}
private: private:
buffer_pool<byte_buffer_t> *pool; buffer_pool<byte_buffer_t> *pool;
}; };

@ -72,6 +72,8 @@ public:
bool is_attached(); bool is_attached();
void start_plot(); void start_plot();
void print_pool();
static void rf_msg(srslte_rf_error_t error); static void rf_msg(srslte_rf_error_t error);
// UE metrics interface // UE metrics interface

@ -157,6 +157,8 @@ public:
virtual bool is_attached() = 0; virtual bool is_attached() = 0;
virtual void start_plot() = 0; virtual void start_plot() = 0;
virtual void print_pool() = 0;
virtual void radio_overflow() = 0; virtual void radio_overflow() = 0;
void handle_rf_msg(srslte_rf_error_t error); void handle_rf_msg(srslte_rf_error_t error);

@ -474,7 +474,8 @@ int main(int argc, char *argv[])
plot_started = true; plot_started = true;
} }
} }
sleep(1); ue->print_pool();
sleep(10);
} }
pthread_cancel(input); pthread_cancel(input);
metricshub.stop(); metricshub.stop();

@ -278,6 +278,10 @@ void ue::start_plot() {
phy.start_plot(); phy.start_plot();
} }
void ue::print_pool() {
byte_buffer_pool::get_instance()->print_all_buffers();
}
bool ue::get_metrics(ue_metrics_t &m) bool ue::get_metrics(ue_metrics_t &m)
{ {
m.rf = rf_metrics; m.rf = rf_metrics;

Loading…
Cancel
Save