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

[vm] StarcoinVM refactor remove mut reference for some functions #3916

Merged
merged 7 commits into from
Jun 21, 2023

Conversation

welbon
Copy link
Contributor

@welbon welbon commented Jun 19, 2023

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Other information

@welbon welbon requested review from nanne007 and nkysg as code owners June 19, 2023 07:44
@codecov
Copy link

codecov bot commented Jun 20, 2023

Codecov Report

Merging #3916 (a3012b3) into master (d7736b9) will decrease coverage by 0.17%.
The diff coverage is 75.76%.

❗ Current head a3012b3 differs from pull request most recent head 48065ba. Consider uploading reports for the commit 48065ba to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3916      +/-   ##
==========================================
- Coverage   53.92%   53.74%   -0.17%     
==========================================
  Files         618      618              
  Lines       68039    68021      -18     
==========================================
- Hits        36681    36553     -128     
- Misses      31358    31468     +110     
Flag Coverage Δ
unittests 53.74% <75.76%> (-0.17%) ⬇️

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

Impacted Files Coverage Δ
vm/dev/src/playground.rs 3.58% <0.00%> (-0.02%) ⬇️
vm/vm-runtime/src/data_cache.rs 51.05% <ø> (+3.52%) ⬆️
vm/vm-runtime/src/starcoin_vm.rs 74.98% <75.44%> (+0.36%) ⬆️
executor/src/executor.rs 100.00% <100.00%> (ø)
vm/types/src/state_view.rs 56.42% <100.00%> (+2.36%) ⬆️

... and 12 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

@github-actions
Copy link

Benchmark for a4a6c9e

Click to view benchmark
Test Base PR %
accumulator_append 613.0±29.23µs 609.0±24.51µs -0.65%
block_apply/block_apply_10 355.9±0.84ms 358.0±0.86ms +0.59%
block_apply/block_apply_1000 36.8±0.12s 36.7±0.05s -0.27%
get_with_proof/db_store 37.7±0.21µs 37.4±0.26µs -0.80%
get_with_proof/mem_store 31.9±0.25µs 32.2±0.29µs +0.94%
put_and_commit/db_store/1 93.2±3.30µs 93.3±3.50µs +0.11%
put_and_commit/db_store/10 833.8±24.55µs 832.1±23.42µs -0.20%
put_and_commit/db_store/100 7.2±0.20ms 7.3±0.22ms +1.39%
put_and_commit/db_store/5 410.0±14.70µs 427.5±16.12µs +4.27%
put_and_commit/db_store/50 3.7±0.12ms 3.7±0.11ms 0.00%
put_and_commit/mem_store/1 63.2±5.86µs 62.4±5.72µs -1.27%
put_and_commit/mem_store/10 586.2±46.45µs 586.6±47.09µs +0.07%
put_and_commit/mem_store/100 5.8±0.83ms 5.8±0.95ms 0.00%
put_and_commit/mem_store/5 299.4±24.39µs 294.7±24.53µs -1.57%
put_and_commit/mem_store/50 2.9±0.18ms 2.9±0.18ms 0.00%
query_block/query_block_in(10)_times(100) 5.1±0.11ms 5.0±0.18ms -1.96%
query_block/query_block_in(10)_times(1000) 51.0±1.60ms 50.2±0.92ms -1.57%
query_block/query_block_in(10)_times(10000) 508.6±9.79ms 503.4±13.57ms -1.02%
query_block/query_block_in(1000)_times(100) 1037.6±11.71µs 1028.6±19.85µs -0.87%
query_block/query_block_in(1000)_times(1000) 10.4±0.16ms 10.2±0.16ms -1.92%
query_block/query_block_in(1000)_times(10000) 103.5±0.52ms 102.7±0.91ms -0.77%
storage_transaction 933.5±234.25µs 924.1±240.09µs -1.01%
vm/transaction_execution/1 410.5±12.56ms 411.5±1.77ms +0.24%
vm/transaction_execution/10 123.7±0.28ms 124.9±0.20ms +0.97%
vm/transaction_execution/20 113.9±1.38ms 114.6±0.65ms +0.61%
vm/transaction_execution/5 152.6±0.31ms 154.2±0.18ms +1.05%
vm/transaction_execution/50 128.8±0.52ms 129.5±0.25ms +0.54%

@nkysg nkysg requested review from sanlee42, simonjiao and jackzhhuang and removed request for nanne007 June 21, 2023 03:03
@nkysg nkysg changed the title Starcoin vm refactor Starcoin vm refactor remove mut reference for some functions Jun 21, 2023
@nkysg nkysg changed the title Starcoin vm refactor remove mut reference for some functions [vm] vm refactor remove mut reference for some functions Jun 21, 2023
@nkysg nkysg changed the title [vm] vm refactor remove mut reference for some functions [vm] StarcoinVM refactor remove mut reference for some functions Jun 21, 2023
@nkysg nkysg enabled auto-merge (squash) June 21, 2023 09:02
@nkysg nkysg merged commit 26e54a7 into master Jun 21, 2023
@nkysg nkysg deleted the starcoin_vm_refactor branch June 21, 2023 09:23
@nkysg nkysg linked an issue Jun 27, 2023 that may be closed by this pull request
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.

[Dev]refactor StarcoinVM module remove mut StateViewCache
2 participants