Skip to content

Commit

Permalink
decode: report loud messages in statsd stats
Browse files Browse the repository at this point in the history
Counter is increased for every message above 0dBFS
  • Loading branch information
f00b4r0 committed Jul 27, 2024
1 parent 63a43d2 commit 7ff8f99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,9 @@ void decode_vdl2_burst(vdl2_channel_t *v) {
goto cleanup;
}
statsd_timing_delta_per_channel(v->freq, "decoder.msg.processing_time", v->tstart);
if(log10f(v->frame_pwr) > 0) {
statsd_increment_per_channel(v->freq, "decoder.msg.good_loud");
}
cleanup:
XFREE(data);
XFREE(fec);
Expand Down
1 change: 1 addition & 0 deletions src/statsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ static char const *counters_per_channel[] = {
"decoder.errors.truncated_octets",
"decoder.errors.unstuff",
"decoder.msg.good",
"decoder.msg.good_loud",
"decoder.preambles.good",
"demod.sync.good",
NULL
Expand Down

0 comments on commit 7ff8f99

Please sign in to comment.