Performance measurement and experiment design
Worked example
This is an offline lesson. Data are fictional and Docker commands are unexecuted. Any optional execution requires an authorized disposable VM, a verified context, synthetic data, restricted access and no external transmission. Do not collect secrets or private output. Before any separately authorized Docker query, verify the effective endpoint and builder (including environment overrides), not just the context name. Use only disposable lab resources; a failed check is a stop condition, not permission to retry against a different host.
Synthetic experiment, not measured Docker output:A elapsed seconds: 12, 14, 13, 30, 11B elapsed seconds: 10, 11, 12, 10, 12median A = 13 s; median B = 11 srelative reduction = (13 - 11) / 13 = 15.38%Keep the 30 s observation; investigate its cause.Record OS, kernel, CPU, RAM, engine/builder version, platform,image digest, exact command, input, cache state and sample count.Measure wall-clock elapsed time with a monotonic timer; distinguish it from total CPU time. Use fixed input, equivalent correctness tests, repeat runs, and alternate A/B order where practical to reduce drift. Separate warm-up, warm-cache and cold-cache conditions. Report sample count, median and spread; do not drop slow samples merely because they are inconvenient. A median hides tail behavior and a small sample does not establish a reliable p99. Record concurrent activity and resource limits. Stop if resource budgets or correctness checks fail. A percentage reduction uses the baseline as denominator; it is not the same as a speedup ratio. Do not compare results across architectures, engine backends or workloads as though those factors were controlled. The practice medians are 21 s and 18 s, a 14.29% reduction and a 1.167x speedup. Report the range or another named dispersion measure and retain failed trials in a separate outcome count. Five observations cannot establish tail percentiles or a causal improvement.
Common mistake
One fast run is not evidence of a stable improvement. Preserve raw samples, including failures, and distinguish observed data from hypotheses.
Manual practice
Compare synthetic A=[20,22,18,24,21] with B=[16,17,19,18,20]. Calculate both medians, percentage reduction and speedup ratio. Write a record template and name two confounders.
Worksheet: lab-fixtures/docker-performance-engineering/01-methodology/scenario.txt.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Performance measurement and experiment design — Knowledge check
Interpret performance evidence and make a safe operational decision.
What is the median of baseline samples?
What belongs in the comparison record?
Can five samples establish a dependable p99?