Commit 2df08f0f authored by Miguel Jimenez Lopez's avatar Miguel Jimenez Lopez

irq-demo: Add iterations field for stats-engine

It helps to identify the number of times that run() function is called for the
stats-engine. This is useful just to compare with the number of timestamps received.
parent 45b5ebe0
......@@ -33,6 +33,7 @@ struct _stats_engine {
unsigned int n_ts;
unsigned int current_ts;
unsigned int next_ts;
unsigned int n_iter;
log_device *logs;
unsigned int n_logs;
......
......@@ -104,6 +104,8 @@ int run_stats_engine(stats_engine engine, int verbose)
update_index_stats_engine(&engine->current_ts);
engine->n_iter++;
return 0;
}
......@@ -136,6 +138,7 @@ static void log_stats_engine(stats_engine engine, int verbose)
if(verbose) {
LOG(engine, "n_ts: %d", engine->n_ts);
LOG(engine, "next_ts: %d\n", engine->next_ts);
LOG(engine, "Iterations: %d\n", engine->n_iter);
for(int i = 0 ; i < engine->n_ts ; i++) {
LOG(engine, "\tsys_ts[%d]: sec %ld, nsec %ld",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment