MCPcopy Create free account
hub / github.com/ElementsProject/lightning / get_bench_node

Function get_bench_node

tests/benchmark.py:20–31  ·  view source on GitHub ↗

Get a node which is optimized for benchmarking

(node_factory, extra_options={})

Source from the content-addressed store, hash-verified

18
19
20def get_bench_node(node_factory, extra_options={}):
21 """Get a node which is optimized for benchmarking"""
22 options = extra_options.copy()
23 # The normal log-level trace makes for a lot of IO.
24 options['log-level'] = 'info'
25 node = node_factory.get_node(start=False, options=options)
26 # Memleak detection here creates significant overhead!
27 del node.daemon.env["LIGHTNINGD_DEV_MEMLEAK"]
28 # Don't bother recording all our io.
29 del node.daemon.opts['dev-save-plugin-io']
30 node.start()
31 return node
32
33
34def get_bench_line_graph(node_factory, num_nodes, wait_for_announce=False):

Callers 7

get_bench_line_graphFunction · 0.85
test_single_hopFunction · 0.85
test_invoiceFunction · 0.85
test_spam_commandsFunction · 0.85
test_spam_listcommandsFunction · 0.85
test_payment_speedFunction · 0.85
test_askrene_layersFunction · 0.85

Calls 2

get_nodeMethod · 0.45
startMethod · 0.45

Tested by 6

test_single_hopFunction · 0.68
test_invoiceFunction · 0.68
test_spam_commandsFunction · 0.68
test_spam_listcommandsFunction · 0.68
test_payment_speedFunction · 0.68
test_askrene_layersFunction · 0.68