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

chore(swingset): add misc analysis tools #10037

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

warner
Copy link
Member

@warner warner commented Sep 6, 2024

This is a grab-bag of tools I've assembled over the last few years, to analyze slogfiles for various things (mostly timing and leaks). Some in JS, some in Python. I wanted to get them off my local hard drive and into the tree where other folks could benefit from them.

  • monitor-slog-block-time.py : I use this on a follower node to print a one-line summary of each block, from the slogfile

  • prune-transcripts.js : I run this on a copy of the swingstore DB to delete all the old transcript spans, since most of my analysis doesn't need them, and it reduces the size by about 90%.

  • follower-run-tools/ : I use these to measure size data about the original and pruned DB.

These tools are not TSC or eslint -clean: they use @ ts-nocheck and an .eslintignore to suppress complaints.

@warner warner added the SwingSet package: SwingSet label Sep 6, 2024
Copy link

cloudflare-workers-and-pages bot commented Sep 6, 2024

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: d50dd90
Status: ✅  Deploy successful!
Preview URL: https://74da5d96.agoric-sdk.pages.dev
Branch Preview URL: https://warner-swingset-misc-tools.agoric-sdk.pages.dev

View logs

@warner warner force-pushed the warner/swingset-misc-tools branch 7 times, most recently from aa23a16 to 71ebe36 Compare September 25, 2024 11:41
Copy link
Member

@gibson042 gibson042 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very partial review; pausing for a meeting.

I worry that there's a lot here which won't ever be cleaned up and will make it harder to find a particular tool in the future, but it's probably better to have these than not.

packages/SwingSet/misc-tools/audit-refgraph.py Outdated Show resolved Hide resolved
packages/SwingSet/misc-tools/audit-refgraph.py Outdated Show resolved Hide resolved
packages/SwingSet/misc-tools/block-times.py Outdated Show resolved Hide resolved
packages/SwingSet/misc-tools/my-build-mezzanine-db.js Outdated Show resolved Hide resolved
packages/SwingSet/misc-tools/bootstrap-exhaust-keyids.js Outdated Show resolved Hide resolved
packages/SwingSet/misc-tools/computrons-for-deliveries.py Outdated Show resolved Hide resolved
@gibson042 gibson042 self-requested a review September 27, 2024 17:59
@gibson042
Copy link
Member

I worry that there's a lot here which won't ever be cleaned up and will make it harder to find a particular tool in the future, but it's probably better to have these than not.

I thought more on this over the weekend... what about organizing the utilities into subdirectories or prefixes that indicate whether they consume [SwingStore] SQLite files, slog files, or "other"?

Copy link
Member

@gibson042 gibson042 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'm through all the Python scripts; next up is JavaScript.

packages/SwingSet/misc-tools/delivery-summary.py Outdated Show resolved Hide resolved
packages/SwingSet/misc-tools/delivery-summary.py Outdated Show resolved Hide resolved
packages/SwingSet/misc-tools/delivery-summary.py Outdated Show resolved Hide resolved
packages/SwingSet/misc-tools/delivery-summary.py Outdated Show resolved Hide resolved
packages/SwingSet/misc-tools/parse_timestamps.py Outdated Show resolved Hide resolved
packages/SwingSet/misc-tools/prune-transcripts.js Outdated Show resolved Hide resolved
packages/SwingSet/misc-tools/push-price-times.js Outdated Show resolved Hide resolved
packages/SwingSet/misc-tools/push-price-times.js Outdated Show resolved Hide resolved
packages/SwingSet/misc-tools/short-block-times.py Outdated Show resolved Hide resolved
@gibson042 gibson042 self-requested a review October 1, 2024 21:52
This is a grab-bag of tools I've assembled over the last few years, to
analyze slogfiles for various things (mostly timing and leaks). Some
in JS, some in Python. I wanted to get them off my local hard drive
and into the tree where other folks could benefit from them.

* monitor-slog-block-time.py : I use this on a follower node to print
  a one-line summary of each block, from the slogfile

* prune-transcripts.js : I run this on a copy of the swingstore DB to
  delete all the old transcript spans, since most of my analysis doesn't
  need them, and it reduces the size by about 90%.

* follower-run-tools/ : I use these to measure size data about the
  original and pruned DB.

These tools are not TSC or eslint -clean: they use @ ts-nocheck and an
.eslintignore to suppress complaints.

Thanks to @gibson042 for all the helpful improvements.

Co-authored-by: Richard Gibson <[email protected]>
@warner warner requested a review from a team as a code owner October 5, 2024 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SwingSet package: SwingSet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants