Measuring Software Performance

  1. Define the Operation Before Timing It

    A timing report needs to state what work starts and ends the observation. Seemingly similar measurements can cover different stages.

    Undergraduate
  2. Interpreting Elapsed and CPU Time in a Benchmark

    Elapsed time includes waiting. CPU time reports how much execution was charged under an operating system's accounting rules.

    Undergraduate
  3. Measuring Throughput from Completed Work

    Throughput counts completed units per time interval. Submissions and queued tasks measure demand rather than delivered results.

    Undergraduate
  4. Latency With and Without Queue Delay

    A request's elapsed time may include waiting before processing starts. Measuring both intervals helps identify the dominant cost.

    Undergraduate
  5. Comparing Typical and Slow Request Durations

    A median describes the center of an ordered sample. Higher percentiles describe portions of the slower end under their chosen definition.

    Undergraduate
  6. How Equal Mean Latency Can Hide Different Experiences

    Time samples with the same mean can have very different spread and slow-case behavior.

    Undergraduate
  7. Warm-Up and Cold Start in Measurements

    Initial work can involve loading data or preparing execution. Later operations can reuse that work, changing what a benchmark measures.

    Undergraduate
  8. Warm and Cold Data Access

    A measurement can reuse cached data or wait for a lower-level source. State which data locality the workload represents.

    Undergraduate
  9. Timing More Than One Input Size

    Measurements at several input sizes help distinguish work primarily driven by fixed overhead from work growing with the input.

    Undergraduate
  10. Repeating Short Measurements

    Short operations may be comparable to timer or scheduling noise. Repeated measurements can reveal the range and reduce sensitivity to one observation.

    Undergraduate
  11. Timings and Operation Counts as Complementary Evidence

    An operation count explains a model of scaling. A timing observation captures a particular runtime, workload, and hardware environment.

    Undergraduate
  12. Reading a Sample-Based CPU Profile

    A sampling profiler periodically observes where execution is active. Frequent sampled stacks can suggest which portions account for CPU work.

    Undergraduate
  13. Inclusive and Self Time in a Call Report

    Inclusive time includes work in called routines. Self time attributes work directly to the measured function under the profiler's definition.

    Undergraduate
  14. Peak Retained Memory and Total Allocation

    Peak retention concerns how much memory stays live at once. Total allocation can grow through objects that are quickly discarded.

    Undergraduate
  15. Tracing the Stages of an End-to-End Request

    A request trace can associate stages and elapsed intervals with one observed operation so repeated slow paths can be inspected.

    Undergraduate
  16. Choosing a Representative Benchmark Workload

    A useful benchmark matches the proportions, sizes, and access patterns relevant to an actual question.

    Undergraduate
  17. Comparing Changes Under Similar Conditions

    A before-and-after comparison should vary the implementation while keeping the task and relevant measurement environment comparable.

    Undergraduate
  18. Throughput as Worker Count Changes

    Adding workers can increase capacity, but shared resources and coordination can limit the added throughput.

    Undergraduate
  19. Estimating the Effect of Speeding Up One Part

    The total time saved by an optimization depends on how much of the original run belongs to the improved component.

    Undergraduate
  20. Verifying Correctness While Measuring an Optimization

    A comparison needs to confirm that each version computes the promised result. Shortcuts omitting meaningful work can look fast.

    Undergraduate
  21. Recording Inputs for a Microbenchmark

    A microbenchmark measures a narrow operation under controlled inputs. Describe data shape and setup so another run tests the same work.

    Undergraduate
  22. Initial and Steady Memory Use

    A program can allocate setup data at launch and retain different structures while processing. Observe which stage a peak describes.

    Undergraduate
  23. Identifying Work Repeated for the Same Inputs

    A trace or profile may reveal one computation repeated under equivalent inputs. Confirm its result and effects before sharing it.

    Undergraduate
  24. Many Small Queries in a Single View

    A page can load its parent list once and then issue a separate query for information attached to each row. The number of operations grows with result size.

    Undergraduate
  25. Batching to Share Fixed Overhead

    A batch can combine many operations into fewer requests or writes. It can also change memory use, wait time, and recovery scope.

    Undergraduate
  26. 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.

    Undergraduate
  27. Evaluating Tail Latency at Different Load Levels

    A latency distribution can shift under load as queues, shared resources, and arrival patterns change.

    Undergraduate
  28. A Monotonic Clock for Elapsed Timing

    An elapsed-time clock can measure a duration without relying on jumps in display time caused by wall-clock adjustments.

    Undergraduate
  29. When a Benchmark Measures Buffering

    A function can return before underlying data transfers are complete. Measure the promised completion stage if downstream consumers need the finished result.

    Undergraduate
  30. Reporting a Performance Result with Its Scope

    Performance evidence is clearer when it includes workload, measured boundary, environment, sample count, and output verification.

    Undergraduate