Measuring Empty and Full Results Separately

An operation can spend time finding data and time serializing its result. Empty and full outputs may stress different parts of that path.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace a catalogue filter
  2. Document minimum useful output
  3. Separate lookup cost from producing many response rows
  4. Include successful absence and failures separately

Trace a catalogue filter

An indexed filter matching no rows can skip rendering entries. A full page can build titles, links, and summaries. Output size and work explain why identical query shape can cost differently.

Document minimum useful output

Measure a typical populated result as well as an empty one where meaningful. Representative workloads identify the variants to keep.[1]

Separate lookup cost from producing many response rows

A query returning no hits can still take time to establish absence. A full result can need additional mapping, serialization and transport. Measure both to avoid generalizing the faster case to common responses. See output work as a lower bound.

Small result → trace query and small response creation
Full result → record rows, serialization and bytes sent
Keep filtering scope and system state comparable

Include successful absence and failures separately

A slow dependency can fail before any rows arrive, which is a different measurement from an empty result. Verify status and response body before adding it to a performance sample.

References

  1. Google, Site Reliability Engineering ↩