MCPcopy Create free account
hub / github.com/argumentcomputer/ix / two_big_clusters

Function two_big_clusters

crates/kernel/src/shard.rs:2322–2336  ·  view source on GitHub ↗

Two tight clusters of `m` blocks each (intra-cluster delta cycles) joined by a single thin cross edge — large enough (`2m > COARSEST_TARGET`) to drive the full coarsen → uncoarsen path.

(m: u32)

Source from the content-addressed store, hash-verified

2320 let p = two_clusters();
2321 let dir = std::env::temp_dir();
2322 let pid = std::process::id();
2323 let prof = dir.join(format!("ix_shard_rt_{pid}.ixprof"));
2324 let shard = dir.join(format!("ix_shard_rt_{pid}.ixes"));
2325 std::fs::write(&prof, p.to_bytes()).unwrap();
2326
2327 let report = shard_esp(
2328 prof.to_str().unwrap(),
2329 2,
2330 0.10,
2331 1,
2332 Some(shard.to_str().unwrap()),
2333 )
2334 .unwrap();
2335 assert!(report.contains("shards=2"), "report was: {report}");
2336
2337 let m = ShardManifest::from_bytes(&std::fs::read(&shard).unwrap()).unwrap();
2338 assert_eq!(m.shards.len(), 2);
2339 assert_eq!(m.total_cross_ingress, 1000);

Calls 4

addr_u32Function · 0.85
blockMethod · 0.80
delta_edgeMethod · 0.80
finishMethod · 0.45