-
-
Notifications
You must be signed in to change notification settings - Fork 4
add supabase read and write benchmarking #1
Conversation
Looking good Inian I think Steve has been using the Chinook database for testing (see here, moving to supabase/benchmarks#9 ). @steve-chavez - we are thinking of storing the results into a Supabase project so that we can track the changes over time. Inian has made a good starting schema, you may want to add feedback so that you can store the PostgREST benchmarks in there too? |
supabase/README.md
Outdated
|
||
-- BENCHMARKING-DATA | ||
create table public.benchmarks ( | ||
id uuid not null primary key, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about creating the uuid in postgres instead of js?
id uuid not null primary key, | |
id uuid default uuid_generate_v4 () not null primary key, |
Then you could delete the function uuidv4()
in the js files, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the tip @steve-chavez. Moved uuid generation to pg in the recent commit.
supabase/package.json
Outdated
"description": "scripts for benchmarking different aspects of the system", | ||
"main": "read.js", | ||
"scripts": { | ||
"benchmark": "npm run cleanup && npm run benchmark-read; npm run benchmark-write; npm run write-results-to-db", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An mkdir output
should be added here, otherwise the k6 summary export fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes :) I just realised it when writing the github action.Added it in the latest commit.
Yes. the chinook tables are more realistic. This schema is a great start though, Chinook can be added on a later PR. (Also if we agree on the schema, we could see the difference on KPS reads/writes and PostgREST reads/writes).
This works great, much better than messing with json files. Thanks a lot Inian. (Too bad k6 doesn't support sending the metrics on the script directly: grafana/k6#351) |
@kiwicopple I think this PR can be merged. I will add the chinook db implementation in another PR. |
Nice! 🎉 |
What kind of change does this PR introduce?
Adds scripts to do read and write benchmarking of the end to end Supabase system. The results are then uploaded to your benchmarks table in your Supabase project.