Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[network-p2p]add max_connections_per_address. #2454

Merged
merged 3 commits into from
Apr 28, 2021

Conversation

tiangong3624749
Copy link
Contributor

max_connections_per_address.

@codecov
Copy link

codecov bot commented Apr 27, 2021

Codecov Report

Merging #2454 (96227a4) into master (bbec1ce) will decrease coverage by 0.02%.
The diff coverage is 38.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2454      +/-   ##
==========================================
- Coverage   33.64%   33.63%   -0.01%     
==========================================
  Files         492      492              
  Lines       42799    42829      +30     
  Branches    19391    19408      +17     
==========================================
+ Hits        14395    14400       +5     
- Misses      13527    13556      +29     
+ Partials    14877    14873       -4     
Flag Coverage Δ
unittests 33.63% <38.71%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
network-p2p/src/service.rs 29.02% <0.00%> (-0.04%) ⬇️
network-p2p/src/discovery.rs 33.83% <40.00%> (+0.24%) ⬆️
network-rpc/core/src/lib.rs 23.53% <0.00%> (-5.88%) ⬇️
sync/src/tasks/mock.rs 47.65% <0.00%> (-1.76%) ⬇️
types/src/peer_info.rs 51.56% <0.00%> (-1.24%) ⬇️
network/api/src/peer_provider.rs 29.53% <0.00%> (-1.18%) ⬇️
...ons/forkable-jellyfish-merkle/src/node_type/mod.rs 65.30% <0.00%> (-1.03%) ⬇️
commons/stream-task/src/collector.rs 58.17% <0.00%> (-1.02%) ⬇️
sync/src/tasks/mod.rs 25.69% <0.00%> (-0.34%) ⬇️
network-p2p/src/protocol.rs 41.26% <0.00%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bbec1ce...96227a4. Read the comment docs.

@github-actions
Copy link

Benchmark for 596adc0

Click to view benchmark
Test PR Benchmark Master Benchmark %
accumulator_append 2.2±0.20ms 2.2±0.26ms 0.00%
block_apply/block_apply_10 400.9±7.04ms 396.3±11.56ms +1.16%
block_apply/block_apply_1000 40.4±0.31s 40.0±0.25s +1.00%
get_with_proof/db_store 38.1±0.42µs 38.3±0.43µs -0.52%
get_with_proof/mem_store 31.6±0.41µs 31.6±0.29µs 0.00%
put_and_commit/db_store/1 1216.2±64.54µs 1242.6±85.01µs -2.12%
put_and_commit/db_store/10 2.3±0.39ms 2.3±0.46ms 0.00%
put_and_commit/db_store/100 9.3±0.69ms 9.3±0.73ms 0.00%
put_and_commit/db_store/5 1836.6±200.54µs 1909.2±148.38µs -3.80%
put_and_commit/db_store/50 5.5±0.71ms 5.5±0.73ms 0.00%
put_and_commit/mem_store/1 62.9±5.55µs 63.3±5.57µs -0.63%
put_and_commit/mem_store/10 582.8±46.24µs 593.4±46.21µs -1.79%
put_and_commit/mem_store/100 5.7±0.82ms 5.8±0.82ms -1.72%
put_and_commit/mem_store/5 296.4±24.80µs 300.3±24.24µs -1.30%
put_and_commit/mem_store/50 2.9±0.18ms 2.9±0.18ms 0.00%
query_block/query_block_in(10)_times(100) 2.7±0.10ms 2.7±0.07ms 0.00%
query_block/query_block_in(10)_times(1000) 26.6±0.48ms 26.8±0.65ms -0.75%
query_block/query_block_in(10)_times(10000) 269.8±5.43ms 269.0±3.85ms +0.30%
query_block/query_block_in(1000)_times(100) 919.8±4.53µs 920.0±4.95µs -0.02%
query_block/query_block_in(1000)_times(1000) 9.2±0.04ms 9.1±0.05ms +1.10%
query_block/query_block_in(1000)_times(10000) 91.9±0.49ms 91.9±0.53ms 0.00%
storage_transaction 44.6±4.53ms 44.7±3.19ms -0.22%
vm/transaction_execution/1 308.7±2.33ms 315.3±4.53ms -2.09%
vm/transaction_execution/10 103.6±0.68ms 103.8±0.60ms -0.19%
vm/transaction_execution/20 97.8±0.37ms 98.0±0.43ms -0.20%
vm/transaction_execution/5 124.0±1.37ms 124.0±0.43ms 0.00%
vm/transaction_execution/50 113.2±0.37ms 113.5±0.18ms -0.26%

Copy link
Member

@jolestar jolestar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看怎么用测试用例测试一下

network-p2p/src/discovery.rs Outdated Show resolved Hide resolved
@tiangong3624749 tiangong3624749 force-pushed the max_connections_per_address branch from 80e5eea to f1fdc62 Compare April 28, 2021 03:17
@github-actions
Copy link

Benchmark for a1d1427

Click to view benchmark
Test PR Benchmark Master Benchmark %
accumulator_append 2.5±0.10ms 2.5±0.11ms 0.00%
block_apply/block_apply_10 453.5±8.00ms 452.7±12.10ms +0.18%
block_apply/block_apply_1000 45.5±0.27s 45.7±0.30s -0.44%
get_with_proof/db_store 38.1±0.30µs 38.3±0.35µs -0.52%
get_with_proof/mem_store 31.7±0.28µs 31.6±0.23µs +0.32%
put_and_commit/db_store/1 1525.1±165.03µs 1539.7±114.16µs -0.95%
put_and_commit/db_store/10 2.6±0.54ms 2.7±0.44ms -3.70%
put_and_commit/db_store/100 9.9±1.44ms 9.8±1.27ms +1.02%
put_and_commit/db_store/5 2.0±0.24ms 2.1±0.19ms -4.76%
put_and_commit/db_store/50 6.0±0.95ms 6.0±1.01ms 0.00%
put_and_commit/mem_store/1 63.3±5.49µs 63.4±5.59µs -0.16%
put_and_commit/mem_store/10 590.8±46.78µs 588.3±47.92µs +0.42%
put_and_commit/mem_store/100 5.7±0.80ms 5.8±0.82ms -1.72%
put_and_commit/mem_store/5 297.3±24.62µs 297.2±24.19µs +0.03%
put_and_commit/mem_store/50 2.9±0.18ms 2.9±0.18ms 0.00%
query_block/query_block_in(10)_times(100) 2.7±0.07ms 2.7±0.05ms 0.00%
query_block/query_block_in(10)_times(1000) 26.6±0.51ms 27.1±0.77ms -1.85%
query_block/query_block_in(10)_times(10000) 267.0±3.97ms 269.2±5.00ms -0.82%
query_block/query_block_in(1000)_times(100) 917.0±2.93µs 913.2±6.78µs +0.42%
query_block/query_block_in(1000)_times(1000) 9.1±0.04ms 9.2±0.09ms -1.09%
query_block/query_block_in(1000)_times(10000) 91.4±0.35ms 91.2±0.40ms +0.22%
storage_transaction 59.7±5.08ms 59.6±4.14ms +0.17%
vm/transaction_execution/1 307.8±0.64ms 312.4±1.42ms -1.47%
vm/transaction_execution/10 103.2±0.36ms 104.8±0.64ms -1.53%
vm/transaction_execution/20 97.6±0.38ms 99.0±0.62ms -1.41%
vm/transaction_execution/5 123.6±0.50ms 125.5±0.22ms -1.51%
vm/transaction_execution/50 113.2±0.40ms 115.1±1.25ms -1.65%

@github-actions
Copy link

Benchmark for 06af017

Click to view benchmark
Test PR Benchmark Master Benchmark %
accumulator_append 2.4±0.22ms 2.4±0.17ms 0.00%
block_apply/block_apply_10 430.8±6.05ms 431.5±5.95ms -0.16%
block_apply/block_apply_1000 44.8±0.70s 43.9±0.35s +2.05%
get_with_proof/db_store 38.8±0.45µs 38.2±0.38µs +1.57%
get_with_proof/mem_store 32.1±0.52µs 32.1±2.44µs 0.00%
put_and_commit/db_store/1 1532.6±319.13µs 1379.1±86.13µs +11.13%
put_and_commit/db_store/10 2.6±0.62ms 2.5±0.60ms +4.00%
put_and_commit/db_store/100 9.8±1.46ms 9.8±1.56ms 0.00%
put_and_commit/db_store/5 2.1±0.34ms 2.0±0.24ms +5.00%
put_and_commit/db_store/50 6.2±1.69ms 5.9±1.26ms +5.08%
put_and_commit/mem_store/1 63.7±5.61µs 64.0±5.60µs -0.47%
put_and_commit/mem_store/10 588.2±47.18µs 595.9±47.12µs -1.29%
put_and_commit/mem_store/100 5.8±0.81ms 5.8±0.81ms 0.00%
put_and_commit/mem_store/5 298.1±24.05µs 301.0±24.88µs -0.96%
put_and_commit/mem_store/50 2.9±0.18ms 2.9±0.19ms 0.00%
query_block/query_block_in(10)_times(100) 2.7±0.07ms 2.7±0.04ms 0.00%
query_block/query_block_in(10)_times(1000) 26.8±0.40ms 26.7±0.38ms +0.37%
query_block/query_block_in(10)_times(10000) 267.9±4.60ms 267.5±4.66ms +0.15%
query_block/query_block_in(1000)_times(100) 911.8±2.99µs 915.4±5.99µs -0.39%
query_block/query_block_in(1000)_times(1000) 9.1±0.04ms 9.1±0.03ms 0.00%
query_block/query_block_in(1000)_times(10000) 90.8±0.24ms 92.0±0.38ms -1.30%
storage_transaction 54.3±5.98ms 55.4±5.02ms -1.99%
vm/transaction_execution/1 307.4±1.47ms 307.7±1.91ms -0.10%
vm/transaction_execution/10 103.1±0.33ms 103.5±1.25ms -0.39%
vm/transaction_execution/20 98.0±1.47ms 98.3±1.81ms -0.31%
vm/transaction_execution/5 123.4±0.37ms 123.8±1.12ms -0.32%
vm/transaction_execution/50 113.1±0.84ms 113.5±0.93ms -0.35%

@jolestar jolestar merged commit 52f9d1f into master Apr 28, 2021
@jolestar jolestar deleted the max_connections_per_address branch April 28, 2021 06:57
naughtyvenom pushed a commit to naughtyvenom/starcoin that referenced this pull request Jul 19, 2021
* [network-p2p]add max_connections_per_address.

* [network]saturating_sub.

* [network]clippy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants