Make router benchmarks more realistic by not running test-only code 2022-02-router-no-test
authorMatt Corallo <git@bluematt.me>
Thu, 10 Feb 2022 21:13:19 +0000 (21:13 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 10 Feb 2022 22:28:38 +0000 (22:28 +0000)
commitc8e3078ff7a3cff579b84500630e61854355344a
treeabd3a18b3ba42b80bcec444ad829013903b127eb
parent78c6154d9a50ff9338eac48ba8d469c6268f5510
Make router benchmarks more realistic by not running test-only code

`cargo bench` sets `cfg(test)`, causing us to hit some test-only
code in the router when benchmarking, throwing off our benchmarks
substantially. Here we swap from the `unstable` feature to a more
clearly internal feature (`_bench_unstable`) and also checking for
it when enabling test-only code.
.github/workflows/build.yml
lightning-persister/Cargo.toml
lightning-persister/src/lib.rs
lightning/Cargo.toml
lightning/src/lib.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/routing/network_graph.rs
lightning/src/routing/router.rs