MCPcopy Create free account
hub / github.com/evilsocket/cake / layer_assignment_roundtrip

Function layer_assignment_roundtrip

cake-core/benches/bench_protocol.rs:86–96  ·  view source on GitHub ↗
(bencher: divan::Bencher)

Source from the content-addressed store, hash-verified

84
85#[divan::bench]
86fn layer_assignment_roundtrip(bencher: divan::Bencher) {
87 let layers: Vec<String> = (0..24).map(|i| format!("model.layers.{i}")).collect();
88 let msg = Message::LayerAssignment {
89 layers,
90 model_hash: "abc12345".into(),
91 };
92 bencher.bench_local(|| {
93 let enc = msg.to_bytes().unwrap();
94 Message::from_bytes(&enc).unwrap()
95 });
96}
97
98#[divan::bench]
99fn full_pipe_roundtrip(bencher: divan::Bencher) {

Callers

nothing calls this directly

Calls 1

to_bytesMethod · 0.80

Tested by

no test coverage detected