mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-18 13:07:58 +02:00
$ go test -bench=PairProbability ./routing
goos: linux
goarch: amd64
pkg: github.com/lightningnetwork/lnd/routing
cpu: AMD Ryzen 5 3600 6-Core Processor
BenchmarkBimodalPairProbability-4 2050206 599.8 ns/op
BenchmarkAprioriPairProbability-4 9524289 126.7 ns/op
* math.Exp:
goos: linux
goarch: amd64
pkg: github.com/lightningnetwork/lnd/routing
cpu: AMD Ryzen 5 3600 6-Core Processor
BenchmarkExp-4 143843622 8.700 ns/op
* bimodal benchmark profile:
Showing nodes accounting for 2000ms, 76.05% of 2630ms total
Dropped 156 nodes (cum <= 13.15ms)
Showing top 10 nodes out of 141
flat flat% sum% cum cum%
1110ms 42.21% 42.21% 1110ms 42.21% math.archExp
230ms 8.75% 50.95% 230ms 8.75% runtime.memclrNoHeapPointers
180ms 6.84% 57.79% 930ms 35.36% github.com/lightningnetwork/lnd/routing.(*BimodalEstimator).calculateProbability
110ms 4.18% 61.98% 130ms 4.94% runtime.scanobject
90ms 3.42% 65.40% 90ms 3.42% memeqbody
60ms 2.28% 67.68% 940ms 35.74% github.com/lightningnetwork/lnd/routing.(*BimodalEstimator).directProbability
60ms 2.28% 69.96% 230ms 8.75% github.com/lightningnetwork/lnd/routing.cannotSend
60ms 2.28% 72.24% 60ms 2.28% runtime.madvise
50ms 1.90% 74.14% 480ms 18.25% github.com/lightningnetwork/lnd/routing.(*BimodalEstimator).primitive
50ms 1.90% 76.05% 60ms 2.28% runtime.mapiternext
* apriori benchmark profile:
Showing nodes accounting for 1570ms, 77.34% of 2030ms total
Dropped 138 nodes (cum <= 10.15ms)
Showing top 10 nodes out of 151
flat flat% sum% cum cum%
340ms 16.75% 16.75% 340ms 16.75% math.archExp
290ms 14.29% 31.03% 980ms 48.28% github.com/lightningnetwork/lnd/routing.(*AprioriEstimator).getNodeProbability
190ms 9.36% 40.39% 260ms 12.81% runtime.mapiternext
190ms 9.36% 49.75% 190ms 9.36% runtime.memclrNoHeapPointers
160ms 7.88% 57.64% 340ms 16.75% github.com/lightningnetwork/lnd/routing.(*AprioriEstimator).calculateProbability
110ms 5.42% 63.05% 110ms 5.42% aeshashbody
110ms 5.42% 68.47% 130ms 6.40% runtime.scanobject
80ms 3.94% 72.41% 420ms 20.69% github.com/lightningnetwork/lnd/routing.capacityFactor
60ms 2.96% 75.37% 60ms 2.96% runtime.madvise
40ms 1.97% 77.34% 40ms 1.97% runtime.isEmpty (inline)
|
||
|---|---|---|
| .. | ||
| chainview | ||
| localchans | ||
| route | ||
| shards | ||
| testdata | ||
| ann_validation.go | ||
| bandwidth.go | ||
| bandwidth_test.go | ||
| control_tower.go | ||
| control_tower_test.go | ||
| errors.go | ||
| graph.go | ||
| heap.go | ||
| heap_test.go | ||
| integrated_routing_context_test.go | ||
| integrated_routing_test.go | ||
| log.go | ||
| missioncontrol.go | ||
| missioncontrol_state.go | ||
| missioncontrol_state_test.go | ||
| missioncontrol_store.go | ||
| missioncontrol_store_test.go | ||
| missioncontrol_test.go | ||
| mock_graph_test.go | ||
| mock_test.go | ||
| nodepair.go | ||
| notifications.go | ||
| notifications_test.go | ||
| pathfind.go | ||
| pathfind_test.go | ||
| payment_lifecycle.go | ||
| payment_lifecycle_test.go | ||
| payment_session.go | ||
| payment_session_source.go | ||
| payment_session_test.go | ||
| probability_apriori.go | ||
| probability_apriori_test.go | ||
| probability_bimodal.go | ||
| probability_bimodal_test.go | ||
| probability_estimator.go | ||
| probability_estimator_test.go | ||
| README.md | ||
| result_interpretation.go | ||
| result_interpretation_test.go | ||
| router.go | ||
| router_test.go | ||
| setup_test.go | ||
| stats.go | ||
| unified_edges.go | ||
| unified_edges_test.go | ||
| validation_barrier.go | ||
| validation_barrier_test.go | ||
routing
The routing package implements authentication+validation of channel announcements, pruning of the channel graph, path finding within the network, sending outgoing payments into the network and synchronizing new peers to our channel graph state.
Installation and Updating
$ go get -u github.com/lightningnetwork/lnd/routing