cln/tests
Rusty Russell 3cd589d2ce bench: why does sending payments take so long under CI?
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>
2025-05-08 14:01:38 +09:30
..
data pytest: generate broken db examples now, before we fix them. 2025-04-02 11:22:54 +10:30
fuzz fuzz: don't fail when fuzzer generates valid Act 1 or 2 packets 2025-04-15 19:53:47 +09:30
plugins channeld: remove never-used "reestablish_only" option. 2025-04-29 13:31:23 +09:30
vectors pytest: Remove onion test vectors containing legacy onions. 2022-03-18 09:20:11 +10:30
autogenerate-rpc-examples.py tests: Lock listclosedchannels sequence 2025-05-02 13:39:33 -07:00
benchmark.py pytest: always provide payment_secret when making payments. 2021-07-14 14:38:00 -05:00
conftest.py pytest: use --developer instead of environment variable. 2023-09-21 20:08:24 +09:30
fixtures.py pytest: don't add bookeeper-db option if bookkeeper is disabled. 2025-02-24 19:38:37 +10:30
rkls_github_canned_server.py pytest: add blackbox tests for reckless 2023-04-09 12:41:11 +09:30
test_askrene.py askrene: remove all small channels if there's no MPP support. 2025-02-14 22:17:21 +10:30
test_bookkeeper.py bitcoin: make input witness weight calculation explicit. 2025-05-06 12:27:53 +09:30
test_cln_lsps.py lsps: Add test for Lsps0 2025-05-02 13:34:21 -07:00
test_cln_rs.py cln-plugin: trace level logging support 2025-05-05 09:31:22 -07:00
test_clnrest.py pytest: add override options to prepare for default removal of rest-port/rest-host options. 2025-02-13 21:15:45 -06:00
test_closing.py pytest: fix flake in test_channel_lease_unilat_closes 2025-05-08 14:01:38 +09:30
test_connection.py bench: why does sending payments take so long under CI? 2025-05-08 14:01:38 +09:30
test_db.py pytest: adapt tests to avoid deprecated APIs in close (tx and txid). 2024-11-17 16:04:06 +10:30
test_gossip.py bitcoin: make input witness weight calculation explicit. 2025-05-06 12:27:53 +09:30
test_invoices.py lightningd: improve wait API by making details fields per-subsystem. 2025-04-29 09:38:20 +09:30
test_misc.py bitcoin: fix out-by-one-error in bitcoin_tx_input_weight. 2025-05-06 12:27:53 +09:30
test_mkfunding.py pytest: add tests for devtools/mkfunding 2023-01-09 14:50:30 -06:00
test_onion.py lightningd: remove support for legacy onion format. 2022-03-18 09:20:11 +10:30
test_opening.py pytest: fix flake in test_rbf_to_chain_before_commit 2025-05-08 14:01:38 +09:30
test_pay.py connectd: fix nagle disabling logic. 2025-05-08 14:01:38 +09:30
test_plugin.py lightningd: deprecate (undocumented!) "unknown" old_state field in channel_state_changed notification. 2025-05-08 10:49:31 +09:30
test_reckless.py test: Fixed test plugin source paths for reckless 2024-11-19 09:06:28 +10:30
test_renepay.py pytest: fix race in test_renepay where we didn't wait for all channels. 2025-04-16 08:02:14 +09:30
test_restart.py splice: tx_abort no longer reestablishes 2024-11-21 14:15:36 +10:30
test_runes.py pytest: stop using deprecated commando_rune commands. 2025-02-13 21:15:45 -06:00
test_splice.py bkpr: add bookkeeping assertions to splice in + out tests 2024-11-17 14:25:29 +10:30
test_splicing.py pytest: fix flake in splice gossip test. 2025-03-24 13:59:58 +10:30
test_splicing_disconnect.py pytest: fix test_splice_disconnect_commit 2025-01-27 11:07:04 +10:30
test_splicing_insane.py splice: Allow splice_update to return signatures 2024-11-12 06:42:52 +10:30
test_wallet.py pytest: make test_peer_anchor_push robust against short sig generation. 2025-05-08 14:01:38 +09:30
test_xpay.py pytest: fix flake in test_xpay_twohop_bug 2025-05-02 13:25:11 -07:00
utils.py pytest: make test_peer_anchor_push robust against short sig generation. 2025-05-08 14:01:38 +09:30
valgrind-suppressions.txt pytest: Use valgrind target suppressions instead of skipping tests 2022-03-10 10:21:41 +10:30