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

[cli] Unify and refactor dev subcommands #2606

Merged
merged 3 commits into from
Jun 17, 2021
Merged

[cli] Unify and refactor dev subcommands #2606

merged 3 commits into from
Jun 17, 2021

Conversation

jolestar
Copy link
Member

@jolestar jolestar commented Jun 17, 2021

  1. 重构了 dev 下和 module upgrade 相关的命令,用 - 代替 _ , -m 用来表示 module,-i 用来表是 proposal id
  2. 清理了 chain 下的一些统计相关,需要遍历数据的命令,以后 cli 不再支持统计命令,降低维护成本,统计相关的任务通过外部索引数据库实现。

@jolestar jolestar requested a review from ssyuan June 17, 2021 04:42
@codecov
Copy link

codecov bot commented Jun 17, 2021

Codecov Report

Merging #2606 (4b4fd75) into master (4357828) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2606      +/-   ##
==========================================
+ Coverage   32.49%   32.49%   +0.01%     
==========================================
  Files         501      501              
  Lines       43229    43229              
  Branches    19320    19320              
==========================================
+ Hits        14042    14045       +3     
- Misses      15398    15417      +19     
+ Partials    13789    13767      -22     
Flag Coverage Δ
unittests 32.49% <ø> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
cmd/starcoin/src/lib.rs 100.00% <ø> (ø)
rpc/server/src/module/mod.rs 0.00% <0.00%> (-16.84%) ⬇️
vm/types/src/transaction/error.rs 3.93% <0.00%> (-15.68%) ⬇️
consensus/src/consensus.rs 43.75% <0.00%> (-15.62%) ⬇️
cmd/starcoin/src/cli_state.rs 47.37% <0.00%> (-5.26%) ⬇️
cmd/starcoin/src/dev/tests.rs 12.74% <0.00%> (-4.49%) ⬇️
network-p2p/src/peer_info.rs 44.45% <0.00%> (-2.77%) ⬇️
miner/src/generate_block_event_pacemaker.rs 41.87% <0.00%> (-2.32%) ⬇️
sync/src/block_connector/test_illegal_block.rs 14.68% <0.00%> (-1.91%) ⬇️
types/src/sync_status.rs 60.32% <0.00%> (-1.58%) ⬇️
... and 25 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 4357828...4b4fd75. Read the comment docs.

@github-actions
Copy link

Benchmark for e9e01a9

Click to view benchmark
Test PR Benchmark Master Benchmark %
accumulator_append 2.4±0.21ms 2.4±0.15ms 0.00%
block_apply/block_apply_10 451.6±16.46ms 471.9±16.72ms -4.30%
block_apply/block_apply_1000 47.0±0.78s 47.2±1.03s -0.42%
get_with_proof/db_store 38.4±0.52µs 38.7±0.44µs -0.78%
get_with_proof/mem_store 31.5±0.26µs 32.0±0.36µs -1.56%
put_and_commit/db_store/1 1403.6±111.82µs 1397.9±66.98µs +0.41%
put_and_commit/db_store/10 2.5±0.42ms 2.5±0.34ms 0.00%
put_and_commit/db_store/100 9.6±1.13ms 9.5±1.09ms +1.05%
put_and_commit/db_store/5 2.0±0.22ms 2.0±0.18ms 0.00%
put_and_commit/db_store/50 5.8±0.75ms 5.8±0.74ms 0.00%
put_and_commit/mem_store/1 62.9±5.59µs 63.1±5.59µs -0.32%
put_and_commit/mem_store/10 584.9±45.66µs 589.3±46.09µs -0.75%
put_and_commit/mem_store/100 5.7±0.81ms 5.8±0.81ms -1.72%
put_and_commit/mem_store/5 296.2±23.83µs 297.0±24.41µs -0.27%
put_and_commit/mem_store/50 2.9±0.18ms 2.9±0.20ms 0.00%
query_block/query_block_in(10)_times(100) 2.9±0.09ms 2.9±0.08ms 0.00%
query_block/query_block_in(10)_times(1000) 29.6±0.77ms 29.5±0.63ms +0.34%
query_block/query_block_in(10)_times(10000) 291.1±2.91ms 292.7±3.90ms -0.55%
query_block/query_block_in(1000)_times(100) 942.4±6.26µs 914.3±4.21µs +3.07%
query_block/query_block_in(1000)_times(1000) 9.5±0.04ms 9.2±0.05ms +3.26%
query_block/query_block_in(1000)_times(10000) 93.3±0.28ms 91.3±0.66ms +2.19%
storage_transaction 57.0±6.99ms 56.6±5.08ms +0.71%
vm/transaction_execution/1 334.4±0.81ms 334.6±2.00ms -0.06%
vm/transaction_execution/10 111.3±0.22ms 111.5±0.53ms -0.18%
vm/transaction_execution/20 105.3±1.15ms 105.0±0.45ms +0.29%
vm/transaction_execution/5 133.7±0.35ms 133.7±0.45ms 0.00%
vm/transaction_execution/50 120.8±0.84ms 120.9±0.66ms -0.08%

@jolestar jolestar merged commit 5904efa into master Jun 17, 2021
@jolestar jolestar deleted the dev_cmd branch June 17, 2021 07:50
naughtyvenom pushed a commit to naughtyvenom/starcoin that referenced this pull request Jul 19, 2021
* [scmd] Support set about info for command.

* [cli] Unify and refactor dev subcommands.

* [cli] Clean chain's stat,uncle,verify subcommand, to simplify the cli.
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