(mut self, other: &Self)
| 173 | /// Time spent inside `intern_univ`. |
| 174 | intern_univ_ns: u64, |
| 175 | /// Number of `intern_univ` calls. |
| 176 | intern_univ_calls: u64, |
| 177 | /// Of those, fast-path hits. |
| 178 | intern_univ_get_hits: u64, |
| 179 | /// Time spent on `cache.get(&cache_key)` lookups in `ingress_expr`. |
| 180 | expr_cache_lookup_ns: u64, |
| 181 | /// Time spent on `cache.insert(...)` for `ExprFrame::Cache`. |
| 182 | expr_cache_insert_ns: u64, |
| 183 | /// Time spent in `ixon_env.get_blob` calls from the `Str`/`Nat` arms of |
| 184 | /// `ingress_expr` (does NOT include `resolve_kvmap`'s blob fetches — |
| 185 | /// those live inside `resolve_kvmap_ns`). |
| 186 | get_blob_ns: u64, |
| 187 | /// Number of those `get_blob` calls. |
| 188 | get_blob_calls: u64, |
| 189 | /// Total time spent inside the `ExprFrame::Process` arm body — covers |
| 190 | /// share expansion, cache check, arena walk, `resolve_kvmap`, the |
| 191 | /// per-variant match arms (KExpr constructor calls, stack pushes for |
| 192 | /// continuations), and `intern_expr` invocations from this arm. |
| 193 | /// Subtracting the inner timed sub-stages from this gives the cost of |
| 194 | /// "everything else": KExpr construction, match dispatch, frame |
| 195 | /// allocation, Arc clones, and minor lookups. |
| 196 | process_arm_ns: u64, |
| 197 | /// Total time spent inside continuation arms (`AppDone`, `LamDone`, |
| 198 | /// `AllDone`, `LetDone`, `PrjDone`, `LetVal`, `BinderPush`, `BinderPop`, |
| 199 | /// `AppArg`, `LamBody`, `AllBody`, `LetBody`, `Cache`). These build a |
| 200 | /// new KExpr from already-converted children and then call |
| 201 | /// `intern_expr`. Subtracting `intern_expr_ns` (continuation share) and |
| 202 | /// `expr_cache_insert_ns` (Cache arm) from this gives the cost of the |
| 203 | /// continuation-side KExpr construction + frame manipulation. |
| 204 | continuation_arms_ns: u64, |
| 205 | /// Time spent constructing KExprs at all 13 call sites in |
| 206 | /// `ingress_expr` — covers blake3 hashing, `intern_addr`, and the outer |
| 207 | /// `Arc<ExprData>` allocation. Excludes the subsequent `intern_expr` |
| 208 | /// call (separately timed). Bumped by every `KExpr::*_mdata` / |
| 209 | /// `KExpr::*` constructor we wrap. |
| 210 | kexpr_construct_ns: u64, |
| 211 | /// Number of timed KExpr constructor calls. |
| 212 | kexpr_construct_calls: u64, |
| 213 | } |
| 214 | |
| 215 | impl ConvertStats { |
| 216 | fn new(enabled: bool) -> Self { |
| 217 | ConvertStats { enabled, ..ConvertStats::default() } |
| 218 | } |
| 219 | |
| 220 | fn merge(mut self, other: &Self) -> Self { |
| 221 | self.enabled |= other.enabled; |
| 222 | self.expr_roots += other.expr_roots; |
| 223 | self.expr_process += other.expr_process; |
| 224 | self.expr_cache_hits += other.expr_cache_hits; |
| 225 | self.expr_cache_misses += other.expr_cache_misses; |
| 226 | self.expr_cache_inserts += other.expr_cache_inserts; |
| 227 | self.expr_cache_peak = self.expr_cache_peak.max(other.expr_cache_peak); |
| 228 | self.expr_cache_clears += other.expr_cache_clears; |
| 229 | self.expr_cache_entries_cleared += other.expr_cache_entries_cleared; |
no test coverage detected