gascalibration

package
v0.6.1-alpha.15 Latest Latest
Warning

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

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

README

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 ./cmd. 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 ./cmd. 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 genrate 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 ./cmd/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