Documentation ¶
Index ¶
- Variables
- func NewArwenBenchmark(arg ArgArwenBenchmark) *arwenBenchmark
- func NewCoordinator(benchmarks []BenchmarkRunner) (*coordinator, error)
- func NewDelegationBenchmark(arg ArgDelegationBenchmark) *delegationBenchmark
- func NewErc20Benchmark(arg ArgErc20Benchmark) *erc20Benchmark
- type ArgArwenBenchmark
- type ArgDelegationBenchmark
- type ArgErc20Benchmark
- type BenchmarkRunner
- type SingleResult
- type TestResults
Constants ¶
This section is empty.
Variables ¶
var ErrEmptyBenchmarksSlice = errors.New("empty benchmarks slice provided")
ErrEmptyBenchmarksSlice signals that the provided benchmarks slice was empty
var ErrFileDoesNotExist = errors.New("file does not exist")
ErrFileDoesNotExist signals that the required file does not exist
var ErrNilBenchmark = errors.New("nil benchmark")
ErrNilBenchmark signals that a nil benchmark was provided
Functions ¶
func NewArwenBenchmark ¶
func NewArwenBenchmark(arg ArgArwenBenchmark) *arwenBenchmark
NewArwenBenchmark creates a new benchmark based on SC execution through Arwen VM
func NewCoordinator ¶
func NewCoordinator(benchmarks []BenchmarkRunner) (*coordinator, error)
NewCoordinator will create a coordinator used to launch all provided benchmarks
func NewDelegationBenchmark ¶
func NewDelegationBenchmark(arg ArgDelegationBenchmark) *delegationBenchmark
NewDelegationBenchmark creates a new benchmark based on delegation SC execution through Arwen VM
func NewErc20Benchmark ¶
func NewErc20Benchmark(arg ArgErc20Benchmark) *erc20Benchmark
NewErc20Benchmark creates a new benchmark based on erc20 SC execution through Arwen VM
Types ¶
type ArgArwenBenchmark ¶
type ArgArwenBenchmark struct { Name string ScFilename string TestingValue uint64 Function string Arguments [][]byte NumRuns int }
ArgArwenBenchmark is the Arwen type benchmark argument used in constructor
type ArgDelegationBenchmark ¶
type ArgDelegationBenchmark struct { Name string ScFilename string NumRuns int NumBatches uint32 NumTxPerBatch uint32 NumQueriesPerBatch uint32 }
ArgDelegationBenchmark is the delegation type benchmark argument used in constructor
type ArgErc20Benchmark ¶
type ArgErc20Benchmark struct { Name string ScFilename string Function string NumRuns int NumTransfersPerRun int }
ArgErc20Benchmark is the erc20 type benchmark argument used in constructor
type BenchmarkRunner ¶
BenchmarkRunner defines a benchmark test able to measure in some way the host
type SingleResult ¶
SingleResult contains the output data after a benchmark run
type TestResults ¶
type TestResults struct { TotalDuration time.Duration Error error Results []SingleResult }
TestResults represents the output structure containing the test results data
func (*TestResults) ToDisplayTable ¶
func (tr *TestResults) ToDisplayTable() string
ToDisplayTable will output the contained data as an ASCII table
func (*TestResults) ToStrings ¶
func (tr *TestResults) ToStrings() [][]string
ToStrings will return the contained data as strings (to be easily written, e.g. in a file)