Performance Testing in the Wild: Building a Safety Net with Drupal Core and Gander
Performance Testing in the Wild: Building a Safety Net with Drupal Core and Gander
Julien Joye (Julienjoye)
Performance regressions are silent killers — they sneak in one commit at a time, and by the time someone notices, the debt is enormous. Since Drupal 10.2, core ships a performance testing framework — PerformanceTestBase and PerformanceTestTrait — that lets you catch these regressions at the earliest possible stage: the merge request. Gander, Tag1's OpenTelemetry stack, then helps you understand why a test failed and track trends over time.
In 20 minutes, I'll show you how to integrate performance assertions into your CI/CD pipeline to make every build fail when performance budgets are exceeded — no dedicated infrastructure required. When a build does fail, I'll show you how Gander helps you diagnose the root cause locally. You'll walk away with a proven pattern, real configuration files, and a checklist to get started by next sprint.
Prerequisite
Participants should be comfortable writing PHPUnit tests in Drupal (functional or kernel tests) and have a basic understanding of how a CI/CD pipeline works.
Target Audience
Backend Developers or Technical Leads who already faced performance issues and thought "we should have caught this earlier.
Outline
1. The "Shift Left" Case (3 min) — Why retroactive tools like Lighthouse aren't enough during development. A real-world example of a regression that slipped through to production.
2. Drupal's Performance Assertion Model (2 min) — What PerformanceTestBase measures, how performance assertions extend PHPUnit functional tests, and why this pass/fail approach requires zero infrastructure overhead.
3. From Local to Pipeline (10 min) — Step-by-step walkthrough: writing your first performance test, defining performance budgets per content type and user role, configuring the CI runner, and reading the results when a build fails.
4. Lessons Learned the Hard Way (3 min) — Budgets that need iteration, flaky metrics in CI environments, and getting the team to actually care.
5. Going Further with Gander (2 min) — When the build fails, use Gander's OpenTelemetry stack locally to diagnose the root cause via Grafana Tempo's trace waterfall. Then, a glimpse at long-term trend monitoring by exporting traces to Grafana Cloud on release tags.
Learning Objectives
- Understand why proactive performance testing at the CI/CD level catches regressions that retroactive tools like Lighthouse miss.
- Write performance assertions using Drupal core's PerformanceTestBase and define meaningful performance budgets for a Drupal project.
- Configure a CI/CD pipeline to run performance tests and fail builds when thresholds are exceeded — then use Gander to diagnose failures and track trends over time.
Experience level
Intermediate