nix(loadtest): avoid hitting the database when possible - #5055
nix(loadtest): avoid hitting the database when possible#5055wolfgangwalther wants to merge 3 commits into
Conversation
This allows returning the request's SQL query by setting the `Accept: application/vnd.pgrst.sql` header on the client-side. I opted to use a mimetype in our vendor namespace, because this needs to support a `for=` parameter from the beginning - queries differ depending on which mimetype would *normally* be requested. I mostly copied my way along the implementation of the `application/vnd.pgrst.plan` header and made adjustments where necessary. Resolves PostgREST#3580
| POST http://postgrest/films?columns=id,title,year,runtime,genres,director,actors,plot,posterUrl | ||
| Prefer: tx=rollback | ||
| Accept: application/vnd.pgrst.sql | ||
| # this bulk.json was obtained from https://github.com/erik-sytnyk/movies-list/blob/master/db.json | ||
| @bulk.json |
There was a problem hiding this comment.
This request probably doesn't make much sense anymore when queries are not actually run.
I am more and more convinced GHA flakiness drives us towards spending a lot of effort on testing the wrong thing - we are starting to chase performance differences in a place that has minuscule effect on the actual performance of PostgREST deployments, which is dominated by database queries. In other words: 20% difference in latency reported from load tests is going to have 0.2% or less effect on the actual performance. |
Since the mixed loadtests are dominated by the OpenAPI, #5054 needs to support that as well first. Once it does, the loadtests will be much more balanced between the requests.
It should be a good change, but I'm not sure whether this will have the desired stabilization effect in GHA.