Repository navigation
Why Is My First Scenario Slow
Often because it went first. The first request down each path pays the app's one-time warm-up: the JIT, a
GraphQL schema build, a first database connection. On BreakfastProvider's CI run of 2026-10-05 the run's first
POST /graphql took 55 to 115 times what later ones did, and whichever scenario made it carried the cost.
For each kind of call a test makes (its service, its method and its path with ids, numbers and timestamps folded;
a statement's templated head for a database), the run's first call is a first-call warm-up when it took at
least 10 times and 50 ms more than the median of the calls of its kind that started after it ended. A call that
started while it ran and waited for it is marked too. A first call that failed with a 5xx is compared only with
later calls that failed so. The app's own calls, a message a broker delivered or the test took from it, and the background are not judged, and a kind of call made
once is not judged either. A publish the test makes is judged (since 5.28.1). Since 5.17.0 a kind of call is read as history reads it: a GraphQL request by its
operation, so each operation on one endpoint is judged against its own calls, where every operation shared the
endpoint's median and a slow query hid behind fast ones; a statement past a prologue of SET statements, so EF Core's
SQL Server batches are judged by what they insert or update.
- The data files carry
warmUpon each marked call andwarmUpSecondson its scenario (Generated Reports);durationSecondsis unchanged. -
kronikol query summaryranks Slowest by each scenario's own time and says where the warm-up went;flowandinteractionsmark the calls;scenarios --slower-thanand the run diff's Slower read the time left (Querying Reports). - The HTML report (4.9.0) keeps a marked scenario's wall time as its duration badge and adds the warm-up as muted text,
2.0s · 1.5s warm-up, with the calls named when you hover over it; the Scenario Timeline shades the warm-up's share of the scenario's bar, and the P50 to P99 filter ranks each scenario by its own time (Generated Reports). -
HistoryShapeTemplates(Report Configuration) fold your own ids in the kinds of call too: without them an id the built-in templates do not know splits a kind, which only marks less.
On BreakfastProvider's CI run the rule marked 10 calls in 7 of 212 scenarios (xUnit) and 18 in 17 of 214 (ReqNRoll).
- A path called once. With nothing to compare it with, a single call's warm-up cannot be told from its work.
- A first call whose later calls all overlapped it. No call ran warm after it.
- An event-driven wait. A scenario that polls for an event waits on the app's consumer, whose first message pays the warm-up; the test's own calls are not slow.
-
A publish no table can read. At
Rawa broker's label is the HTTP verb, or holds Kafka's offset, andMessageTrackerwrites a scheme of its own, so those are not judged. - A second host. A test that builds its own host pays part of the warm-up again. Only the run's first call of each kind is judged, and nothing records which host served a call.
- Parallel lanes. Only a call that overlaps the first is judged a waiter, so a later call that is still slow is not marked.
- Several processes in one ingest (Ingesting External Captures): each kind's first call across all the files is judged, and another process's own first call is not.
Measured on BreakfastProvider's xUnit lane: as it is, the run's first POST /graphql took 440 and 737 ms against
later medians of 7.0 and 5.4 ms. With HotChocolate's InitializeOnStartup() it took 108 ms, and with
InitializeOnStartup(warmup: ...) running a real query 25 ms, and that call was not marked.
- Send one request down each expensive path before the first scenario, from an assembly or collection fixture, through a client Kronikol does not track (or a tracked one outside any test, whose calls land in no scenario).
- For HotChocolate,
InitializeOnStartup(warmup: (executor, ct) => ...)with a real query: the schema alone leaves a first execution of about 100 ms. It runs as a hosted background service, so a suite whose first scenario is a GraphQL one can still wait on it. - The trade: a warm-up hides the first-request cost production users pay after a deploy. If that matters, test it on purpose, in a scenario of its own, and let the mark show it.
Home · 🔍 Search this wiki Full-text search across every page. The “Pages” list above matches page and heading names, not page content.
Getting Started
- Quick Start (xUnit)
- Project Templates
- AI Integration Prompt
- Framework Integration Guides
- Migrating to v5
- Migrating to v4
Common Tasks
Integration Guides
- Integration xUnit3
- Integration xUnit2
- Integration NUnit
- Integration MSTest
- Integration TUnit
- Integration BDDfy xUnit3
- Integration LightBDD xUnit2
- Integration LightBDD xUnit3
- Integration LightBDD TUnit
- Integration ReqNRoll xUnit2
- Integration ReqNRoll xUnit3
- Integration ReqNRoll TUnit
- Integration Playwright
Uninstrumentable / polyglot backends
- Integration ProxyTap Extension
- Integration TcpTap Extension
- Integration Otlp Extension
- Exporting to OpenTelemetry
- Ingesting External Captures
- Ingesting from Jest
- Integration Cucumber Messages
- Capture-Time Redaction
Extensions
- Integration AtlasDataApi Extension
- Integration BigQuery Extension
- Integration Bigtable Extension
- Integration BlobStorage Extension
- Integration ClickHouse Extension
- Integration CloudStorage Extension
- Integration CosmosDB Extension
- Integration Dapper Extension
- Integration DynamoDB Extension
- Integration EF Core Relational Extension
- Integration Elasticsearch Extension
- Integration EventBridge Extension
- Integration EventHubs Extension
- Integration Grpc Extension
- Integration Kafka Extension
- Integration MassTransit Extension
- Integration MongoDB Extension
- Integration MySqlConnector Extension
- Integration Npgsql Extension
- Integration Oracle Extension
- Integration PubSub Extension
- Integration Redis Extension
- Integration S3 Extension
- Integration ServiceBus Extension
- Integration SNS Extension
- Integration Spanner Extension
- Integration SqlClient Extension
- Integration Sqlite Extension
- Integration SQS Extension
- Integration StorageQueues Extension
- Integration OpenTelemetry Extension
- Integration DispatchProxy Extension
- Integration MediatR Extension
- Integration PlantUML IKVM
Configuration
- Tracking Dependencies
- Tracking Custom Dependencies
- HTTP Tracking Setup
- Report Configuration
- Diagram Customisation
- Phase-Aware Tracking
- Content Formatting
- PlantUML Server Configuration
Features
- Generated Reports
- Report Themes
- Search and Filter Syntax
- Component Diagrams
- PlantUML Browser Rendering
- Inline SVG Rendering
- Internal Flow Tracking
- Tags and Attributes
- Excluding Requests
- Excluded Headers
- Multi-Host Test Architectures
- Event-Driven Architecture Testing
- Service Bus Tracking Patterns
- Background Thread Correlation
- Parallel-Safe Background Correlation
- Event & Message Tracking
- Assertion Tracking
- Step Tracking
- Tabular Attributes
- Large Response and Diagram Handling
- Querying Reports
- Service Card
- Cross-Run History
- Diagnostics and Debugging
- CI Summary Integration
- CI Artifact Upload
- Merging Parallel Reports
Reference