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

[config] Add more option for config test. #2029

Merged
merged 6 commits into from
Jan 20, 2021
Merged

Conversation

jolestar
Copy link
Member

  1. 将 disable_seed 的逻辑分装到 NetworkConfig 中,外部不再关心是否 disable_seed
  2. 重构了 config 的测试,给 example config 中增加了更多的命令行选项来测试兼容性。

@codecov
Copy link

codecov bot commented Jan 19, 2021

Codecov Report

Merging #2029 (3bbe27b) into master (89475ac) will increase coverage by 0.11%.
The diff coverage is 32.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2029      +/-   ##
==========================================
+ Coverage   33.86%   33.97%   +0.11%     
==========================================
  Files         465      467       +2     
  Lines       40565    40574       +9     
  Branches    18117    18125       +8     
==========================================
+ Hits        13735    13782      +47     
+ Misses      13110    12978     -132     
- Partials    13720    13814      +94     
Flag Coverage Δ
unittests 33.97% <32.61%> (+0.11%) ⬆️

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

Impacted Files Coverage Δ
config/src/lib.rs 30.05% <0.00%> (-1.02%) ⬇️
config/src/rpc_config.rs 48.89% <ø> (+2.62%) ⬆️
network/src/worker.rs 38.47% <0.00%> (+3.08%) ⬆️
config/src/network_config.rs 43.46% <16.00%> (-4.54%) ⬇️
config/src/tests.rs 26.32% <26.32%> (ø)
config/src/helper.rs 48.00% <48.00%> (ø)
config/src/account_vault_config.rs 59.10% <66.67%> (-0.90%) ⬇️
chain/src/tests/block_test_utils.rs 28.05% <0.00%> (-29.26%) ⬇️
test-helper/src/txpool.rs 26.09% <0.00%> (-4.34%) ⬇️
storage/src/lib.rs 49.51% <0.00%> (-1.47%) ⬇️
... and 26 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 89475ac...3bbe27b. Read the comment docs.

@jolestar jolestar mentioned this pull request Jan 19, 2021
8 tasks
@github-actions
Copy link

Benchmark for b27cbc8

Click to view benchmark
Test PR Benchmark Master Benchmark %
accumulator_append 1480.5±88.02µs 1549.4±198.67µs -4.45%
block_apply/block_apply_10 387.3±1.72ms 395.4±24.00ms -2.05%
block_apply/block_apply_1000 39.7±0.13s 40.5±0.10s -1.98%
get_with_proof/db_store 43.4±1.03µs 45.7±1.27µs -5.03%
get_with_proof/mem_store 35.3±1.79µs 35.2±0.57µs +0.28%
put_and_commit/db_store/1 642.8±35.53µs 651.8±55.22µs -1.38%
put_and_commit/db_store/10 1752.7±185.73µs 1816.5±172.92µs -3.51%
put_and_commit/db_store/100 10.1±0.64ms 10.0±0.61ms +1.00%
put_and_commit/db_store/5 1174.7±209.91µs 1228.1±152.40µs -4.35%
put_and_commit/db_store/50 5.9±1.49ms 5.7±0.37ms +3.51%
put_and_commit/mem_store/1 74.8±4.24µs 75.4±4.13µs -0.80%
put_and_commit/mem_store/10 682.6±30.04µs 662.9±37.87µs +2.97%
put_and_commit/mem_store/100 6.2±0.23ms 6.3±0.24ms -1.59%
put_and_commit/mem_store/5 348.6±17.02µs 343.9±19.57µs +1.37%
put_and_commit/mem_store/50 3.2±0.16ms 3.2±0.13ms 0.00%
query_block/query_block_in(10)_times(100) 3.2±0.06ms 3.2±0.10ms 0.00%
query_block/query_block_in(10)_times(1000) 32.1±0.48ms 32.1±0.54ms 0.00%
query_block/query_block_in(10)_times(10000) 321.0±6.68ms 319.0±6.41ms +0.63%
query_block/query_block_in(1000)_times(100) 1428.0±13.32µs 1410.1±16.24µs +1.27%
query_block/query_block_in(1000)_times(1000) 14.0±0.14ms 14.0±0.12ms 0.00%
query_block/query_block_in(1000)_times(10000) 141.5±1.85ms 142.0±1.56ms -0.35%
storage_transaction 19.9±0.56ms 20.1±0.61ms -1.00%
vm/transaction_execution/1 346.8±5.70ms 345.7±3.25ms +0.32%
vm/transaction_execution/10 109.2±1.95ms 108.5±1.46ms +0.65%
vm/transaction_execution/20 100.2±1.62ms 101.1±0.94ms -0.89%
vm/transaction_execution/5 132.6±1.63ms 132.1±2.30ms +0.38%
vm/transaction_execution/50 114.8±2.59ms 114.8±1.25ms 0.00%

@github-actions
Copy link

Benchmark for 72bf915

Click to view benchmark
Test PR Benchmark Master Benchmark %
accumulator_append 1294.5±203.31µs 1297.3±138.63µs -0.22%
block_apply/block_apply_10 344.5±3.33ms 349.5±8.33ms -1.43%
block_apply/block_apply_1000 36.8±0.34s 36.7±0.30s +0.27%
get_with_proof/db_store 45.6±0.81µs 45.0±0.97µs +1.33%
get_with_proof/mem_store 36.9±0.57µs 35.4±0.49µs +4.24%
put_and_commit/db_store/1 532.3±28.23µs 552.3±35.47µs -3.62%
put_and_commit/db_store/10 1541.4±158.95µs 1535.3±86.10µs +0.40%
put_and_commit/db_store/100 9.7±0.64ms 9.4±0.65ms +3.19%
put_and_commit/db_store/5 1038.1±134.93µs 1007.3±145.17µs +3.06%
put_and_commit/db_store/50 5.8±0.48ms 5.4±0.38ms +7.41%
put_and_commit/mem_store/1 78.2±3.88µs 78.0±3.90µs +0.26%
put_and_commit/mem_store/10 692.8±31.88µs 686.1±36.22µs +0.98%
put_and_commit/mem_store/100 6.4±0.23ms 6.4±0.30ms 0.00%
put_and_commit/mem_store/5 353.4±19.94µs 352.5±19.52µs +0.26%
put_and_commit/mem_store/50 3.3±0.12ms 3.3±0.24ms 0.00%
query_block/query_block_in(10)_times(100) 3.3±0.04ms 3.4±0.06ms -2.94%
query_block/query_block_in(10)_times(1000) 32.4±0.53ms 33.1±1.13ms -2.11%
query_block/query_block_in(10)_times(10000) 331.4±5.96ms 327.4±8.21ms +1.22%
query_block/query_block_in(1000)_times(100) 1487.8±10.69µs 1457.1±13.74µs +2.11%
query_block/query_block_in(1000)_times(1000) 14.9±0.14ms 14.7±0.42ms +1.36%
query_block/query_block_in(1000)_times(10000) 148.9±1.45ms 147.4±2.30ms +1.02%
storage_transaction 13.9±0.38ms 15.6±4.51ms -10.90%
vm/transaction_execution/1 360.1±4.22ms 359.9±9.56ms +0.06%
vm/transaction_execution/10 115.0±5.99ms 115.6±5.68ms -0.52%
vm/transaction_execution/20 103.8±1.98ms 104.3±6.62ms -0.48%
vm/transaction_execution/5 139.4±3.03ms 136.6±1.84ms +2.05%
vm/transaction_execution/50 123.2±10.68ms 119.9±2.55ms +2.75%

@github-actions
Copy link

Benchmark for ccdef9e

Click to view benchmark
Test PR Benchmark Master Benchmark %
accumulator_append 1454.2±133.08µs 1465.5±80.19µs -0.77%
block_apply/block_apply_10 379.6±1.54ms 391.4±27.74ms -3.01%
block_apply/block_apply_1000 39.9±0.17s 40.0±0.11s -0.25%
get_with_proof/db_store 44.8±1.80µs 44.6±0.88µs +0.45%
get_with_proof/mem_store 35.2±2.76µs 36.0±0.62µs -2.22%
put_and_commit/db_store/1 687.8±28.10µs 689.0±28.59µs -0.17%
put_and_commit/db_store/10 1845.1±630.70µs 1780.3±204.68µs +3.64%
put_and_commit/db_store/100 10.0±0.56ms 10.1±0.66ms -0.99%
put_and_commit/db_store/5 1203.2±185.86µs 1184.5±128.34µs +1.58%
put_and_commit/db_store/50 5.9±2.30ms 5.8±0.37ms +1.72%
put_and_commit/mem_store/1 75.8±4.57µs 75.1±4.30µs +0.93%
put_and_commit/mem_store/10 677.6±35.12µs 668.7±32.58µs +1.33%
put_and_commit/mem_store/100 6.3±0.23ms 6.3±0.23ms 0.00%
put_and_commit/mem_store/5 350.2±20.87µs 343.4±17.04µs +1.98%
put_and_commit/mem_store/50 3.2±0.13ms 3.2±0.12ms 0.00%
query_block/query_block_in(10)_times(100) 3.1±0.05ms 3.3±0.07ms -6.06%
query_block/query_block_in(10)_times(1000) 31.4±0.78ms 32.0±0.43ms -1.88%
query_block/query_block_in(10)_times(10000) 313.5±4.87ms 317.5±5.68ms -1.26%
query_block/query_block_in(1000)_times(100) 1429.2±25.86µs 1441.4±14.81µs -0.85%
query_block/query_block_in(1000)_times(1000) 14.1±0.11ms 14.6±0.17ms -3.42%
query_block/query_block_in(1000)_times(10000) 142.8±1.31ms 145.0±1.73ms -1.52%
storage_transaction 18.6±0.88ms 18.4±0.58ms +1.09%
vm/transaction_execution/1 345.6±4.19ms 349.2±3.24ms -1.03%
vm/transaction_execution/10 108.1±2.10ms 109.4±2.42ms -1.19%
vm/transaction_execution/20 101.2±0.71ms 101.4±0.63ms -0.20%
vm/transaction_execution/5 131.6±1.50ms 133.3±1.92ms -1.28%
vm/transaction_execution/50 115.0±1.24ms 117.6±2.43ms -2.21%

@jolestar jolestar merged commit ba32d6f into master Jan 20, 2021
@jolestar jolestar deleted the tests/add_more_config_test branch January 20, 2021 10:47
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