MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / record

Method record

examples/mpk.rs:163–178  ·  view source on GitHub ↗
(&mut self, success: bool)

Source from the content-addressed store, hash-verified

161 self.next
162 }
163 fn record(&mut self, success: bool) {
164 if !success {
165 self.growing = false
166 }
167 let diff = if self.growing {
168 (self.next - self.last) * 2
169 } else {
170 (self.next - self.last + 1) / 2
171 };
172 if success {
173 self.last = self.next;
174 self.next = self.next + diff;
175 } else {
176 self.next = self.next - diff;
177 }
178 }
179 fn done(&self) -> bool {
180 self.last == self.next
181 }

Callers 1

probe_engine_sizeFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected