jeudi 27 février 2020

How to evaluate efficiency of performance optimisations?

I've made some optimizations to an API, and I want to get average response time from calling some endpoint (actually it is large graphql query). In the result I want to know whether the optimizations to the API improved the response time how greatly.

Locally, I've written some function that calls graphql-request in loop serially (one request per iteration) for specified number of times and sums up response timing from each request made (and calculates other stats).

I'd like to know:

  1. If there already a library, that does the same thing, that I could use (that makes serial requests and gathers total request time)?
  2. Is it a good practice to gather request time, making serial requests (maybe parallel queries will provide the same info, but in shorter time)?
  3. How this kind of testing is called (it is definitely not load testing)?
  4. If it is a valid way to test API, then how many requests should I make to an API (right now I am making 10)
  5. Are there other ways to evaluate efficiency of performance optimizations?

Aucun commentaire:

Enregistrer un commentaire