Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add pact-breakdown tool #1785

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

add pact-breakdown tool #1785

wants to merge 2 commits into from

Conversation

chessai
Copy link
Contributor

@chessai chessai commented Nov 28, 2023

This PR adds a POC cwtool (subcommand pact-breakdown) that takes a pact database directory and outputs a report breaking down the pact state in extreme detail. This includes size information of each table, pact value, module, etc. It also includes interesting things like "how many nulls are there, and what kind of null are they? (e.g. null info)". It also includes how much size index tables take up. Here's a prefix of the output:

{
  "size": "5.76 GB",
  "null_counts": {
    "bool": 463922,
    "chain_id": 61562,
    "def_body": 146,
    "docs": 1998,
    "imports": 468,
    "info": 260023,
    "meta": 2088,
    "module_hash": 785,
    "module_namespace": 232003,
    "pact_exec": 36178909,
    "yield": 280
  },
  "table_type_sizes": {
    "pact_sys": 3.99 GB,
    "user": 1.61 GB,
    "ix": 584.16 MB
  },

It's missing some of the size info. I haven't done a tally of what all is missing. This tool isn't critical and it's not clear if we actually need this level of granularity. Putting a pin in this for now.


@chessai chessai mentioned this pull request Nov 28, 2023
@chessai chessai marked this pull request as draft November 28, 2023 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant