MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / file

Method file

atomic-core/src/pristine/span_patch_storage.rs:697–714  ·  view source on GitHub ↗
(
        &mut self,
        txn: &T,
        file: &ExternalFile,
        metrics: &mut SpanContextBuildMetrics,
    )

Source from the content-addressed store, hash-verified

695 }
696
697 fn file<T: SpanPatchReadTxn>(
698 &mut self,
699 txn: &T,
700 file: &ExternalFile,
701 metrics: &mut SpanContextBuildMetrics,
702 ) -> Result<Inode> {
703 let key = (file.owner, file.ordinal);
704 if let Some(inode) = self.files.get(&key) {
705 metrics.file_hits += 1;
706 return Ok(*inode);
707 }
708 metrics.file_lookups += 1;
709 let inode = txn
710 .span_file_inode(file)?
711 .context("span file mapping missing")?;
712 self.files.insert(key, inode);
713 Ok(inode)
714 }
715}
716
717// Transaction-local exact reachability; never use local NodeId ordering as

Callers 1

Calls 4

getMethod · 0.65
contextMethod · 0.45
span_file_inodeMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected