Skip to content

Commit 8e3fcc1

Browse files
committed
Tests: store PgoConfig instead of pre-computed PgoData
The previous commit shipped `compile_exe` with an ugly `make_pgo_profile` closure that captured a pre-computed `Option<ExecutionProfile>` and just handed it back when called. That asymmetry was a smell — the production paths (CLI, openvm-eth) hand the pipeline a `PgoConfig` carrying serialized inputs, and the closure deserializes + runs the guest to *compute* the profile. This commit aligns the tests with the production shape: - `GuestTestConfig.pgo_data: PgoData` becomes `pgo_config: PgoConfig`. - A test-local static `make_pgo_profile` deserializes a `StdIn` from `inputs` and calls `execution_profile_from_guest` — same contract as the CLI's version. - `pgo_config_from_stdin(pgo, max_cols, &stdin)` and `none_pgo_config()` helpers replace the ad-hoc `PgoData::{Cell,Instruction}(profile, …)` constructions. - `compile_exe` collapses to a 3-liner: build the `StagedPipeline`, apply `with_select_defaults`, call `setup`. No more `Option<ExecutionProfile>` capture dance. - Test call sites drop the pre-computed `execution_profile_from_guest(&guest, stdin.clone())` lines entirely (the pipeline now computes the profile internally on the cache-miss path). - `prove_simple` / `prove_mock` / `prove_recursion` / `compile_and_prove` take `PgoConfig` directly.
1 parent 833667e commit 8e3fcc1

1 file changed

Lines changed: 161 additions & 171 deletions

File tree

0 commit comments

Comments
 (0)