MCPcopy Create free account
hub / github.com/AI45Lab/Code / gen_run_record

Function gen_run_record

core/tests/test_persisted_schema_roundtrip.rs:422–444  ·  view source on GitHub ↗
(rng: &mut Rng)

Source from the content-addressed store, hash-verified

420}
421
422fn gen_run_record(rng: &mut Rng) -> RunRecord {
423 let event_n = rng.below(5);
424 RunRecord {
425 snapshot: RunSnapshot {
426 id: rng.string(),
427 session_id: rng.string(),
428 status: gen_run_status(rng),
429 prompt: rng.string(),
430 created_at_ms: rng.u64_small(),
431 updated_at_ms: rng.u64_small(),
432 result_text: rng.opt_string(),
433 error: rng.opt_string(),
434 event_count: rng.usize_below(1000),
435 },
436 events: (0..event_n)
437 .map(|i| RunEventRecord {
438 sequence: i as usize,
439 timestamp_ms: rng.u64_small(),
440 event: gen_agent_event(rng),
441 })
442 .collect(),
443 }
444}
445
446fn gen_loop_checkpoint(rng: &mut Rng) -> LoopCheckpoint {
447 let msg_n = rng.below(4);

Calls 7

gen_run_statusFunction · 0.85
gen_agent_eventFunction · 0.85
belowMethod · 0.80
stringMethod · 0.80
u64_smallMethod · 0.80
opt_stringMethod · 0.80
usize_belowMethod · 0.80

Tested by

no test coverage detected