Struct soroban_env_host::cost_runner::I64Load8SRun
source · pub struct I64Load8SRun;
Implementations§
source§impl I64Load8SRun
impl I64Load8SRun
pub const INSN_TYPE: WasmInsnType = WasmInsnType::I64Load8S
Trait Implementations§
source§impl CostRunner for I64Load8SRun
impl CostRunner for I64Load8SRun
§type SampleType = WasmInsnSample
type SampleType = WasmInsnSample
Data type of the sample running with.
source§fn run_iter(host: &Host, _iter: u64, sample: WasmInsnSample)
fn run_iter(host: &Host, _iter: u64, sample: WasmInsnSample)
Run a iteration of the
CostRunner
, called by run
for 0..RUN_ITERATIONS.source§fn get_total_input(_host: &Host, sample: &WasmInsnSample) -> u64
fn get_total_input(_host: &Host, sample: &WasmInsnSample) -> u64
Get the total input from this run. Default to asking the host. May be overridden
if host is not actually involved in the actual run. However, if overridden, there is
a risk of the computed input being diverged from the actual input from the host’s
perspective. So use it carefully. This should be after the
run
, outside of the
CPU-and-memory tracking machineary.source§const RUN_ITERATIONS: u64 = 100u64
const RUN_ITERATIONS: u64 = 100u64
Number of iterations to run, used to divide the resulting measured values.
Defaults to 100 to average out the measurement noises for fast-running cases.
If you find your measurements are finishing too slow, reduce this number.
source§fn run(host: &Host, samples: Vec<Self::SampleType>)
fn run(host: &Host, samples: Vec<Self::SampleType>)
Run the
CostRunner
. This method is called under CPU-and-memory tracking
machinery, so anything that happens during it will be considered part of
the cost for running the HostMeasurement at the returned input. Will call
run_iter
with iter set to each number in 0..RUN_ITERATIONS.Auto Trait Implementations§
impl RefUnwindSafe for I64Load8SRun
impl Send for I64Load8SRun
impl Sync for I64Load8SRun
impl Unpin for I64Load8SRun
impl UnwindSafe for I64Load8SRun
Blanket Implementations§
source§impl<T, U, V, E, C> Compare<(T, U, V)> for Cwhere
C: Compare<T, Error = E, Error = E, Error = E> + Compare<U> + Compare<V>,
impl<T, U, V, E, C> Compare<(T, U, V)> for Cwhere
C: Compare<T, Error = E, Error = E, Error = E> + Compare<U> + Compare<V>,
source§impl<T, U, E, C> Compare<(T, U)> for Cwhere
C: Compare<T, Error = E, Error = E> + Compare<U>,
impl<T, U, E, C> Compare<(T, U)> for Cwhere
C: Compare<T, Error = E, Error = E> + Compare<U>,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.