Tutorials › Optimal Design and Model-Informed Dosing › Performance Requirements for Point-of-Care Calculations

Model-Informed Precision Dosing in Practice · Tutorial 370 of 497

Performance Requirements for Point-of-Care Calculations

You will learn to turn clinical workflow needs into measurable performance requirements and evaluate them with workload-based tests.

Advanced 10 min read

What You'll Learn

  • Distinguish end-to-end response time from model-execution time.
  • Set percentile-based latency targets tied to clinical workflows.
  • Specify throughput, concurrency, burst, and capacity-headroom requirements.
  • Define availability measures, denominators, and service windows explicitly.
  • Design workload tests that reveal queueing, dependency, and resource bottlenecks.
  • Diagnose common errors in performance measurement and interpretation.

Why Performance Is a Clinical Requirement

A dosing calculation can be numerically correct and still be operationally unsuitable if it arrives too late, cannot serve the expected number of requests, or is unavailable when clinicians need it. Performance requirements therefore belong in the service specification alongside the calculation’s inputs, outputs, and verification criteria. The requirement is not simply “fast enough”: it identifies what is measured, under which workload and system conditions, and what result counts as passing.

For a point-of-care service, performance is usually described using three related but distinct properties: response time, throughput, and availability. Response time concerns how long an individual request takes. Throughput concerns how many requests the system can complete per unit time while meeting its response-time target. Availability concerns whether a valid request can obtain a usable result when the service is expected to operate. A system may perform well on one measure and poorly on another.

Requirements should reflect the clinical workflow and the service boundary. If the clinician initiates a request from an electronic health record (EHR), a model service might need to retrieve data, execute the model, and return a recommendation. Measuring only the model’s computation time omits the time spent in those other steps. The earlier material on mapping the clinical workflow and writing testable use-case specifications provides the context for deciding which steps belong inside the performance measurement.

Define the Measures Before Setting Targets

Definition: Response time (or latency) is the elapsed time between a specified request event and a specified completion event. Throughput is the number of requests successfully completed per unit time under a stated workload. Availability is the extent to which the service is usable when required, measured using a defined time-based or request-based rule.

A response-time requirement should name its start and end points. For example, it might begin when the EHR submits a complete, valid dosing request and end when the EHR receives a complete response. That is an end-to-end measure. A separate model-execution measure can help diagnose bottlenecks, but it does not replace the end-to-end measure when the clinical concern is how long the user waits.

Latency varies across requests. Reporting only the mean can conceal a slow tail: most requests might be quick while a small but important fraction takes much longer. A percentile is a threshold below which a stated proportion of observed response times falls. If the 95th percentile is 2 seconds, approximately 95% of measured requests completed in 2 seconds or less; the remaining requests took longer. Percentile targets should be paired with a measurement window, workload, and a clear rule for timeouts and failed requests.

A performance requirement is testable only when its measurement conditions are explicit. Specify, as relevant, the request mix, arrival pattern, number of concurrent users or requests, duration, system configuration, and whether dependencies are included. A service measured with a single request at a quiet time has not thereby demonstrated performance during a busy clinic period.

Worked Example: Testing a Response-Time Target

Suppose a hypothetical dosing service has a stated target: for a representative workload, the 95th-percentile end-to-end response time must be at most 2.0 seconds, and the 99th percentile must be at most 3.0 seconds. In a test, 1,000 valid requests are submitted under the specified workload. The response times are sorted from shortest to longest. The 950th response time is 1.74 seconds and the 990th is 3.80 seconds.

Check the 95th percentile. For this illustration, use the nearest-rank position \(\lceil 0.95 \times 1000\rceil=950\). The measured 95th-percentile response time is 1.74 seconds. Since \(1.74 \le 2.0\), the 95th-percentile requirement passes.

Check the 99th percentile. Its nearest-rank position is \(\lceil 0.99 \times 1000\rceil=990\). The measured 99th-percentile response time is 3.80 seconds. Since \(3.80 > 3.0\), the 99th-percentile requirement fails.

The service does not pass the full response-time specification, even though it meets the 95th-percentile target. The result describes this test workload and measurement window; it does not establish that the same percentiles will hold under every workload or production condition.

Throughput, Workload, and Capacity

Throughput targets need a workload definition. State the expected arrival rate, whether arrivals are steady or bursty, the request mix, and how long the target must be sustained. Also state the response-time and error-rate conditions that must hold at that rate. A high count of completed requests is not evidence of adequate capacity if response times become unacceptable or requests fail.

Capacity planning commonly includes headroom: the tested rate is set above the expected peak so that ordinary variation does not immediately push the system into overload. Headroom is a design choice, not a universal constant. It should be justified from expected demand, uncertainty, and the consequences of falling behind. A service might be required to sustain a specified peak rate for a defined period, while also passing a separate test for short bursts.

A useful relationship for interpreting concurrency is Little’s law. In a stable system over a sufficiently long interval, the average number of requests in the system equals the average arrival rate multiplied by the average time each request spends in the system. In symbols, if \(\lambda\) is the average arrival rate in requests per second, \(W\) is the average time in seconds, and \(L\) is the average number of requests in the system, then:

$$ L = \lambda W $$

This relation is not a capacity guarantee. It assumes the measured system is stable over the interval and that the averages refer to the same system boundary and request population. It is useful for estimating concurrent work and for recognizing queue growth: if requests arrive faster than the system completes them for a sustained period, the backlog grows instead of reaching a stable average.

Worked Example: Converting a Peak Workload Into a Test Target

A hypothetical clinic estimates a peak arrival rate of 12 valid dosing requests per second. The service specification adds 50% headroom, so the sustained test target is:

$$ 12\ \text{requests/s} \times 1.50 = 18\ \text{requests/s} $$

The test is planned for 30 minutes, or \(30 \times 60=1{,}800\) seconds. At 18 successful completions per second, the expected completed request count is:

$$ 18\ \text{requests/s} \times 1{,}800\ \text{s} = 32{,}400\ \text{requests} $$

Suppose the measured average end-to-end response time during the target-rate test is 0.80 seconds and the system is stable. Little’s law gives an average of \(L=18 \times 0.80=14.4\) requests in the system. This is an average, not a requirement that exactly 14 or 15 requests be active at every instant. The test passes the throughput criterion only if the service sustains the target rate while also satisfying its specified latency and error-rate criteria, with no persistent increase in backlog.

Availability: Specify the Denominator and Window

Availability is easy to misstate when the measurement rule is vague. A time-based measure can define availability as the fraction of a specified service window during which the service is usable. A request-based measure can define it as the fraction of eligible requests that receive a usable response under the stated criteria. These measures answer different questions, so a requirement should name the chosen measure and define what counts as usable.

For a time-based target, 99.9% availability means that 0.1% of the defined service window may be unavailable. In a 30-day month with continuous service required, the window contains \(30 \times 24 \times 60=43{,}200\) minutes. The corresponding unavailable time is:

$$ (1 - 0.999) \times 43{,}200\ \text{minutes} = 43.2\ \text{minutes} $$

The service window must be stated. If planned maintenance is excluded, that exclusion should be explicit and consistently applied; if the clinical workflow requires the service during maintenance, excluding it may hide a clinically relevant interruption. Likewise, a request-based metric needs a defined denominator. For example, it might include all valid requests submitted during the measurement period, with a usable response defined as a complete response returned within the specified timeout. Invalid requests may be excluded, but the exclusion rule should be established before testing.

Worked Example: Evaluating Request-Based Availability

In a hypothetical one-month evaluation, 100,000 eligible requests are submitted. A request counts as successful only if it returns a complete response within the specified timeout. There are 99,930 successful requests.

The request-based availability measure is:

$$ \frac{99{,}930}{100{,}000} \times 100\% = 99.93\% $$

If the target is at least 99.9% of eligible requests, the observed result meets that target because \(99.93\% \ge 99.9\%\). The remaining 70 requests did not meet the success rule. This request-based result does not imply that the service was available for 99.93% of the month: periods with few requests contribute little to this denominator. A time-based availability target, if required, must be measured separately.

Design Tests That Represent Clinical Conditions

Performance testing should represent more than an average day. A useful test plan covers the expected request mix and plausible demanding conditions, while keeping the test environment and measurement boundary clear. For a dosing service, requests may differ in model, input pattern, data-retrieval needs, and computation path. If only the simplest request type is tested, the result may not represent the workload that matters.

1
Translate workflow into measurable events.
Choose the request-start and response-completion events, and state which components are inside the end-to-end boundary.
2
Define the workload.
Specify request types, expected and peak arrival rates, burst patterns, concurrency, and test duration.
3
Set pass criteria together.
Pair latency percentiles with throughput and success criteria so that a fast but failing or overloaded service cannot pass.
4
Measure and inspect the run.
Record the distribution of response times, completed and failed requests, timeouts, resource use, and evidence of queue growth.
5
Repeat under relevant conditions.
Test representative configurations and constrained conditions, and document which conditions were and were not exercised.

Diagnostics help distinguish a true performance problem from a misleading test. Compare end-to-end latency with component-level timings to locate where time is spent. Examine percentiles rather than only averages, and check whether slow requests cluster around a particular request type, dependency, or load period. A rising queue or increasing latency during a sustained-rate test suggests that the system is not keeping pace with arrivals. A test that never exercises realistic concurrency, dependency delays, or the intended model configuration cannot support claims about those conditions.

Common Mistakes, Alternatives, and Limits

  • Using only average latency. The mean can hide slow requests. Report relevant percentiles and the measurement conditions.
  • Timing only model execution. This omits delays between the clinical request and the returned result. Use end-to-end latency for an end-to-end workflow requirement, with component timings for diagnosis.
  • Reporting a throughput number without latency or failures. Count successful completions at the target rate and require latency and error criteria to hold at that same workload.
  • Calling a service available based on an undefined uptime figure. Specify the service window, denominator, success rule, timeout, and maintenance treatment.
  • Extrapolating from a small or convenient test. A quiet single-request test does not establish performance under peak load, and one load-test run does not prove every production condition.

Time-based and request-based availability are alternatives, not interchangeable labels. Time-based measurement is useful when the service must be ready throughout a defined operational window, including periods with few requests. Request-based measurement directly describes the proportion of submitted eligible requests that succeed under a specified rule. Depending on the workflow, both may be valuable. Similarly, mean response time is compact and useful for some comparisons, but percentile requirements better expose a slow tail. No single metric captures every performance concern.

A performance test does not establish that the dosing recommendation is clinically appropriate; computational verification and clinical validation address different questions. Nor can a finite test guarantee performance under every future workload, dependency failure, or infrastructure change. The test report should therefore state the conditions tested and the limits of the evidence. Requirements are most useful when they are measurable, clinically motivated, and tied to conditions that can be reproduced.

Key takeaway: Define response time, throughput, and availability with explicit boundaries, workloads, denominators, and pass criteria. Evaluate them together: a usable point-of-care service must return responses promptly, sustain realistic demand, and meet its availability rule.

Check Your Understanding

Answer each question, then compare with the worked solutions below.

  1. A test has 500 sorted response times. Using the nearest-rank convention, which observation gives the 95th percentile?
  2. A service must sustain 10 requests per second for 15 minutes. How many successful completions does that rate imply if it is maintained throughout?
  3. For a 14-day continuous service window, how many minutes of unavailable time correspond to 99.5% time-based availability?
  4. A service has average arrival rate 8 requests per second and average time in the system of 1.25 seconds. Under stable conditions, what is the average number of requests in the system?

Solutions. (1) The nearest-rank position is \(\lceil 0.95 \times 500\rceil=\lceil 475\rceil=475\), so use the 475th sorted observation. (2) Fifteen minutes is \(15 \times 60=900\) seconds; \(10\ \text{requests/s} \times 900\ \text{s}=9{,}000\) successful completions. (3) The window is \(14 \times 24 \times 60=20{,}160\) minutes. The unavailable fraction is \(1-0.995=0.005\), so \(0.005 \times 20{,}160=100.8\) minutes. (4) Little’s law gives \(L=\lambda W=8\ \text{requests/s} \times 1.25\ \text{s}=10\) requests on average. This interpretation assumes a stable system and consistent measurement boundaries.

Clinical Biostats