use chain::transaction::OutPoint;
use ln::channelmanager::{ChannelCounterparty, ChannelDetails};
use ln::features::{InitFeatures, InvoiceFeatures};
- use routing::scoring::{FixedPenaltyScorer, Scorer};
+ use routing::scoring::{FixedPenaltyScorer, ProbabilisticScorer, ProbabilisticScoringParameters, Scorer};
use util::logger::{Logger, Record};
use test::Bencher;
generate_routes(bench, &network_graph, scorer, InvoiceFeatures::known());
}
+ #[bench]
+ fn generate_routes_with_probabilistic_scorer(bench: &mut Bencher) {
+ let network_graph = read_network_graph();
+ let params = ProbabilisticScoringParameters::default();
+ let scorer = ProbabilisticScorer::new(params, &payer_pubkey(), &network_graph);
+ generate_routes(bench, &network_graph, scorer, InvoiceFeatures::empty());
+ }
+
+ #[bench]
+ fn generate_mpp_routes_with_probabilistic_scorer(bench: &mut Bencher) {
+ let network_graph = read_network_graph();
+ let params = ProbabilisticScoringParameters::default();
+ let scorer = ProbabilisticScorer::new(params, &payer_pubkey(), &network_graph);
+ generate_routes(bench, &network_graph, scorer, InvoiceFeatures::known());
+ }
+
fn generate_routes<S: Score>(
bench: &mut Bencher, graph: &NetworkGraph, mut scorer: S, features: InvoiceFeatures
) {