benchmarking

  • The N+1 that does not appear in the query log

    340 queries on a page showing twenty rows, and none of them are slow. Every one is under the threshold, which is why the slow log has nothing…

  • A flame graph is faster to read than a call table

    A table sorted by inclusive time puts the entry point at the top and tells you nothing; sorted by exclusive time it hides the structure. The graph shows…

  • Window functions replace a habit

    8.0 went GA in April and the correlated subquery can retire. The plans before and after, the recursive CTE that replaces a loop, and the upgrade nobody expects.

  • Profiling with a sampling profiler instead of an instrumenting one

    An instrumenting profiler records every function call, which changes the timings it is measuring — small fast functions look disproportionately expensive because the overhead is per call. Sampling…

  • webpack-bundle-analyzer before optimising anything

    Guessing what is large in a bundle is unreliable, and the answer is frequently one dependency that pulled in a locale file for every language on earth. The…

  • Load testing with a think time, or the numbers are fiction

    A tool firing requests as fast as it can with no pause measures how fast the server can be saturated, which is not a number that corresponds to…

  • Measure the p99, because the average hides the incident

    An hourly spike that made every request four hundred milliseconds slower for two seconds moved the average by nine milliseconds and was invisible in every graph anyone looks…

  • Measure at the percentile that hurts

    A mean response time of 180ms is compatible with 5% of requests taking four seconds, and it is the 5% who write in. The average is the one…

  • Blackfire compares two profiles, which is the useful part

    A single profile tells you where the time goes and leaves the question of whether that is unusual. A comparison between two profiles answers the question you actually…

  • The DEL that blocked the server, and UNLINK

    A 400ms pause on every request, once an hour, caused by a cache cleanup nobody thought of as expensive. Redis is single-threaded, and freeing memory is work.