Skip to content

test: split loadtests by request type #4123

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

Open
10 tasks
steve-chavez opened this issue Jun 2, 2025 · 0 comments
Open
10 tasks

test: split loadtests by request type #4123

steve-chavez opened this issue Jun 2, 2025 · 0 comments

Comments

@steve-chavez
Copy link
Member

Problem

Currently it's not possible to know accurately if performance is dropping or increasing on a PR based on deltas of the "mixed" loadtest, this is because all the requests types are contained in a single loadtest:

GET http://postgrest/
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.CUIP5V9thWsGGFsFyGijSZf1fJMfarLHI9CEJL-TGNk
Prefer: tx=commit
HEAD http://postgrest/actors?actor=eq.1
Prefer: tx=commit
GET http://postgrest/actors?select=*,roles(*,films(*))
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.CUIP5V9thWsGGFsFyGijSZf1fJMfarLHI9CEJL-TGNk
Prefer: tx=commit
POST http://postgrest/films?columns=id,title
Prefer: tx=rollback
@post.json
POST http://postgrest/films?columns=id,title,year,runtime,genres,director,actors,plot,posterUrl
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.CUIP5V9thWsGGFsFyGijSZf1fJMfarLHI9CEJL-TGNk
Prefer: tx=rollback
# this bulk.json was obtained from https://github.com/erik-sytnyk/movies-list/blob/master/db.json
@bulk.json
PUT http://postgrest/actors?actor=eq.1&columns=name
Prefer: tx=rollback
@put.json
PATCH http://postgrest/actors?actor=eq.1
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.CUIP5V9thWsGGFsFyGijSZf1fJMfarLHI9CEJL-TGNk
Prefer: tx=rollback
@patch.json
DELETE http://postgrest/roles
Prefer: tx=rollback
GET http://postgrest/rpc/call_me?name=John
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.CUIP5V9thWsGGFsFyGijSZf1fJMfarLHI9CEJL-TGNk
POST http://postgrest/rpc/call_me
@rpc.json
OPTIONS http://postgrest/actors
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.CUIP5V9thWsGGFsFyGijSZf1fJMfarLHI9CEJL-TGNk

More details at: #4097 (review)

Solution

Split the mixed loadtest into other loadtests by request type:

  • Root openapi
  • Read table (GET/HEAD)
  • Read table with resource embedding
  • Insert table single
  • Insert table bulk
  • Mutate table (PUT/PATCH)
  • Delete table
  • RPC GET
  • RPC POST
  • OPTIONS on table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant