Comparisons

Two tools, two questions. Neither column wins — what decides is which question you actually have in front of you.

Microbenchmark vs End-to-end benchmark

A microbenchmark measures one operation precisely; an end-to-end benchmark measures the system approximately. The classic error is optimizing a function by 40% in isolation and moving p99 by nothing.

MicrobenchmarkOpen lesson →
Best for

Comparing two implementations of the same operation

Blind to

Whether the operation matters to the system at all

Costs

Cheap to run, easy to fool yourself with

Answers

"Is this function faster?"

End-to-end benchmarkOpen lesson →
Best for

Deciding whether a change is worth shipping

Blind to

Which component is responsible for the number it produces

Costs

Expensive to build and keep representative

Answers

"Did the product get faster?"

DimensionMicrobenchmarkEnd-to-end benchmark
ScopeOne function, warm and isolatedThe whole request path
Classic trapThe compiler optimized the work awayThe bottleneck was somewhere you did not vary
Use forChoosing between implementationsDeciding whether to ship