gascalibration

package
v1.0.1-rc.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

README

gascalibration

Gas usage tests

This folder holds gas usage tests for wasm. The solidity contracts can be found in wasp/packages/evm/evmtest and corresponding tests in packages/vm/core/evm/evmtest.

You can see current report at tools/gascalibration. You should see images for the different smart contracts executiontime.png, storage.png, and memory.png

Generate report

A generated report is already attached. See images in tools/gascalibration. But if you make changes to the tests/contracts and want to generate a new report, follow these steps

  1. Compile all modified contracts. See wiki
  2. Run tests. Running these tests will generate .json files. You need to run the wasm tests 3 times with -gowasm, -tswasm and -rswasm flags to generate json output files for Golang, TypeScript and Rust.
  3. These json files should be created inside each contracts pkg folder. This folder is created when you compile the rust contract as instructed on the wiki
  4. Run tools/gascalibration/main.go to generate new images

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveTestResultAsJSON

func SaveTestResultAsJSON(filepath string, results map[uint32]uint64)

Types

This section is empty.

Directories

Path Synopsis
executiontime
memory
storage

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL