ioHeavyTC

package
v1.9.0-tc.3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MIT, Apache-2.0 Imports: 19 Imported by: 0

README

ioHeavyTC

Test Case Description

ioHeavyTC is based on the IOHeavy benchmark in BlockBench.

For your reference, the original description of IOHeavy benchmark in the SIGMOD paper is like the below:

Current blockchain systems rely on key-value storage to persist blockchain transactions and states. Each storage system may perform differently under different workloads. This workload is designed to evaluate the IO performance by invoking a contract that performs a large number of random writes and random reads to the contract’s states. The I/O bandwidth can be estimated via the observed transaction latency.

Similarly to BlockBench's IOHeavy benchmark, ioHeavyTC evaluates the performance of writing and reading Klaytn's states, especially state variables declared in a smart contract. The IOHeavy smart contract in IOHeavy.sol is used for testing, and its functions are tested through the following interface implemented in ioHeavyTC.go.

Function Description
Write Call the write function, which performs multiple write operations against storage variables (actually a map), in the IOHeavy contract with a randomly chosen but a range-limited integer key, the number of keys, and a signature (or identifier) recorded in the event log
Scan Call the scan function, which reads multiple storage variables (actually a map), in the IOHeavy contract with a range-limited integer key, the number of keys, and a signature (or identifier) recorded in the event log
Run Randomly invoke one test function between Write and Scan

Source Files

This directory has the following source files.

References

Documentation

Overview

Package ioHeavyTC implements BlockBench's IOHeavy benchmark for Klaytn and Locust. See README.md for more details.

Index

Constants

View Source
const IOHeavyABI = "" /* 1666-byte string literal not displayed */

IOHeavyABI is the input ABI used to generate the binding from.

View Source
const IOHeavyBin = `` /* 3348-byte string literal not displayed */

IOHeavyBin is the compiled bytecode used for deploying new contracts.

View Source
const IOHeavyBinRuntime = `` /* 3284-byte string literal not displayed */

IOHeavyBinRuntime is the compiled bytecode used for adding genesis block without deploying code.

View Source
const Name = "ioHeavyTC"

Variables

This section is empty.

Functions

func Init

func Init(accs []*account.Account, endpoint string, gp *big.Int)

Init initializes cliPool and accGrp; and also deploys the smart contract.

func Run

func Run()

Run randomly calls Write() or Scan().

func Scan

func Scan()

Scan tests the scan function in the IOHeavy contract.

func Write

func Write()

Write tests the write function in the IOHeavy contract.

Types

type IOHeavy

type IOHeavy struct {
	IOHeavyCaller     // Read-only binding to the contract
	IOHeavyTransactor // Write-only binding to the contract
	IOHeavyFilterer   // Log filterer for contract events
}

IOHeavy is an auto generated Go binding around a Klaytn contract.

func DeployIOHeavy

func DeployIOHeavy(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *IOHeavy, error)

DeployIOHeavy deploys a new Klaytn contract, binding an instance of IOHeavy to it.

func NewIOHeavy

func NewIOHeavy(address common.Address, backend bind.ContractBackend) (*IOHeavy, error)

NewIOHeavy creates a new instance of IOHeavy, bound to a specific deployed contract.

type IOHeavyCaller

type IOHeavyCaller struct {
	// contains filtered or unexported fields
}

IOHeavyCaller is an auto generated read-only Go binding around a Klaytn contract.

func NewIOHeavyCaller

func NewIOHeavyCaller(address common.Address, caller bind.ContractCaller) (*IOHeavyCaller, error)

NewIOHeavyCaller creates a new read-only instance of IOHeavy, bound to a specific deployed contract.

func (*IOHeavyCaller) Get

func (_IOHeavy *IOHeavyCaller) Get(opts *bind.CallOpts, key [20]byte) ([]byte, error)

Get is a free data retrieval call binding the contract method 0x5acecc78.

Solidity: function get(key bytes20) constant returns(bytes)

type IOHeavyCallerRaw

type IOHeavyCallerRaw struct {
	Contract *IOHeavyCaller // Generic read-only contract binding to access the raw methods on
}

IOHeavyCallerRaw is an auto generated low-level read-only Go binding around a Klaytn contract.

func (*IOHeavyCallerRaw) Call

func (_IOHeavy *IOHeavyCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

type IOHeavyCallerSession

type IOHeavyCallerSession struct {
	Contract *IOHeavyCaller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts  // Call options to use throughout this session
}

IOHeavyCallerSession is an auto generated read-only Go binding around a Klaytn contract, with pre-set call options.

func (*IOHeavyCallerSession) Get

func (_IOHeavy *IOHeavyCallerSession) Get(key [20]byte) ([]byte, error)

Get is a free data retrieval call binding the contract method 0x5acecc78.

Solidity: function get(key bytes20) constant returns(bytes)

type IOHeavyFilterer

type IOHeavyFilterer struct {
	// contains filtered or unexported fields
}

IOHeavyFilterer is an auto generated log filtering Go binding around a Klaytn contract events.

func NewIOHeavyFilterer

func NewIOHeavyFilterer(address common.Address, filterer bind.ContractFilterer) (*IOHeavyFilterer, error)

NewIOHeavyFilterer creates a new log filterer instance of IOHeavy, bound to a specific deployed contract.

func (*IOHeavyFilterer) FilterFinishScan

func (_IOHeavy *IOHeavyFilterer) FilterFinishScan(opts *bind.FilterOpts) (*IOHeavyFinishScanIterator, error)

FilterFinishScan is a free log retrieval operation binding the contract event 0x2e8128137e55a67bef5f6fa7e5c6722c5632e21b8c8bcf6df64bc32239dd6a3f.

Solidity: e finishScan(size uint256, signature uint256)

func (*IOHeavyFilterer) FilterFinishWrite

func (_IOHeavy *IOHeavyFilterer) FilterFinishWrite(opts *bind.FilterOpts) (*IOHeavyFinishWriteIterator, error)

FilterFinishWrite is a free log retrieval operation binding the contract event 0xe849f68c74be0ec2d162615e7bc539b752b8e3e7db7ccb69f93eb19c85597f7e.

Solidity: e finishWrite(size uint256, signature uint256)

func (*IOHeavyFilterer) WatchFinishScan

func (_IOHeavy *IOHeavyFilterer) WatchFinishScan(opts *bind.WatchOpts, sink chan<- *IOHeavyFinishScan) (event.Subscription, error)

WatchFinishScan is a free log subscription operation binding the contract event 0x2e8128137e55a67bef5f6fa7e5c6722c5632e21b8c8bcf6df64bc32239dd6a3f.

Solidity: e finishScan(size uint256, signature uint256)

func (*IOHeavyFilterer) WatchFinishWrite

func (_IOHeavy *IOHeavyFilterer) WatchFinishWrite(opts *bind.WatchOpts, sink chan<- *IOHeavyFinishWrite) (event.Subscription, error)

WatchFinishWrite is a free log subscription operation binding the contract event 0xe849f68c74be0ec2d162615e7bc539b752b8e3e7db7ccb69f93eb19c85597f7e.

Solidity: e finishWrite(size uint256, signature uint256)

type IOHeavyFinishScan

type IOHeavyFinishScan struct {
	Size      *big.Int
	Signature *big.Int
	Raw       types.Log // Blockchain specific contextual infos
}

IOHeavyFinishScan represents a FinishScan event raised by the IOHeavy contract.

type IOHeavyFinishScanIterator

type IOHeavyFinishScanIterator struct {
	Event *IOHeavyFinishScan // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

IOHeavyFinishScanIterator is returned from FilterFinishScan and is used to iterate over the raw logs and unpacked data for FinishScan events raised by the IOHeavy contract.

func (*IOHeavyFinishScanIterator) Close

func (it *IOHeavyFinishScanIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*IOHeavyFinishScanIterator) Error

func (it *IOHeavyFinishScanIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*IOHeavyFinishScanIterator) Next

func (it *IOHeavyFinishScanIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type IOHeavyFinishWrite

type IOHeavyFinishWrite struct {
	Size      *big.Int
	Signature *big.Int
	Raw       types.Log // Blockchain specific contextual infos
}

IOHeavyFinishWrite represents a FinishWrite event raised by the IOHeavy contract.

type IOHeavyFinishWriteIterator

type IOHeavyFinishWriteIterator struct {
	Event *IOHeavyFinishWrite // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

IOHeavyFinishWriteIterator is returned from FilterFinishWrite and is used to iterate over the raw logs and unpacked data for FinishWrite events raised by the IOHeavy contract.

func (*IOHeavyFinishWriteIterator) Close

func (it *IOHeavyFinishWriteIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*IOHeavyFinishWriteIterator) Error

func (it *IOHeavyFinishWriteIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*IOHeavyFinishWriteIterator) Next

func (it *IOHeavyFinishWriteIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type IOHeavyRaw

type IOHeavyRaw struct {
	Contract *IOHeavy // Generic contract binding to access the raw methods on
}

IOHeavyRaw is an auto generated low-level Go binding around a Klaytn contract.

func (*IOHeavyRaw) Call

func (_IOHeavy *IOHeavyRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

func (*IOHeavyRaw) Transact

func (_IOHeavy *IOHeavyRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*IOHeavyRaw) Transfer

func (_IOHeavy *IOHeavyRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type IOHeavySession

type IOHeavySession struct {
	Contract     *IOHeavy          // Generic contract binding to set the session for
	CallOpts     bind.CallOpts     // Call options to use throughout this session
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

IOHeavySession is an auto generated Go binding around a Klaytn contract, with pre-set call and transact options.

func (*IOHeavySession) Get

func (_IOHeavy *IOHeavySession) Get(key [20]byte) ([]byte, error)

Get is a free data retrieval call binding the contract method 0x5acecc78.

Solidity: function get(key bytes20) constant returns(bytes)

func (*IOHeavySession) RevertScan

func (_IOHeavy *IOHeavySession) RevertScan(start_key *big.Int, size *big.Int, signature *big.Int) (*types.Transaction, error)

RevertScan is a paid mutator transaction binding the contract method 0xc315d63e.

Solidity: function revert_scan(start_key uint256, size uint256, signature uint256) returns()

func (*IOHeavySession) Scan

func (_IOHeavy *IOHeavySession) Scan(start_key *big.Int, size *big.Int, signature *big.Int) (*types.Transaction, error)

Scan is a paid mutator transaction binding the contract method 0x6531695d.

Solidity: function scan(start_key uint256, size uint256, signature uint256) returns()

func (*IOHeavySession) Set

func (_IOHeavy *IOHeavySession) Set(key [20]byte, value []byte) (*types.Transaction, error)

Set is a paid mutator transaction binding the contract method 0xd778e2da.

Solidity: function set(key bytes20, value bytes) returns()

func (*IOHeavySession) Write

func (_IOHeavy *IOHeavySession) Write(start_key *big.Int, size *big.Int, signature *big.Int) (*types.Transaction, error)

Write is a paid mutator transaction binding the contract method 0xd4cd8790.

Solidity: function write(start_key uint256, size uint256, signature uint256) returns()

type IOHeavyTransactor

type IOHeavyTransactor struct {
	// contains filtered or unexported fields
}

IOHeavyTransactor is an auto generated write-only Go binding around a Klaytn contract.

func NewIOHeavyTransactor

func NewIOHeavyTransactor(address common.Address, transactor bind.ContractTransactor) (*IOHeavyTransactor, error)

NewIOHeavyTransactor creates a new write-only instance of IOHeavy, bound to a specific deployed contract.

func (*IOHeavyTransactor) RevertScan

func (_IOHeavy *IOHeavyTransactor) RevertScan(opts *bind.TransactOpts, start_key *big.Int, size *big.Int, signature *big.Int) (*types.Transaction, error)

RevertScan is a paid mutator transaction binding the contract method 0xc315d63e.

Solidity: function revert_scan(start_key uint256, size uint256, signature uint256) returns()

func (*IOHeavyTransactor) Scan

func (_IOHeavy *IOHeavyTransactor) Scan(opts *bind.TransactOpts, start_key *big.Int, size *big.Int, signature *big.Int) (*types.Transaction, error)

Scan is a paid mutator transaction binding the contract method 0x6531695d.

Solidity: function scan(start_key uint256, size uint256, signature uint256) returns()

func (*IOHeavyTransactor) Set

func (_IOHeavy *IOHeavyTransactor) Set(opts *bind.TransactOpts, key [20]byte, value []byte) (*types.Transaction, error)

Set is a paid mutator transaction binding the contract method 0xd778e2da.

Solidity: function set(key bytes20, value bytes) returns()

func (*IOHeavyTransactor) Write

func (_IOHeavy *IOHeavyTransactor) Write(opts *bind.TransactOpts, start_key *big.Int, size *big.Int, signature *big.Int) (*types.Transaction, error)

Write is a paid mutator transaction binding the contract method 0xd4cd8790.

Solidity: function write(start_key uint256, size uint256, signature uint256) returns()

type IOHeavyTransactorRaw

type IOHeavyTransactorRaw struct {
	Contract *IOHeavyTransactor // Generic write-only contract binding to access the raw methods on
}

IOHeavyTransactorRaw is an auto generated low-level write-only Go binding around a Klaytn contract.

func (*IOHeavyTransactorRaw) Transact

func (_IOHeavy *IOHeavyTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*IOHeavyTransactorRaw) Transfer

func (_IOHeavy *IOHeavyTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type IOHeavyTransactorSession

type IOHeavyTransactorSession struct {
	Contract     *IOHeavyTransactor // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts  // Transaction auth options to use throughout this session
}

IOHeavyTransactorSession is an auto generated write-only Go binding around a Klaytn contract, with pre-set transact options.

func (*IOHeavyTransactorSession) RevertScan

func (_IOHeavy *IOHeavyTransactorSession) RevertScan(start_key *big.Int, size *big.Int, signature *big.Int) (*types.Transaction, error)

RevertScan is a paid mutator transaction binding the contract method 0xc315d63e.

Solidity: function revert_scan(start_key uint256, size uint256, signature uint256) returns()

func (*IOHeavyTransactorSession) Scan

func (_IOHeavy *IOHeavyTransactorSession) Scan(start_key *big.Int, size *big.Int, signature *big.Int) (*types.Transaction, error)

Scan is a paid mutator transaction binding the contract method 0x6531695d.

Solidity: function scan(start_key uint256, size uint256, signature uint256) returns()

func (*IOHeavyTransactorSession) Set

func (_IOHeavy *IOHeavyTransactorSession) Set(key [20]byte, value []byte) (*types.Transaction, error)

Set is a paid mutator transaction binding the contract method 0xd778e2da.

Solidity: function set(key bytes20, value bytes) returns()

func (*IOHeavyTransactorSession) Write

func (_IOHeavy *IOHeavyTransactorSession) Write(start_key *big.Int, size *big.Int, signature *big.Int) (*types.Transaction, error)

Write is a paid mutator transaction binding the contract method 0xd4cd8790.

Solidity: function write(start_key uint256, size uint256, signature uint256) returns()

Jump to

Keyboard shortcuts

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