Print buffer pool status every 10s (Debugging commit)

This commit is contained in:
Ismael Gomez 2018-03-06 12:37:45 +01:00
parent 206e41a244
commit dc65061dbb
5 changed files with 13 additions and 1 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -278,6 +278,10 @@ void ue::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)
{
m.rf = rf_metrics;