MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / write_idx

Method write_idx

src/monitor.rs:204–213  ·  view source on GitHub ↗

Current write index (number of entries ever written).

(&self)

Source from the content-addressed store, hash-verified

202
203 /// Current write index (number of entries ever written).
204 pub fn write_idx(&self) -> u64 {
205 if self.mmap.len() < HEADER_SIZE {
206 return 0;
207 }
208 u64::from_le_bytes(
209 self.mmap[OFF_WRITE_IDX..OFF_WRITE_IDX + 8]
210 .try_into()
211 .unwrap_or([0; 8]),
212 )
213 }
214
215 /// Read the entry at the given ring-buffer slot (0..255).
216 pub fn entry(&self, slot: usize) -> Option<MonitorEntry> {

Callers 2

runFunction · 0.80
monitor_loopFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected