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

SwingSet benchmarking tool, phase 1 #8239

Merged
merged 9 commits into from
Aug 29, 2023
Merged

SwingSet benchmarking tool, phase 1 #8239

merged 9 commits into from
Aug 29, 2023

Commits on Aug 29, 2023

  1. feat: a couple of tweaks to swingset-runner in preparation for benchm…

    …ark stuff
    
    - Change the default parity of init vs. resume: The `--init` command line option
      is now redundant as it is now the default (though it is still supported for
      backwards compatibility).  In its place is a new `--resume` option with the
      same meaning of the older (also still supported) `--noinit` option.  What this
      means is that absent command line parameters to the contrary, the default
      behavior of a swingset-runner execution will be to re-initialize the kernel
      state at the start of a run.  This is a UX simplification, a reflection of the
      fact that in practice we found we wanted `--init` about 99% of the time, while
      exercising swingset resumption was very rare.  Various scripts that depended
      on the old default behavior have been updated for the new world order.
    
    - There is a new command line option `--usebundlecache` that if present will
      configure the swingset being run to use a bundle cache.  This will noticeably
      speed up successive executions of swingsets to a lot of bundling (for example,
      if the have a lot of vats).  The bundle cache will be placed in the same
      directory with the swingstore (which is also typically where the swingset's
      source files and config file (if it has one) are maintained).
    FUDCo committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    ee623da View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1277176 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9e0272c View commit details
    Browse the repository at this point in the history
  4. fix: remove infelicitous awaits in proposals

    Remove awaits that were blocking bootstrap from completing because they were
    waiting on events that can only happen after bootstrap is done, while taking
    care to log any rejections that these post-bootstrap activities yield.
    FUDCo committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    838ed96 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ca0a3aa View commit details
    Browse the repository at this point in the history
  6. feat: add whole-swingset benchmark mode, enabled via --sbench

    In this mode, the configured swingset is loaded indirectly, interposing a
    swingset-runner-provided benchmark controller as the swingset's bootstrap vat.
    The benchmark author is expected to provide a benchmark driver vat in a file
    named `vat-benchmark.js` adjacent to the swingset's config file.  The benchmark
    driver vat is expected to expose the methods `setup` and `runBenchmarkRound`.
    The controller bootstrap invokes the swingset's "real" bootstrap and then tells
    the benchmark driver vat to perform setup for the benchmark.  It then serves as
    a controller for triggering the execution of the directed number of bootstrap
    rounds.
    
    See demo/vaultPerfTest/vat-benchmark.js for an example.
    FUDCo committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    13f39b8 View commit details
    Browse the repository at this point in the history
  7. feat: add an ersatz Cosmos chain emulation mode to swingset-runner

    This mode is invoked via the `--chain` command line option.  It adds bridge and
    timer devices, simulated chain storage, and kicks off bootstrap using the core
    proposals manifest mechanism.  This is an attempt to provide a minimal emulation
    of the services provided by cosmic-swingset without actually putting
    cosmic-swingset itself into the mix.  I expect the functionality here to evolve
    considerably as we add more chain benchmarks.
    FUDCo committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    5c08637 View commit details
    Browse the repository at this point in the history
  8. feat: implement swingset-runner based version of the vaults benchmark

    Note: This commit also includes the stripped version of the Ava-based vaults
    benchmark, which is like the regular Ava-based benchmark but has had all the
    timing and data collection code removed from it (making it much shorter and
    easier to read) in the expectation of external rather than internal measurement.
    This was an engineering stepping stone to getting the benchmark to run inside a
    swingset, but is being committed to the repo because we suspect it may be a
    useful reference in the future.
    FUDCo committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    6593570 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9777c3a View commit details
    Browse the repository at this point in the history