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

Add fuel-benches #616

Merged
merged 6 commits into from
Sep 19, 2022
Merged

Add fuel-benches #616

merged 6 commits into from
Sep 19, 2022

Conversation

vlopes11
Copy link
Contributor

@vlopes11 vlopes11 commented Sep 12, 2022

This commit introduces the benchmarks for fuel-vm. It covers the first phase of #526 and targets individual instructions with the rocksdb/database backend.

This targets gas instrumentalization, so we skip benchmarking for predicate cases.

This uses a dedicated component of fuel-core so it will be easier to isolate and extend this component into block checking, and maybe to add some script to parse the output from criterion.

The benchmark is created from an isolated state of the VM that is ready to execute a given instruction. It is sub-optimal in the case of contract state & call since the call overhead will always be added to any instruction to be checked inside of a contract (i.e. SWW).

As next step, we need to make an API in fuel-vm to allow users to perform the operations of a call without executing the contract code. In other words, just load the contract code, add the call frame to the stack and prepare the registers.

After this phase is complete, we need to benchmark beyond instructions to a block level so the post-execution steps (database commit, etc) is also accounted.

@vlopes11 vlopes11 added the enhancement New feature or request label Sep 12, 2022
@vlopes11 vlopes11 self-assigned this Sep 12, 2022
This commit introduces the benchmarks for fuel-vm. It covers the first
phase of #256 and targets individual instructions with the
rocksdb/database backend.

This targets gas instrumentalization, so we skip benchmarking for
predicate cases.

This uses a dedicated component of fuel-core so it will be easier to
isolate and extend this component into block checking, and maybe to add
some script to parse the output from criterion.

The benchmark is created from an isolated state of the VM that is ready
to execute a given instruction. It is sub-optimal in the case of
contract state & call since the call overhead will always be added to
any instruction to be checked inside of a contract (i.e. SWW).

As next step, we need to make an API in fuel-vm to allow users to
perform the operations of a call without executing the contract code. In
other words, just load the contract code, add the call frame to the
stack and prepare the registers.

After this phase is complete, we need to benchmark beyond instructions
to a block level so the post-execution steps (database commit, etc) is
also accounted.
@Voxelot Voxelot mentioned this pull request Sep 13, 2022
5 tasks
@vlopes11 vlopes11 requested a review from a team September 14, 2022 00:35
@vlopes11
Copy link
Contributor Author

Blocked by #583

Copy link
Contributor

@ControlCplusControlV ControlCplusControlV left a comment

Choose a reason for hiding this comment

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

LGTM

@vlopes11 vlopes11 merged commit 1a47d5d into master Sep 19, 2022
@vlopes11 vlopes11 deleted the vlopes11/bench branch September 19, 2022 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants