pub trait ProtocolCommands<T: BenchmarkType> {
// Required methods
fn protocol_dependencies(&self) -> Vec<&'static str>;
fn db_directories(&self) -> Vec<PathBuf>;
fn genesis_command<'a, I>(&self, instances: I) -> String
where I: Iterator<Item = &'a Instance>;
fn node_command<I>(
&self,
instances: I,
parameters: &BenchmarkParameters<T>,
) -> Vec<(Instance, String)>
where I: IntoIterator<Item = Instance>;
fn monitor_command<I>(&self, instances: I) -> Vec<(Instance, String)>
where I: IntoIterator<Item = Instance>;
fn client_command<I>(
&self,
instances: I,
parameters: &BenchmarkParameters<T>,
) -> Vec<(Instance, String)>
where I: IntoIterator<Item = Instance>;
}
Expand description
The minimum interface that the protocol should implement to allow benchmarks from the orchestrator.
Required Methods§
Sourcefn protocol_dependencies(&self) -> Vec<&'static str>
fn protocol_dependencies(&self) -> Vec<&'static str>
The list of dependencies to install (e.g., through apt-get).
Sourcefn db_directories(&self) -> Vec<PathBuf>
fn db_directories(&self) -> Vec<PathBuf>
The directories of all databases (that should be erased before each run).
Sourcefn genesis_command<'a, I>(&self, instances: I) -> String
fn genesis_command<'a, I>(&self, instances: I) -> String
The command to generate the genesis and all configuration files. This command is run on each remote machine.
Sourcefn node_command<I>(
&self,
instances: I,
parameters: &BenchmarkParameters<T>,
) -> Vec<(Instance, String)>where
I: IntoIterator<Item = Instance>,
fn node_command<I>(
&self,
instances: I,
parameters: &BenchmarkParameters<T>,
) -> Vec<(Instance, String)>where
I: IntoIterator<Item = Instance>,
The command to run a node. The function returns a vector of commands along with the associated instance on which to run the command.
fn monitor_command<I>(&self, instances: I) -> Vec<(Instance, String)>where
I: IntoIterator<Item = Instance>,
Sourcefn client_command<I>(
&self,
instances: I,
parameters: &BenchmarkParameters<T>,
) -> Vec<(Instance, String)>where
I: IntoIterator<Item = Instance>,
fn client_command<I>(
&self,
instances: I,
parameters: &BenchmarkParameters<T>,
) -> Vec<(Instance, String)>where
I: IntoIterator<Item = Instance>,
The command to run a client. The function returns a vector of commands along with the associated instance on which to run the command.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.