xpay: add traces for payments - #9137
Conversation
167792d to
2d28e46
Compare
|
@cdecker, are these trace annotations useful? Do you think I should add more tags? |
cdecker
left a comment
There was a problem hiding this comment.
Very nice change. I'm not sure the back-to-back suspends in line 1485 is correct, but it doesn't matter as all it does is to unset the thread's context.
Yes, please check. |
644dc07 to
c07fba9
Compare
|
rebased |
bee28e3 to
44066a2
Compare
|
This test: |
Produce traces (see common/trace.h) for every payment in order to gather statistics about the duration of a full payment execution. Changelog-None Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Changelog-None Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Changelog-None Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
|
I think I fixed this finally. For example I wanted to measure the time a payment spends waiting for injectpaymentonion. in the RPC callback, both error and happy path we do: |
Produce traces (see common/trace.h) for every payment in order to gather statistics about the duration of a full payment execution.
xpay doesn't spend much time on computation itself. The runtime bottlenecks are always rpc calls to either
askreneor lightningd's pay primitives.The trace hierarchy here takes the following form:
xpay/fetchinvoice: stand alone trace for the operation of fetching the invoice if xpay receives a BIP353 address or an offer.xpay/payment: a whole payment->
xpay/getroutes: waiting foraskrene-getroutes,->
xpay/injectpaymentonion: waiting for the payment onion to return.