diff options
| author | Kamen Mladenov <kamen@syndamia.com> | 2025-04-30 17:25:15 +0300 |
|---|---|---|
| committer | Kamen Mladenov <kamen@syndamia.com> | 2025-05-02 15:32:54 +0300 |
| commit | eefb57f2c035be1a398f630dd8cfed8b4ccbe348 (patch) | |
| tree | 598cc4a5d784addf59bad7323018260b977ed6c2 /zkvms_guest_io | |
| parent | 400c41f4f408aee6002489633914cd74ca888ff4 (diff) | |
| download | zkVMs-benchmarks-eefb57f2c035be1a398f630dd8cfed8b4ccbe348.tar zkVMs-benchmarks-eefb57f2c035be1a398f630dd8cfed8b4ccbe348.tar.gz zkVMs-benchmarks-eefb57f2c035be1a398f630dd8cfed8b4ccbe348.zip | |
feat(zkvms_guest_io): Output proof size
In each zkVM we'll write the size to /tmp/proof_size and then guest_io
will read that value and place it inside our metrics output. This is not
the most elegant, and in certain zkVMs the file output is a part of the
benchmark timing, but it will have to do.
Diffstat (limited to 'zkvms_guest_io')
| -rw-r--r-- | zkvms_guest_io/src/main.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/zkvms_guest_io/src/main.rs b/zkvms_guest_io/src/main.rs index 0e0cd37..4d9b378 100644 --- a/zkvms_guest_io/src/main.rs +++ b/zkvms_guest_io/src/main.rs @@ -34,6 +34,7 @@ struct Cli { static COMMAND_LOG_PATH: &str = "/tmp/output.log"; static METRICS_TEMP_OUTPUT_PATH: &str = "/tmp/current_metrics"; +static PROOF_SIZE_FILE_PATH: &str = "/tmp/proof_size"; fn run_command(zkvm_guest_command: &str, operation: &str) -> Result<std::process::Output, Error> { Command::new("runexec") @@ -196,6 +197,11 @@ fn main() { .unwrap(); run[operation] = json::parse(raw_data).unwrap(); run[operation]["memory"] = get_runexec_value(&stdout, "memory", 'B').parse::<u64>().unwrap().into(); + + let proofSize = &read_to_string(PROOF_SIZE_FILE_PATH) + .ok() + .unwrap(); + run[operation]["proofSize"] = proofSize.parse::<u64>().unwrap().into(); } runs["benchmarking"].push(run); |
