Documentation
¶
Index ¶
- type ConsumerCoordinatorPair
- type ConsumerOraclePair
- type Contract
- type ContractsNodesJobsMap
- type FluxJobMap
- type FluxTest
- type FluxTestOptions
- type KeeperJobMap
- type KeeperTest
- type KeeperTestOptions
- type LimitErrGroup
- type NodeData
- type OCRJobMap
- type OCRTest
- type OCRTestOptions
- type PercentileReport
- type PerfJobRunResult
- type PerfRequestIDTestResults
- type PerfRoundTestResults
- type RunlogNodeData
- type RunlogTest
- type RunlogTestOptions
- type Test
- func NewFluxTest(testOptions FluxTestOptions, contractOptions contracts.FluxAggregatorOptions, ...) Test
- func NewKeeperTest(testOptions KeeperTestOptions, env environment.Environment, ...) Test
- func NewOCRTest(testOptions OCRTestOptions, contractOptions contracts.OffchainOptions, ...) Test
- func NewRunlogTest(testOptions RunlogTestOptions, env environment.Environment, ...) Test
- func NewVRFTest(testOptions VRFTestOptions, env environment.Environment, ...) Test
- type TestOptions
- type VRFNodeData
- type VRFProvingData
- type VRFTest
- type VRFTestOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsumerCoordinatorPair ¶ added in v0.0.5
type ConsumerCoordinatorPair struct {
// contains filtered or unexported fields
}
ConsumerCoordinatorPair consumer and coordinator pair
type ConsumerOraclePair ¶ added in v0.0.7
type ConsumerOraclePair struct {
// contains filtered or unexported fields
}
ConsumerOraclePair consumer and oracle pair
type Contract ¶ added in v0.0.7
type Contract interface {
Address() string
}
Contract is just a basic contract interface
type ContractsNodesJobsMap ¶ added in v0.0.7
ContractsNodesJobsMap common contract to node to job id mapping for perf/soak tests
func (ContractsNodesJobsMap) FromJobsChan ¶ added in v0.0.7
func (c ContractsNodesJobsMap) FromJobsChan(jobsChan chan ContractsNodesJobsMap)
FromJobsChan fills ContractsNodesJobsMap from a chan used in parallel deployment
type FluxJobMap ¶
type FluxJobMap map[contracts.FluxAggregator]map[client.Chainlink]string
FluxJobMap is a custom map type that holds the record of jobs by the contract instance and the chainlink node
type FluxTest ¶
type FluxTest struct { TestOptions FluxTestOptions ContractOptions contracts.FluxAggregatorOptions Environment environment.Environment Blockchain client.BlockchainClient Wallets client.BlockchainWallets Deployer contracts.ContractDeployer Prometheus *client.Prometheus // contains filtered or unexported fields }
FluxTest is the implementation of Test that will configure and execute a performance test of FluxAggregator contracts & jobs
func (*FluxTest) RecordValues ¶
func (f *FluxTest) RecordValues(b ginkgo.Benchmarker) error
RecordValues will query all of the latencies of the FluxAggregator rounds and then record them within the test runner
type FluxTestOptions ¶
type FluxTestOptions struct { TestOptions RequiredSubmissions int RestartDelayRounds int NodePollTimePeriod time.Duration MeasureLatenciesPerRound bool }
FluxTestOptions contains the parameters for the performance test to be executed
type KeeperJobMap ¶ added in v0.0.5
type KeeperJobMap map[contracts.KeeperConsumer]map[client.Chainlink]string
KeeperJobMap is a custom map type that holds the record of jobs by the contract instance and the chainlink node
type KeeperTest ¶ added in v0.0.5
type KeeperTest struct { TestOptions KeeperTestOptions Environment environment.Environment Blockchain client.BlockchainClient Wallets client.BlockchainWallets Deployer contracts.ContractDeployer // common contracts Link contracts.LinkToken GasFeed contracts.MockGasFeed LinkFeed contracts.MockETHLINKFeed Registry contracts.KeeperRegistry Registrar contracts.UpkeepRegistrar // contains filtered or unexported fields }
KeeperTest is the implementation of Test that will configure and execute soak test of Keeper contracts & jobs
func (*KeeperTest) RecordValues ¶ added in v0.0.5
func (f *KeeperTest) RecordValues(b ginkgo.Benchmarker) error
RecordValues records Keeper metrics
func (*KeeperTest) Run ¶ added in v0.0.5
func (f *KeeperTest) Run() error
Run runs Keeper performance/soak test
func (*KeeperTest) Setup ¶ added in v0.0.5
func (f *KeeperTest) Setup() error
Setup setups Keeper performance/soak test
type KeeperTestOptions ¶ added in v0.0.5
type KeeperTestOptions struct { TestOptions PaymentPremiumPPB uint32 RegistryCheckGasLimit uint32 BlockCountPerTurn *big.Int StalenessSeconds *big.Int GasCeilingMultiplier uint16 RoundTimeout time.Duration TestDuration time.Duration }
KeeperTestOptions contains the parameters for the Keeper performance/soak test to be executed
type LimitErrGroup ¶ added in v0.0.7
type LimitErrGroup struct {
// contains filtered or unexported fields
}
LimitErrGroup implements the errgroup.Group interface, but limits goroutines to a execute at a max throughput.
func NewLimitErrGroup ¶ added in v0.0.7
func NewLimitErrGroup(rps int) *LimitErrGroup
NewLimitErrGroup initializes and returns a new rate limited errgroup
func (*LimitErrGroup) Go ¶ added in v0.0.7
func (e *LimitErrGroup) Go(fn func() error)
Go runs a new job as a goroutine. It will wait until the next available time so that the ratelimit is not exceeded.
func (*LimitErrGroup) Wait ¶ added in v0.0.7
func (e *LimitErrGroup) Wait() error
Wait will wait until all jobs are processed. Once Wait() is called, no more jobs can be added.
type OCRJobMap ¶ added in v0.0.5
type OCRJobMap map[contracts.OffchainAggregator]map[client.Chainlink]string
OCRJobMap is a custom map type that holds the record of jobs by the contract instance and the chainlink node
type OCRTest ¶ added in v0.0.5
type OCRTest struct { TestOptions OCRTestOptions ContractOptions contracts.OffchainOptions Environment environment.Environment Blockchain client.BlockchainClient Wallets client.BlockchainWallets Deployer contracts.ContractDeployer // contains filtered or unexported fields }
OCRTest is the implementation of Test that will configure and execute soak test of OCR contracts & jobs
func (*OCRTest) RecordValues ¶ added in v0.0.5
func (f *OCRTest) RecordValues(b ginkgo.Benchmarker) error
RecordValues records OCR metrics
type OCRTestOptions ¶ added in v0.0.5
type OCRTestOptions struct { TestOptions RoundTimeout time.Duration AdapterValue int TestDuration time.Duration }
OCRTestOptions contains the parameters for the OCR soak test to be executed
type PercentileReport ¶
type PercentileReport struct { StdDev float64 Max float64 Min float64 P99 float64 P95 float64 P90 float64 P50 float64 }
PercentileReport common percentile report
func NewPercentileReport ¶
func NewPercentileReport(data []time.Duration) (*PercentileReport, error)
NewPercentileReport calculates percentiles for arbitrary float64 data
func (*PercentileReport) PrintPercentileMetrics ¶
func (m *PercentileReport) PrintPercentileMetrics()
PrintPercentileMetrics prints percentile metrics
type PerfJobRunResult ¶ added in v0.0.7
PerfJobRunResult contains the start & end time of the round submission to calculate latency
type PerfRequestIDTestResults ¶ added in v0.0.7
type PerfRequestIDTestResults struct {
// contains filtered or unexported fields
}
PerfRequestIDTestResults is results traced and aggregated by request id, see models.DecodeLogTaskRun
func NewPerfRequestIDTestResults ¶ added in v0.0.7
func NewPerfRequestIDTestResults() *PerfRequestIDTestResults
NewPerfRequestIDTestResults returns an instance NewPerfRequestIDTestResults
func (*PerfRequestIDTestResults) Get ¶ added in v0.0.7
func (r *PerfRequestIDTestResults) Get(requestID string) *PerfJobRunResult
Get a value from the test results map with nil checking to avoid panics
func (*PerfRequestIDTestResults) GetAll ¶ added in v0.0.7
func (r *PerfRequestIDTestResults) GetAll() map[string]*PerfJobRunResult
GetAll returns all test results
type PerfRoundTestResults ¶ added in v0.0.7
type PerfRoundTestResults struct {
// contains filtered or unexported fields
}
PerfRoundTestResults is a complex map that holds all test data in a map by the round ID, then contract instance and then the Chainlink client
func NewPerfTestResults ¶ added in v0.0.7
func NewPerfTestResults() PerfRoundTestResults
NewPerfTestResults returns an instance PerfRoundTestResults
func (PerfRoundTestResults) Get ¶ added in v0.0.7
func (f PerfRoundTestResults) Get( roundID int64, contract Contract, chainlink client.Chainlink, ) *PerfJobRunResult
Get a value from the test results map with nil checking to avoid panics
func (PerfRoundTestResults) GetAll ¶ added in v0.0.7
func (f PerfRoundTestResults) GetAll() map[int64]map[Contract]map[client.Chainlink]*PerfJobRunResult
GetAll returns the full map, not safe for concurrent actions
type RunlogNodeData ¶ added in v0.0.7
type RunlogNodeData struct {
JobID string
}
RunlogNodeData node data required for runlog test
func (RunlogNodeData) GetJobID ¶ added in v0.0.7
func (n RunlogNodeData) GetJobID() string
GetJobID gets internal job id
func (RunlogNodeData) GetProvingKeyHash ¶ added in v0.0.7
func (n RunlogNodeData) GetProvingKeyHash() [32]byte
GetProvingKeyHash gets proving key hash for VRF
type RunlogTest ¶ added in v0.0.7
type RunlogTest struct { TestOptions RunlogTestOptions Environment environment.Environment Blockchain client.BlockchainClient Wallets client.BlockchainWallets Deployer contracts.ContractDeployer Link contracts.LinkToken // contains filtered or unexported fields }
RunlogTest is the implementation of Test that will configure and execute soak test of Runlog contracts & jobs
func (*RunlogTest) RecordValues ¶ added in v0.0.7
func (f *RunlogTest) RecordValues(b ginkgo.Benchmarker) error
RecordValues records Runlog metrics
func (*RunlogTest) Run ¶ added in v0.0.7
func (f *RunlogTest) Run() error
Run runs Runlog performance/soak test
func (*RunlogTest) Setup ¶ added in v0.0.7
func (f *RunlogTest) Setup() error
Setup setups Runlog performance/soak test
type RunlogTestOptions ¶ added in v0.0.7
type RunlogTestOptions struct { TestOptions AdapterValue int }
RunlogTestOptions contains the parameters for the Runlog soak test to be executed
type Test ¶
type Test interface { Setup() error Run() error RecordValues(b ginkgo.Benchmarker) error }
Test is the interface to be implemented for performance tests
func NewFluxTest ¶
func NewFluxTest( testOptions FluxTestOptions, contractOptions contracts.FluxAggregatorOptions, env environment.Environment, blockchain client.BlockchainClient, wallets client.BlockchainWallets, deployer contracts.ContractDeployer, prom *client.Prometheus, ) Test
NewFluxTest returns an instantiated instance of FluxTest
func NewKeeperTest ¶ added in v0.0.5
func NewKeeperTest( testOptions KeeperTestOptions, env environment.Environment, blockchain client.BlockchainClient, wallets client.BlockchainWallets, deployer contracts.ContractDeployer, adapter environment.ExternalAdapter, link contracts.LinkToken, ) Test
NewKeeperTest creates new Keeper performance/soak test
func NewOCRTest ¶ added in v0.0.5
func NewOCRTest( testOptions OCRTestOptions, contractOptions contracts.OffchainOptions, env environment.Environment, blockchain client.BlockchainClient, wallets client.BlockchainWallets, deployer contracts.ContractDeployer, adapter environment.ExternalAdapter, ) Test
NewOCRTest creates new OCR performance/soak test
func NewRunlogTest ¶ added in v0.0.7
func NewRunlogTest( testOptions RunlogTestOptions, env environment.Environment, link contracts.LinkToken, blockchain client.BlockchainClient, wallets client.BlockchainWallets, deployer contracts.ContractDeployer, adapter environment.ExternalAdapter, ) Test
NewRunlogTest creates new Runlog performance/soak test
func NewVRFTest ¶ added in v0.0.5
func NewVRFTest( testOptions VRFTestOptions, env environment.Environment, link contracts.LinkToken, blockchain client.BlockchainClient, wallets client.BlockchainWallets, deployer contracts.ContractDeployer, adapter environment.ExternalAdapter, ) Test
NewVRFTest creates new VRF performance/soak test
type TestOptions ¶
type TestOptions struct { NumberOfContracts int NumberOfRounds int RoundTimeout time.Duration TestDuration time.Duration GracefulStopDuration time.Duration }
TestOptions common perf/soak test options either TestDuration can be set or NumberOfRounds, or both
type VRFNodeData ¶ added in v0.0.7
VRFNodeData VRF node data
func (VRFNodeData) GetJobID ¶ added in v0.0.7
func (n VRFNodeData) GetJobID() string
GetJobID gets internal job id
func (VRFNodeData) GetProvingKeyHash ¶ added in v0.0.7
func (n VRFNodeData) GetProvingKeyHash() [32]byte
GetProvingKeyHash gets proving key hash for VRF
type VRFProvingData ¶ added in v0.0.5
VRFProvingData proving key and job ID pair
type VRFTest ¶ added in v0.0.5
type VRFTest struct { TestOptions VRFTestOptions Environment environment.Environment Blockchain client.BlockchainClient Wallets client.BlockchainWallets Deployer contracts.ContractDeployer // contains filtered or unexported fields }
VRFTest is the implementation of Test that will configure and execute soak test of VRF contracts & jobs
func (*VRFTest) RecordValues ¶ added in v0.0.5
func (f *VRFTest) RecordValues(b ginkgo.Benchmarker) error
RecordValues records VRF metrics
type VRFTestOptions ¶ added in v0.0.5
type VRFTestOptions struct {
TestOptions
}
VRFTestOptions contains the parameters for the VRF soak test to be executed