MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / wrap_bench

Method wrap_bench

src/executor/wall_time/isolation.rs:92–98  ·  view source on GitHub ↗

Wrap the benchmark leaf so it runs pinned according to this mode. The profiler wraps its recorder around the result, so this must only touch the leaf and never move the profiler onto the bench cores.

(&self, bench_cmd: CommandBuilder)

Source from the content-addressed store, hash-verified

90 /// profiler wraps its recorder around the result, so this must only touch the
91 /// leaf and never move the profiler onto the bench cores.
92 pub fn wrap_bench(&self, bench_cmd: CommandBuilder) -> Result<CommandBuilder> {
93 match self {
94 Isolation::None => Ok(bench_cmd),
95 Isolation::Hooks => wrap_with_hook(bench_cmd),
96 Isolation::Systemd => wrap_isolation_scope(bench_cmd),
97 }
98 }
99}
100
101impl Drop for Isolation {

Callers 3

runMethod · 0.80
none_wrap_is_passthroughFunction · 0.80

Calls 2

wrap_with_hookFunction · 0.85
wrap_isolation_scopeFunction · 0.85

Tested by 2

none_wrap_is_passthroughFunction · 0.64