pytest: add askrene layer creation bench.

This means it has to do a lookup and an insert.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2026-01-27 10:21:28 +10:30
parent fe5c3c958d
commit ff60983319

View File

@@ -262,3 +262,10 @@ def test_payment_speed(node_factory, benchmark):
l1.rpc.waitsendpay(phash)
benchmark(onepay, l1, routestep)
def test_askrene_layers(node_factory):
l1 = get_bench_node(node_factory)
NUM_LAYERS = 20_000
for i in range(NUM_LAYERS):
l1.rpc.askrene_create_layer(f'test_askrene_layers-{i}')