Documentation ¶
Index ¶
Constants ¶
View Source
const ( // NameQueries is the name of the queries workload. NameQueries = "queries" // CfgConsensusNumKeptVersions is the number of last consensus state versions that the nodes are // keeping (e.g., due to a configured pruning policy). Versions older than that will not be // queried. // // Note that this is only for consensus state versions, not runtime versions. CfgConsensusNumKeptVersions = "queries.consensus.num_kept_versions" // CfgQueriesRuntimeEnabled configures whether runtime queries are enabled. CfgQueriesRuntimeEnabled = "queries.runtime.enabled" )
View Source
const ( // NameRuntime is the name of the runtime workload. NameRuntime = "runtime" // CfgRuntimeID is the runtime workload runtime ID. CfgRuntimeID = "runtime.runtime_id" )
View Source
const ( // NameCommission is the name of the commission schedule amendements // workload. NameCommission = "commission" )
View Source
const (
// NameDelegation is the name of the delegation workload.
NameDelegation = "delegation"
)
View Source
const (
// NameOversized is the name of the oversized workload.
NameOversized = "oversized"
)
View Source
const (
// NameParallel is the name of the parallel workload.
NameParallel = "parallel"
)
View Source
const (
// NameRegistration is the name of the registration workload.
NameRegistration = "registration"
)
View Source
const ( // NameTransfer is the name of the transfer workload. // // Transfer workload continuously submits transfer and burn transactions. NameTransfer = "transfer" )
Variables ¶
View Source
var ByName = map[string]Workload{
NameCommission: &commission{},
NameDelegation: &delegation{},
NameOversized: oversized{},
NameParallel: parallel{},
NameQueries: &queries{},
NameRegistration: ®istration{},
NameRuntime: &runtime{},
NameTransfer: &transfer{},
}
ByName is the registry of workloads that you can access with `--workload <name>` on the command line.
View Source
var Flags = flag.NewFlagSet("", flag.ContinueOnError)
Flags has the workload flags.
View Source
var QueriesFlags = flag.NewFlagSet("", flag.ContinueOnError)
QueriesFlags are the queries workload flags.
View Source
var RuntimeFlags = flag.NewFlagSet("", flag.ContinueOnError)
RuntimeFlags are the runtime workload flags.
Functions ¶
Types ¶
type Workload ¶
type Workload interface { // NeedsFunds should return true if the workload requires funding. NeedsFunds() bool // Run executes the workload. // If `gracefulExit`'s deadline passes, it is not an error. // Return `nil` after any short-ish amount of time in that case. // Prefer to do at least one "iteration" even so. Run( gracefulExit context.Context, rng *rand.Rand, conn *grpc.ClientConn, cnsc consensus.ClientBackend, fundingAccount signature.Signer, ) error }
Workload is a DRBG-backed schedule of transactions.
Click to show internal directories.
Click to hide internal directories.