Commit 3cd589d
committed
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 <[email protected]>1 parent e27dee0 commit 3cd589d
1 file changed
+35
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4846 | 4846 | | |
4847 | 4847 | | |
4848 | 4848 | | |
| 4849 | + | |
| 4850 | + | |
| 4851 | + | |
| 4852 | + | |
| 4853 | + | |
| 4854 | + | |
| 4855 | + | |
| 4856 | + | |
| 4857 | + | |
| 4858 | + | |
| 4859 | + | |
| 4860 | + | |
| 4861 | + | |
| 4862 | + | |
| 4863 | + | |
| 4864 | + | |
| 4865 | + | |
| 4866 | + | |
| 4867 | + | |
| 4868 | + | |
| 4869 | + | |
| 4870 | + | |
| 4871 | + | |
| 4872 | + | |
| 4873 | + | |
| 4874 | + | |
| 4875 | + | |
| 4876 | + | |
| 4877 | + | |
| 4878 | + | |
| 4879 | + | |
| 4880 | + | |
| 4881 | + | |
| 4882 | + | |
| 4883 | + | |
4849 | 4884 | | |
4850 | 4885 | | |
4851 | 4886 | | |
| |||
0 commit comments