From 6ee735148479bebe9398d1bcf4a8f891c6bbe424 Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 4 Jan 2023 15:57:21 +0100 Subject: [PATCH] Log decoders latecy. --- signal.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/signal.c b/signal.c index fd986ce5a0c..cd3bb076d99 100644 --- a/signal.c +++ b/signal.c @@ -399,12 +399,12 @@ bool decode_signal(RawSamplesBuffer *s, uint64_t len, ProtoViewMsgInfo *info) { bool decoded = false; while(Decoders[j]) { - FURI_LOG_E(TAG, "Calling decoder %s", Decoders[j]->name); - if (Decoders[j]->decode(bitmap,bitmap_size,bits,info)) { - FURI_LOG_E(TAG, "Message detected by %s", Decoders[j]->name); - decoded = true; - break; - } + uint32_t start_time = furi_get_tick(); + decoded = Decoders[j]->decode(bitmap,bitmap_size,bits,info); + uint32_t delta = furi_get_tick() - start_time; + FURI_LOG_E(TAG, "Decoder %s took %lu ms", + Decoders[j]->name, (unsigned long)delta); + if (decoded) break; j++; }