Commit c9abd663 authored by Jeroen Vreeken's avatar Jeroen Vreeken
Browse files

Add debug code to command test block

parent fe33bbf7
......@@ -19,6 +19,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <controller/controller_block.h>
#include <controller/controller_command.h>
......@@ -42,6 +43,8 @@ static void calculate_test_command(struct controller_block *block)
if (!priv->start_sec) {
priv->start_sec = controller_time_seconds;
priv->start_nsec = controller_time_nseconds % 1000000000;
log_send(LOG_T_DEBUG, "%s: Start time: %" PRIu64 ".%09" PRIu32,
block->name, priv->start_sec, priv->start_nsec);
}
if (priv->cur < priv->entries_nr) {
......@@ -56,6 +59,8 @@ static void calculate_test_command(struct controller_block *block)
entry->t.tv_nsec += priv->start_nsec;
}
log_send(LOG_T_DEBUG, "%s: Filter command %d and write to queue",
command->name, priv->cur);
if (command->filter)
r = command->filter(command, entry);
if (r == 0)
......
Supports Markdown
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