bitcoin-dev-project / sim-ln

Payment activity generator for the lightning network
MIT License
63 stars 28 forks source link

sim-lib: Log payment summary every minute for more consistent results #141

Closed carlaKC closed 1 year ago

carlaKC commented 1 year ago

Fixes #128.

Example of new, regular output:

2023-10-17T16:09:44.984Z INFO [sim_lib] Summary of results will be reported every 60s.
...
2023-10-17T16:10:44.986Z INFO [sim_lib] Processed 4 payments sending 19832 msat total with 100.00% success rate.
2023-10-17T16:11:44.991Z INFO [sim_lib] Processed 12 payments sending 275055 msat total with 83.33% success rate.
2023-10-17T16:12:44.994Z INFO [sim_lib] Processed 14 payments sending 278414 msat total with 78.57% success rate.
2023-10-17T16:13:44.996Z INFO [sim_lib] Processed 18 payments sending 3151487 msat total with 77.78% success rate.
carlaKC commented 1 year ago

However, it is worth noting that if we add simulated time down the line, we may want to report based on time for real time payment count for simulated time

Yeah agree, would def need to make a change if we implement #81. We'll need to do a bunch of refactoring for that, so we can just trait out the logger as well.

okjodom commented 1 year ago

tACK e929a2d6c28687df4b491594dc84c0ae9a1dc208 ✅

carlaKC commented 1 year ago

Dropped the config refactor off this - I'll do it in a follow up, want to close this one out in the meantime (sent simln to some people to play around with, nice to have it logging regularly for demo purposes).