Recently I am working on a refactor of api. Doing the API in the right way might slightly bring performance issues, so I have worked on the measurement of performance in the development and in the production. Here is my learning:
In my humbor opinion, first of all, when the performance regression is tiny bit, it's much more critical in the front-end than in the back-end, because:
Then, we seems to have more performance metrics in the front-end than in the backend. In the front-end, we have invented many metrics, while in the backend side, API response time is always the key metrics.
By simply setting the timestamps with Date.now() and calculating the time difference. artillery seems like a good solution but I didn't try it.
It's interesting to see that when the cache system exists, the time duration for the multiple runs of the same API call could vary: the first call is longer because it needs to construct the cache.
With the monitor tool, for example, NewRelic, we can check the response time for a certain API during time.
As the before-release test shows, the response time has a peak once after the release because of the cache generation.
It's just a naive article about server side performance. I will have deeper understanding once I worked more on it.