diff --git a/plugins/askrene/askrene.c b/plugins/askrene/askrene.c index 3429391084a2..a5ea464de1e8 100644 --- a/plugins/askrene/askrene.c +++ b/plugins/askrene/askrene.c @@ -9,6 +9,7 @@ #include "config.h" #include #include +#include #include #include #include @@ -373,6 +374,8 @@ static const char *get_routes(const tal_t *ctx, double delay_feefactor; u32 mu; const char *ret; + struct timerel time_delta; + struct timemono time_start = time_mono(); if (gossmap_refresh(askrene->gossmap)) { /* FIXME: gossmap_refresh callbacks to we can update in place */ @@ -586,7 +589,9 @@ static const char *get_routes(const tal_t *ctx, } gossmap_remove_localmods(askrene->gossmap, localmods); - + time_delta = timemono_between(time_mono(), time_start); + rq_log(tmpctx, rq, LOG_DBG, "get_routes completed in %" PRIu64 " ms", + time_to_msec(time_delta)); return NULL; /* Explicit failure path keeps the compiler (gcc version 12.3.0 -O3) from @@ -594,6 +599,9 @@ static const char *get_routes(const tal_t *ctx, fail: assert(ret != NULL); gossmap_remove_localmods(askrene->gossmap, localmods); + time_delta = timemono_between(time_mono(), time_start); + rq_log(tmpctx, rq, LOG_DBG, "get_routes failed after %" PRIu64 " ms", + time_to_msec(time_delta)); return ret; }