MCPcopy Index your code
hub / github.com/AI45Lab/Code / records

Method records

core/src/run.rs:221–233  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

219 }
220
221 pub async fn records(&self) -> Vec<RunRecord> {
222 let snapshots = self.runs.read().await.values().cloned().collect::<Vec<_>>();
223 let events = self.events.read().await;
224 let mut records = snapshots
225 .into_iter()
226 .map(|snapshot| RunRecord {
227 events: events.get(&snapshot.id).cloned().unwrap_or_default(),
228 snapshot,
229 })
230 .collect::<Vec<_>>();
231 records.sort_by_key(|record| record.snapshot.created_at_ms);
232 records
233 }
234
235 pub async fn replace_records(&self, records: Vec<RunRecord>) {
236 // Preserve creation-order in the FIFO eviction queue so a

Calls 1

getMethod · 0.45

Tested by 1

create_test_run_recordsFunction · 0.64