mirror of
https://github.com/ElementsProject/lightning.git
synced 2026-08-18 13:08:13 +02:00
To run, use:
VALGRIND=0 TEST_BENCH=1 eatmydata pytest tests/test_connection.py::test_bench
Example of running on my laptop (without --enable-debugbuild, over of 10 runs):
FAILED tests/test_connection.py::test_bench - assert 47.403406-49.191765(48.343+/-0.48) == 0
With eatmydata:
FAILED tests/test_connection.py::test_bench - assert 25.867860-27.549878(26.5762+/-0.5) == 0
You can also run perf on l1 once it's running:
perf record --call-graph dwarf -q -p $(cat /tmp/ltests-*/test_bench_1/lightning-1/lightningd-regtest.pid)
Then ^C after 10 seconds and run "perf report".
Things which stood out:
1. Tracing in db_exec_prepared_v2 (fixed in another PR)
31.12% 0.04% lightningd lightningd [.] db_exec_prepared_v2
- 31.08% db_exec_prepared_v2
+ 22.96% db_sqlite3_exec
+ 4.46% trace_span_end
+ 1.77% trace_span_start
+ 1.11% trace_span_tag
+ 0.72% tal_free
2. Logging:
- 16.03% logv
- 8.15% maybe_print
- log_to_files
+ 4.51% __GI__IO_fflush (inlined)
+ 1.97% tal_fmt_
+ 0.51% __GI___strftime_l (inlined)
3. Notification (when nothing is listening) in notify_log:
- 6.84% maybe_notify_log
- notify_log
+ 3.37% notify_send
+ 1.75% notify_start
+ 1.71% log_notification_serialize
0.56% new_log_entry
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
||
|---|---|---|
| .. | ||
| data | ||
| fuzz | ||
| plugins | ||
| vectors | ||
| autogenerate-rpc-examples.py | ||
| benchmark.py | ||
| conftest.py | ||
| fixtures.py | ||
| rkls_github_canned_server.py | ||
| test_askrene.py | ||
| test_bookkeeper.py | ||
| test_cln_lsps.py | ||
| test_cln_rs.py | ||
| test_clnrest.py | ||
| test_closing.py | ||
| test_connection.py | ||
| test_db.py | ||
| test_gossip.py | ||
| test_invoices.py | ||
| test_misc.py | ||
| test_mkfunding.py | ||
| test_onion.py | ||
| test_opening.py | ||
| test_pay.py | ||
| test_plugin.py | ||
| test_reckless.py | ||
| test_renepay.py | ||
| test_restart.py | ||
| test_runes.py | ||
| test_splice.py | ||
| test_splicing.py | ||
| test_splicing_disconnect.py | ||
| test_splicing_insane.py | ||
| test_wallet.py | ||
| test_xpay.py | ||
| utils.py | ||
| valgrind-suppressions.txt | ||