Skip to main content

OperationGenerator

Trait OperationGenerator 

Source
pub trait OperationGenerator: Send + 'static {
    // Required method
    fn generate_operations(
        &mut self,
        owner: AccountOwner,
        count: usize,
    ) -> Vec<Operation>;
}
Expand description

Trait for generating benchmark operations.

Implement this trait to create custom operation generators for different application benchmarks (e.g., prediction markets, custom tokens, etc.).

Each benchmark chain gets its own generator instance. The generator is responsible for producing operations to include in blocks, including any destination chain selection logic.

Required Methods§

Source

fn generate_operations( &mut self, owner: AccountOwner, count: usize, ) -> Vec<Operation>

Generate a batch of operations for a single block.

Implementors§