Skip to content

Commit

Permalink
Tools: Testbench: Set trace level to info when option quiet is set
Browse files Browse the repository at this point in the history
The default testbench trace level debug consumes a lot of
processing time due to large amount of prints. It also adds
a lot to measured MCPS with xtensa build of testbench.

As fix the command line option -q is set to control
host_trace_level. In quiet mode the level is set to info. It
is a suitable level for code profiling and performance
measurement.

Signed-off-by: Seppo Ingalsuo <[email protected]>
  • Loading branch information
singalsu committed Oct 15, 2024
1 parent 538006a commit cbcd51f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/testbench/testbench.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static void print_usage(char *executable)
printf(" -a <comp1=comp1_library,comp2=comp2_library>, override default library\n\n");
printf("Options to control test:\n");
printf(" -d Run in debug mode\n");
printf(" -q Run in quiet mode, suppress traces output\n");
printf(" -q Run in quieter mode, set trace level to info\n");
printf(" -p <pipeline1,pipeline2,...>\n");
printf(" -s Use real time priorities for threads (needs sudo)\n");
printf(" -C <number of copy() iterations>\n");
Expand Down Expand Up @@ -321,6 +321,11 @@ static int pipline_test(struct testbench_prm *tp)
int nsleep_time;
int nsleep_limit;

if (tp->quiet)
host_trace_level = LOG_LEVEL_INFO;
else
host_trace_level = LOG_LEVEL_DEBUG;

/* build, run and teardown pipelines */
while (dp_count < tp->dynamic_pipeline_iterations) {
fprintf(stdout, "pipeline run %d/%d\n", dp_count,
Expand Down

0 comments on commit cbcd51f

Please sign in to comment.