()
| 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. |
| 2103 | fn 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). |
| 2116 | fn prove_report( |
| 2117 | profile: &BlockProfile, |
| 2118 | shard_of: &[u32], |
| 2119 | manifest: &ShardManifest, |
| 2120 | parallelism: usize, |
| 2121 | ) -> String { |
nothing calls this directly
no test coverage detected