Soroush Neyestani

Software Engineer

Application Architect

Enterprise Application Developer

Technical Author & Educator

Performance Benchmark Suite

Building a Reproducible HTTP Performance Testing Environment with Go, Grafana k6, and Python

An Open-Source Performance Engineering Case Study

Author: Soroush Neyestani
Release: v0.1.0 — November 2026
Category: Performance Engineering / Backend Engineering / DevOps
Technologies: Go 1.27.4, Grafana k6 2.4.0, Python 3.13, Docker, GitHub Actions
License: MIT
Status: Completed — Public Release

Source Code: Performance Benchmark Suite

Official Release: v0.1.0


Executive Summary

Performance testing is not simply about generating HTTP traffic and recording response times.

A useful benchmark must define a reproducible workload, execute it safely, collect reliable measurements, distinguish different types of failure, and produce results that can be independently reviewed.

I developed Performance Benchmark Suite to explore these engineering requirements through an original open-source implementation.

The project combines a synthetic HTTP service written in Go, configurable test scenarios executed through Grafana k6, and Python-based measurement validation and reporting.

It supports three core performance-testing methods:

  • Load testing: Characterizing behavior under a defined workload.
  • Stress testing: Increasing load to investigate degradation and capacity boundaries.
  • Soak testing: Observing behavior under sustained load.

The suite records request counts, response latency distributions, achieved throughput, errors, dropped iterations, CPU utilization, and memory consumption.

It also implements bounded test execution, automated thresholds, negative tests, isolated infrastructure, and machine-readable reports.

Both public GitHub Actions workflows successfully executed the project's automated verification and real benchmark scenarios.

An important outcome was the investigation of zero-valued HTTP durations in Windows measurements. Rather than silently replacing those values, the project preserved the underlying evidence and documented the measurement-resolution limitation.

The engineering objective was straightforward:

Build a benchmark environment in which the methodology, measurements, and limitations are as important as the resulting performance numbers.


1. The Engineering Problem

When developers discuss application performance, several different questions are often combined.

How quickly does a service respond?

How many requests can it process per second?

What happens when incoming traffic increases?

Will response times remain stable?

Does the service return errors under load?

Are performance changes caused by the application, the database, or the testing environment itself?

A single response-time measurement cannot answer all these questions.

Neither can a benchmark report that omits workload configuration or resource utilization.

For example, suppose a service successfully handles 45 requests per second during a short test.

That does not establish that 45 requests per second is its maximum capacity.

It also does not prove that the service could maintain the same rate for several hours.

To make defensible engineering decisions, the benchmark must distinguish the workload offered to the system from the work actually completed.

It must also identify measurement uncertainty.

This project addresses those problems through reproducible testing and explicit reporting.


2. Project Objectives

The initial release was designed around six objectives.

Reproducible workloads

Tests must run with documented parameters, deterministic fixtures where appropriate, and consistent scenario definitions.

Multiple testing strategies

Load, stress, and soak testing must be implemented as distinct scenarios with different objectives.

Actual measurements

Latency, throughput, errors, and resource usage must originate from executed HTTP requests and observed processes or containers.

Automated verification

Correctness checks and performance thresholds must be integrated into the testing workflow.

Safe execution

The benchmark must not accidentally generate sustained traffic against unrelated external or production systems.

Traceable evidence

Results must be available in machine-readable and human-readable forms, with source and environment information preserved.


3. Technology Stack

Component Version Responsibility
Go 1.27.4 Synthetic HTTP benchmark target
Grafana k6 2.4.0 Load generation and scenario execution
Python 3.13 / 3.13.17 in public CI Results validation and reporting
Docker / Compose CI-verified environment Isolated execution
GitHub Actions Public main and tag workflows Automated testing and evidence generation
Gitleaks 8.30.1 Secret scanning in public CI

Why Go?

Go provides a compact environment for building an HTTP service with predictable request handling and minimal application complexity.

The objective was not to benchmark every aspect of Go.

Instead, the service provides a real HTTP target against which performance-testing methodology can be exercised.

Why Grafana k6?

Grafana k6 supports configurable workload models, virtual users, arrival rates, performance checks, thresholds, and exported measurements.

This makes it suitable for testing different workload characteristics without implementing a custom load generator from scratch.

Why Python?

Python is used for processing benchmark evidence and producing reports.

Separating reporting from load generation allows numerical calculations, formatting, and edge cases to be tested independently.


4. Architecture Overview

The implementation separates the system under test from the measurement pipeline.

Benchmark Configuration
         |
         v
Grafana k6 Scenarios
         |
         v
Isolated Go HTTP Service
         |
         +--------------------+
         |                    |
         v                    v
HTTP Measurements      Resource Sampling
         |                    |
         +---------+----------+
                   |
                   v
       Raw Benchmark Evidence
                   |
                   v
       Python Validation Layer
                   |
                   v
       JSON and Markdown Reports

This separation has practical advantages.

The HTTP service is responsible for responding to requests.

k6 is responsible for generating the configured workload and collecting HTTP measurements.

Resource monitoring observes CPU and memory behavior.

Python validates and organizes the resulting data.

The final report distinguishes observed measurements from engineering interpretations.


5. Load Testing

Load testing investigates how a service behaves under a controlled, expected workload.

The goal is not necessarily to make the system fail.

Instead, it provides baseline information about latency, throughput, and correctness under a defined level of demand.

The suite's load scenario records:

  • Executed HTTP requests.
  • Effective measurement duration.
  • Achieved requests per second.
  • p50 latency.
  • p95 latency.
  • p99 latency.
  • Mean latency.
  • Unexpected errors.
  • Dropped iterations.
  • CPU and memory observations.

The public Load scenario used an eight-second measurement window.

Two independent public CI executions produced the following results.

Metric Main CI Release-tag CI
Requests 97 96
Duration 8 s 8 s
Throughput 12.125 req/s 12.000 req/s
p50 latency 0.441 ms 0.492 ms
p95 latency 0.486 ms 0.588 ms
p99 latency 1.069 ms 0.737 ms
Mean latency 0.461 ms 0.476 ms

Both runs completed without unexpected errors or dropped iterations.

These figures describe the synthetic target under the measured CI conditions.

They do not establish performance expectations for other applications.


6. Stress Testing

Stress testing investigates behavior as the offered workload increases.

Unlike a steady-state load test, a stress test deliberately changes demand over time.

Typical observations include:

  • Latency changes.
  • Throughput changes.
  • Increased error rates.
  • Dropped iterations.
  • Resource saturation.
  • Recovery after reducing the load.

The suite implements a bounded stress profile.

During the public verification, the profile reached a 45 requests/second peak stage lasting three seconds.

However, the average throughput across the complete 15-second scenario was approximately 24.933 requests/second.

Those numbers describe different properties of the workload.

Public stress results

Metric Main CI Release-tag CI
Requests 374 374
Duration 15 s 15 s
Average throughput 24.933 req/s 24.933 req/s
Peak-stage rate 45 req/s 45 req/s
p50 latency 0.352 ms 0.345 ms
p95 latency 0.449 ms 0.519 ms
p99 latency 0.560 ms 0.618 ms
Mean latency 0.366 ms 0.372 ms

Neither public run recorded unexpected request errors or dropped iterations.

No saturation point was observed within the tested limits.

Interpreting the result

This establishes that the synthetic service handled the tested stress profile without an observed saturation event.

It does not establish the service's maximum sustainable request rate.

A higher rate could potentially be handled, but that would require a separate authorized and appropriately controlled experiment.

The project intentionally avoids increasing load beyond its safety limits merely to produce a failure.


7. Soak Testing

Soak testing evaluates service behavior while a workload continues over time.

Longer soak experiments can help investigate gradual latency degradation, resource growth, or reliability problems.

Version v0.1.0 includes a short, bounded soak scenario suitable for automated CI verification.

The public measurement duration was 20 seconds.

Public soak results

Metric Main CI Release-tag CI
Requests 240 240
Duration 20 s 20 s
Throughput 12.000 req/s 12.000 req/s
p50 latency 0.430 ms 0.474 ms
p95 latency 0.476 ms 0.582 ms
p99 latency 0.525 ms 0.694 ms
Mean latency 0.434 ms 0.457 ms

Both public runs completed without unexpected errors or dropped iterations.

What a 20-second soak can demonstrate

It verifies the execution and reporting pipeline for a sustained workload over the tested interval.

It can reveal problems that happen during that short period.

What it cannot demonstrate

It cannot establish multi-hour stability, multi-day reliability, or the absence of memory leaks.

Such conclusions require substantially longer measurements, appropriate environmental controls, and repeated observations.

The short CI scenario is therefore documented as a functional demonstration of soak testing rather than a production endurance certification.


8. Understanding p50, p95, and p99

Latency percentiles provide a more informative view of request behavior than a single average.

p50 — Median latency

The 50th percentile describes the middle of the measured latency distribution.

Half the observations fall at or below this percentile under the adopted quantile definition.

It is useful for understanding typical request latency.

p95 — High-percentile latency

The 95th percentile focuses on the slower portion of the observed requests.

It can help reveal degradation that is less apparent in the median.

p99 — Tail latency

The 99th percentile focuses further into the slow tail.

It is valuable for latency-sensitive services, although interpretation becomes more sensitive to sample size, variability, and measurement methodology.

Mean latency

The arithmetic mean describes the overall average duration.

It can be influenced significantly by unusually slow requests.

Why all four matter

Two workloads may have similar mean latency but different tail behavior.

Conversely, a small number of unusually slow requests can change p99 without greatly affecting p50.

The suite therefore reports multiple statistics instead of reducing performance to a single number.


9. Throughput Is Not the Same as Offered Load

One of the central distinctions in performance engineering is between offered workload and achieved throughput.

Offered workload describes what the load generator attempts to schedule.

Achieved throughput describes the work actually completed per unit of time under the measurement convention.

These quantities are not necessarily equal.

A service may respond slowly enough that the generator cannot maintain the requested arrival rate.

A generator may lack sufficient available virtual users.

Requests may time out.

Iterations may be dropped before execution.

The project records dropped iterations and distinguishes configured scenario rates from observed results.

The stress-test example

The suite's public stress profile reached a peak-stage rate of 45 requests per second.

The 15-second scenario's average throughput was 24.933 requests per second.

Presenting only the peak number without the stage duration would be misleading.

Presenting only the average would hide the higher-load stage.

Both values are therefore retained.


10. Resource Monitoring

HTTP latency alone does not explain why an application behaves as it does.

Resource observations provide additional context.

The project collects CPU and memory information for the relevant benchmark components.

During the public Stress scenarios, the following peaks were reported.

Measurement Main CI Release-tag CI
Target CPU 1.000% 1.020%
Load-generator CPU 3.000% 3.500%
Target container memory 4.371 MiB 4.441 MiB

These are sampled observations, not necessarily absolute peaks between samples.

Why resource attribution matters

The load generator and target service consume different resources.

If the load generator becomes saturated, measured throughput may be limited by the testing infrastructure rather than the application.

Similarly, host CPU utilization is not automatically equivalent to the target process's CPU utilization.

Windows versus Linux memory accounting

The private Windows tests measured working-set memory.

The Ubuntu Compose tests recorded container-memory observations.

These metrics use different accounting mechanisms.

Consequently, their values must not be interpreted as directly equivalent measurements.

The project documents these distinctions rather than presenting unlike metrics as comparable.


11. An Important Investigation: Zero-Valued Windows Latencies

One of the most instructive findings emerged during Windows verification.

Some requests were recorded with an HTTP duration of zero milliseconds.

The initial measurements included:

Scenario Zero-valued samples Total requests
Windows Load 59 97
Windows Stress 276 374

As a result, the reported p50 latency for both scenarios was 0.000 ms.

The investigation

The implementation and evidence were examined to determine whether these values resulted from a reporting error.

The findings were:

  1. The raw k6 measurements contained zero-valued durations.
  2. The built-in HTTP timing metric and corresponding custom measurement agreed.
  3. Replaying the original measurements reproduced the previously reported percentiles.
  4. The actual durations represented by the zero-valued samples could not be determined at the available timing resolution.

The engineering decision

The original measurements were preserved.

The public reporting system was improved to record the number of zero-valued observations and explain the timing-resolution limitation.

No arbitrary replacement values were introduced.

Why this matters

A measurement of zero milliseconds does not establish that a real HTTP request consumed no time.

It may instead reflect the limitations of the measurement process.

Replacing such values with invented positive durations would make the report appear cleaner while reducing its evidential integrity.

This case illustrates a broader principle:

A benchmark is only useful when its measurement limitations are understood and reported.

The issue did not require fabricating new data or hiding the original results.


12. Performance Thresholds and Negative Tests

A benchmark can contain valid measurements yet fail its intended performance objectives.

For that reason, the suite supports automated performance thresholds.

Thresholds allow tests to express conditions that determine whether a performance gate passes or fails.

The project also distinguishes performance assertions from application correctness checks.

Correctness checks

These verify whether an HTTP response satisfies the scenario's expected behavior.

For example, a controlled HTTP 503 response may be an expected result in a deliberately constructed test.

It should not automatically be classified as an unexpected failure.

Performance thresholds

These evaluate whether measured metrics satisfy configured performance objectives.

A threshold may check latency or error-rate limits.

Negative verification

The project deliberately executed a scenario with a failing threshold.

The expected process exit code was:

99

This failure was the intended result of the negative test.

It demonstrated that the benchmark workflow correctly detects and reports a violated performance gate.

A successful negative test is not the same thing as a passing performance threshold.

The suite keeps these outcomes distinct.


13. Reproducibility and Evidence

A useful benchmark should be reviewable beyond a single terminal session.

The project's reporting workflow preserves the relevant test definitions and results.

The evidence includes:

  • Scenario configuration.
  • Effective workload parameters.
  • Measurement duration.
  • Request counts.
  • Latency distributions.
  • Throughput.
  • Error metrics.
  • Dropped iterations.
  • Resource observations.
  • Threshold results.
  • Execution environment information.
  • Known limitations.

Results are available in machine-readable and human-readable formats.

Reproducibility does not mean identical numbers

Running the same benchmark twice does not guarantee identical latency measurements.

CPU scheduling, runner contention, operating-system behavior, timing resolution, and resource availability may change.

The project therefore treats reproducibility as the ability to repeat the documented workload and measurement procedure.

Numerical results must still be interpreted in the context of their execution environment.


14. Automated CI Verification

The public release includes GitHub Actions verification against the actual source distribution.

Both the main-branch and release-tag workflows succeeded on Ubuntu 24.04.

The reported tool versions were:

  • Go 1.27.4
  • Python 3.13.17
  • Grafana k6 2.4.0
  • Gitleaks 8.30.1

Each workflow covered:

  • Seven primary Go tests.
  • Fifteen Go subtests.
  • Thirty-four Python tests.
  • Real containerized benchmark scenarios.
  • Expected HTTP behavior.
  • Performance-threshold verification.
  • Report generation.
  • Security and disclosure checks.

The real Load, Stress, and Soak measurements were preserved separately for the main and release-tag executions.

Main CI

https://github.com/soroushneyestani/performance-benchmark-suite/actions/runs/46142450069

Release-tag CI

https://github.com/soroushneyestani/performance-benchmark-suite/actions/runs/46142802361

Successful CI establishes that the tested implementation and scenarios worked in those environments.

It does not guarantee that identical performance measurements will occur on another machine.


15. Safety Boundaries

Load testing can consume substantial resources or disrupt services.

The project therefore restricts execution to an isolated synthetic target and implements explicit limits.

The approved execution envelope includes:

Control Limit
Maximum virtual users 20
Maximum scheduled iterations 100 per second
Maximum scenario duration 300 seconds
Target scope Isolated or loopback test environment

The project is not intended to generate traffic against arbitrary external websites.

It must not be used to benchmark employer infrastructure, customer systems, or production services without explicit authorization and a separate operational plan.

Why limits are necessary

A load generator should not create uncontrolled traffic because of a configuration mistake.

Safe defaults, validation, isolation, and bounded duration reduce that risk.

The limits also make the initial test environment easier to reproduce.

They are safety constraints, not measured capacity limits of the application.


16. Security and Release Integrity

The public distribution was prepared as an independent open-source release.

The published package includes the original source, MIT licensing information, and third-party notices.

The release verification reported:

  • A 56-file source archive.
  • Source inventory matching the tagged Git commit.
  • Six release attachments successfully downloaded without authentication.
  • Verified attachment checksums.
  • Successful public main and tag CI.
  • Gitleaks scanning with zero reported findings.
  • Repository branch and release-tag protection.

A zero-finding secret scan does not establish comprehensive security.

It indicates that the configured scanner did not identify findings within its examined scope.

Official release identity

Version: v0.1.0

Public source commit:

2f6d1a579e514b078ece4430e703db4626f1e089

Source ZIP SHA-256:

f0d9341a3ef2f357d6a490582c43b9a76ae9b6a64d42825b6deb0b98fc21e27b

These identifiers allow reviewers to associate the released source with the documented verification.


17. What the Results Establish

The public evidence supports several specific conclusions.

First, the suite executes genuine HTTP performance tests against an original synthetic service.

Second, the three required scenario categories are implemented and can produce real measurement evidence.

Third, the reporting pipeline records latency percentiles, throughput, error information, and resource observations.

Fourth, automated checks can distinguish successful runs from deliberately violated performance thresholds.

Fifth, the tested stress workload did not reveal a saturation point within its bounded envelope.

Sixth, the Windows timing investigation demonstrates why raw data and numerical precision matter.

Seventh, the public release can be independently inspected through source archives, CI results, and machine-readable evidence.

These conclusions are supported by the reported experiments.

They should not be expanded into claims about long-term reliability, enterprise capacity, or performance under untested workloads.


18. Practical Applications

The suite can serve as a technical reference for several engineering activities.

Backend development

Developers can study how to establish a basic HTTP performance baseline and evaluate changes in response-time distributions.

DevOps and CI/CD

Teams can examine how bounded performance scenarios and threshold checks fit into an automated build and verification pipeline.

Performance engineering

The reporting components demonstrate how to preserve raw observations, summarize distributions, and interpret workload differences.

Technical education

The project provides an inspectable example of load, stress, and soak testing without relying on proprietary infrastructure.

Interview preparation

The work illustrates concepts frequently encountered in backend, platform, and architecture discussions:

  • Open versus closed workload models.
  • Percentile interpretation.
  • Offered load versus achieved throughput.
  • Load-generator saturation.
  • Error classification.
  • Benchmark reproducibility.
  • Resource-measurement scope.
  • Measurement uncertainty.

19. Potential Future Extensions

The following are potential extensions, not features claimed in version v0.1.0.

Longer endurance testing

Introduce optional, separately authorized multi-hour soak profiles.

More realistic workloads

Add representative data access, persistence, and mixed read/write operations.

Performance regression history

Store comparable benchmark results across multiple application versions.

Statistical analysis

Introduce repeated-trial analysis and uncertainty estimates appropriate to the workload and measurement process.

Distributed load generation

Investigate additional execution environments when a single load generator becomes the limiting factor.

Observability integration

Correlate performance measurements with application traces and server-side metrics.

Production-oriented workload modeling

Introduce controlled, authorized scenarios based on observed workload characteristics, while preserving isolation and safety limits.

Each extension would need its own implementation and verification evidence.


Conclusion

Performance Benchmark Suite v0.1.0 is an open-source reference for reproducible HTTP performance engineering.

It combines an original Go test service, Grafana k6 scenarios, Python reporting, resource monitoring, and automated GitHub Actions verification.

The project demonstrates how to execute load, stress, and short-duration soak tests, collect response-time distributions, measure achieved throughput, enforce thresholds, and retain inspectable evidence.

Its most important lesson is not a particular latency value or request rate.

It is the distinction between generating performance numbers and establishing what those numbers actually mean.

A peak arrival rate is not automatically sustainable capacity.

A short soak test does not establish long-term reliability.

A zero-valued timing sample does not necessarily mean zero execution time.

A benchmark on a shared CI runner is not a substitute for a controlled production-capacity study.

By documenting those limitations alongside actual measurements, the project provides a foundation for more rigorous performance engineering.


Technical Resources

Public Repository
https://github.com/soroushneyestani/performance-benchmark-suite

Official v0.1.0 Release
https://github.com/soroushneyestani/performance-benchmark-suite/releases/tag/v0.1.0

Main CI
https://github.com/soroushneyestani/performance-benchmark-suite/actions/runs/46142450069

Release-Tag CI
https://github.com/soroushneyestani/performance-benchmark-suite/actions/runs/46142802361

Human-Readable Benchmark Report
https://github.com/soroushneyestani/performance-benchmark-suite/releases/download/v0.1.0/BENCHMARK_REPORT.md

Machine-Readable Benchmark Evidence
https://github.com/soroushneyestani/performance-benchmark-suite/releases/download/v0.1.0/BENCHMARK_EVIDENCE.json

Benchmark Methodology and Historical Results
https://github.com/soroushneyestani/performance-benchmark-suite/blob/v0.1.0/docs/BENCHMARK_RESULTS.md

Official Source Archive
https://github.com/soroushneyestani/performance-benchmark-suite/releases/download/v0.1.0/performance-benchmark-suite-v0.1.0-source.zip

Checksum File
https://github.com/soroushneyestani/performance-benchmark-suite/releases/download/v0.1.0/SHA256SUMS.txt


Performance Benchmark Suite — v0.1.0
November 2026 | Go | Grafana k6 | Python | MIT License