profiling

  • The command bus we removed

    A command bus introduced in 2021, and 88 commands with one handler each. A stack trace with four frames of dispatch before the work.

  • A year of property hooks, and the three I would not write again

    218 methods became properties in December 2024, and a year of living with a syntax that hides work.

  • A profile of the queue worker rather than the request

    Months of profiling the web path, and a queue worker consuming three times the CPU that nobody had ever looked at. Profiling follows attention and attention follows user-visible…

  • Normalising two years of slow queries into eleven shapes

    Two years of a rotating slow query log, aggregated for the first time. Ranking by total time rather than by per-call time is what makes the list actionable,…

  • Two years of query logs, read once

    A slow query log rotating for two years and never aggregated, and performance work driven by whoever complained loudest.

  • The endpoint that was slow for one customer

    A healthy p95 and one customer for whom the endpoint takes four seconds. An aggregate metric that averages away the only case that matters.

  • A generator that made a report fit in memory

    A monthly export building a four hundred thousand row array before writing a single byte. The generator only helps if the source is also lazy — a cursor…

  • A profile taken on the machine that was actually slow

    Three days of profiling locally to explain a production slowdown that did not exist locally. A local profile measures the code and a production profile measures the system,…

  • Sampling traces at five per cent, keeping every error

    Full tracing on a service doing forty thousand requests a day is a data volume problem; sampling uniformly loses the requests worth looking at. Head sampling decides at…

  • A flame graph that pointed at autoloading

    Eleven per cent of a request spent in the autoloader, on a machine where the optimised classmap had not been generated. The authoritative flag turns every autoload into…