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

PLT-9014 Query volume benchmarking for Marlowe Runtime #795

Merged
merged 5 commits into from Jan 8, 2024
Merged

Conversation

bwbush
Copy link
Collaborator

@bwbush bwbush commented Jan 5, 2024

This PR provides configurable volume/load tests for the following Marlowe Runtime protocols:

  • BulkSync
  • HeaderSync
  • Sync
  • Query

See https://github.com/input-output-hk/marlowe-cardano/tree/PLT-9014/marlowe-benchmark#readme for documentation and example output.

Subsequent PRs will address other protocols and data management for reporting.

Pre-submit checklist:

  • Branch
    • Tests are provided (if possible)
    • Test report is updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
    • Relevant tickets are mentioned in commit messages
    • Formatting, PNG optimization, etc. are updated
    • Operables are updated with changes to executable command line options.
    • Deploy charts updated with changes to operables.
  • PR
    • Self-reviewed the diff
    • Useful pull request description
      • Review required
      • Substantial changes to code, test, or documentation
      • Change made to Marlowe validator (@bwbush and @palas must be included as reviewers)
      • Review not required
      • Minor changes to non-critical code, documentation, nix derivations, configuration files, or scripts
      • Formatting, spelling, grammar, or reorganization
    • Reviewer requested

@bwbush bwbush self-assigned this Jan 5, 2024
run metric pageSize query filters =
do
start <- liftIO getPOSIXTime
Statistics{..} <- foldlM ((runMarloweQueryClient .) . benchmark start pageSize) def filters
Copy link
Contributor

Choose a reason for hiding this comment

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

Note because MarloweQueryClient is a monad this could be

Suggested change
Statistics{..} <- foldlM ((runMarloweQueryClient .) . benchmark start pageSize) def filters
Statistics{..} <- runMarloweQueryClient $ foldlM (benchmark start pageSize) def filters

The difference is that you don't establish a new connection for each filter. I'll leave it up to you to decide if this is what you want or not.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I kept that foldM outermost because I thought that might be a bit more stressful to the backend service. Normally, I would have put runMarloweQueryClient on the outside, for efficiency.

Copy link
Contributor

@jhbertra jhbertra left a comment

Choose a reason for hiding this comment

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

Nice, I think this a good place to start the design.

@bwbush bwbush enabled auto-merge January 8, 2024 12:50
@bwbush bwbush merged commit d3f70cb into main Jan 8, 2024
6 checks passed
@bwbush bwbush deleted the PLT-9014 branch January 8, 2024 13:52
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

3 participants