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

Function four_shards_perfect_split

crates/kernel/src/shard.rs:2094–2118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2092 }
2093 for sh in &manifest.shards {
2094 let i = sh.id as usize;
2095 steps[i] = steps[i]
2096 .saturating_add(SHARD_COST_FLOOR)
2097 .saturating_add(COST_PER_INGRESS_BYTE.saturating_mul(sh.cross_ingress));
2098 }
2099 steps
2100}
2101
2102/// Human-readable duration for the prove-time report.
2103fn fmt_duration(secs: f64) -> String {
2104 if secs >= 3600.0 {
2105 format!("{:.1}h", secs / 3600.0)
2106 } else if secs >= 60.0 {
2107 format!("{:.0}m", secs / 60.0)
2108 } else {
2109 format!("{secs:.0}s")
2110 }
2111}
2112
2113/// One-line prove-time report fragment shared by [`shard_esp`] and
2114/// [`shard_esp_cap`]: total steps across all shards plus the wall-clock estimate
2115/// at the requested `parallelism` (and the sequential baseline).
2116fn prove_report(
2117 profile: &BlockProfile,
2118 shard_of: &[u32],
2119 manifest: &ShardManifest,
2120 parallelism: usize,
2121) -> String {

Callers

nothing calls this directly

Calls 5

blockMethod · 0.80
delta_edgeMethod · 0.80
partitionMethod · 0.80
addrFunction · 0.70
finishMethod · 0.45

Tested by

no test coverage detected