casper-network / casper-db-utils

Utilities to perform operations on the lmdb databases for a casper-node.
Apache License 2.0
1 stars 7 forks source link

Add `execution_results_summary` subcommand #24

Closed georgepisaltu closed 1 year ago

georgepisaltu commented 2 years ago

Fixes https://github.com/casper-network/casper-db-utils/issues/23

This PR implements the execution_results_summary subcommand. It takes the path to a storage.lmdb file and optionally an output file path for dumping the JSON, otherwise it uses standard output.

The output looks like:

{
  "execution_results_size": {
    "average": 1.5,
    "median": 2,
    "max": 3
  },
  "chunks_statistics": {
    "average": 1.5,
    "median": 2,
    "max": 3
  }
}

Added @sacherjj as a reviewer for the API and CLI usage only.