|
9 | 9 | #include "config.h"
|
10 | 10 | #include <ccan/array_size/array_size.h>
|
11 | 11 | #include <ccan/tal/str/str.h>
|
| 12 | +#include <ccan/time/time.h> |
12 | 13 | #include <common/dijkstra.h>
|
13 | 14 | #include <common/gossmap.h>
|
14 | 15 | #include <common/gossmods_listpeerchannels.h>
|
@@ -373,6 +374,8 @@ static const char *get_routes(const tal_t *ctx,
|
373 | 374 | double delay_feefactor;
|
374 | 375 | u32 mu;
|
375 | 376 | const char *ret;
|
| 377 | + struct timerel time_delta; |
| 378 | + struct timemono time_start = time_mono(); |
376 | 379 |
|
377 | 380 | if (gossmap_refresh(askrene->gossmap)) {
|
378 | 381 | /* FIXME: gossmap_refresh callbacks to we can update in place */
|
@@ -586,14 +589,19 @@ static const char *get_routes(const tal_t *ctx,
|
586 | 589 | }
|
587 | 590 |
|
588 | 591 | gossmap_remove_localmods(askrene->gossmap, localmods);
|
589 |
| - |
| 592 | + time_delta = timemono_between(time_mono(), time_start); |
| 593 | + rq_log(tmpctx, rq, LOG_DBG, "get_routes completed in %" PRIu64 " ms", |
| 594 | + time_to_msec(time_delta)); |
590 | 595 | return NULL;
|
591 | 596 |
|
592 | 597 | /* Explicit failure path keeps the compiler (gcc version 12.3.0 -O3) from
|
593 | 598 | * warning about uninitialized variables in the caller */
|
594 | 599 | fail:
|
595 | 600 | assert(ret != NULL);
|
596 | 601 | gossmap_remove_localmods(askrene->gossmap, localmods);
|
| 602 | + time_delta = timemono_between(time_mono(), time_start); |
| 603 | + rq_log(tmpctx, rq, LOG_DBG, "get_routes failed after %" PRIu64 " ms", |
| 604 | + time_to_msec(time_delta)); |
597 | 605 | return ret;
|
598 | 606 | }
|
599 | 607 |
|
|
0 commit comments