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

Added a skeleton benchmark suite + mockup queries #203

Merged
merged 1 commit into from
Mar 23, 2020

Conversation

tuomohopia
Copy link
Contributor

Based on the brief discussion here I built up a skeleton for microbenchmarking query rendering. As it is, it's probably not useful but meant to act as a foundation to build a real benchmark suite on.

Run via stack bench.

Queries with parameters

What I don't understand is how the query actually gets composed with its params when running manipulateParams_ ....

There's lots of extra noise here, mostly because I wrote some facilities to auto-generate manipulations with different params based on the data types.

The idea was to facilitate benchmarking queries rendered with auto-generated parameters. I mean benchmarking building up the full ByteString that actually gets sent to Postgres.

I don't expect this to be merged, I just want to know if I'm heading down the right path trying to help with the slow query rendering issue or not.

@echatav
Copy link
Contributor

echatav commented Mar 23, 2020

Fantastic! Thanks for contributing this. Just noting some ideas to add later:

benchmark time to connect
benchmark running manipulations and queries
benchmark generic decoding and encoding of rows, params, composites and enums
benchmark hand-written decoding and encoding of rows, params, composites and enums
benchmark basic value decoder and param encoders
benchmark very large / complex query rendering
experiment with using Builders instead of ByteStrings
experiment with applying strictness and forcing

@echatav echatav merged commit 79b8af6 into morphismtech:dev Mar 23, 2020
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.

2 participants