0xPolygonZero / zk_evm

Apache License 2.0
85 stars 37 forks source link

Change benchmark format #776

Open 0xaatif opened 1 week ago

0xaatif commented 1 week ago
          I think I'd prefer storing the data differently - how do you feel about saving off wide information as follows?

Get full information from time

/usr/bin/time \
  --format='{"command":"%C","avg_unshared_data_kb":%D,"elapsed_real_hms":"%E","pg_fault_io_major_ct":%F,"fs_inputs_ct":%I,"avg_mem_kb":%K,"max_rss_kb":%M,"fs_outputs_ct":%O,"cpu_pc":"%P","pg_fault_minor_ct":%R,"cpu_kernel_secs":%S,"cpu_user_secs":%U,"swap_ct":%W,"avg_shared_text_kb":%X,"system_pg_size_bytes":%Z,"ctx_switch_forced_ct":%c,"elapsed_real_secs":%e,"signals_recv_ct":%k,"avg_unshared_stack_kb":%p,"socket_recv_ct":%r,"socket_sent_ct":%s,"avg_rss_kb":%t,"ctx_switch_yield_ct":%w,"exit_status":%x}' \
  --output time.json \
  "$COMMAND" \
  "$ARGS"

Combine information as follows

{
  "commit": $hash,
  "date": $date,
  "runner": {
    "name": $runner,
    "cores": ...,
    "arch": ...,
  },
  "time": {
    // from time.json
  },
}

I would strongly prefer moving away from bash scripts too - can we do the above in xtask?

_Originally posted by @0xaatif in https://github.com/0xPolygonZero/zk_evm/pull/701#pullrequestreview-2418278837_