Skip to content

About

Benchmark, parity, and pressure-test tooling for the Gnalloy modular networking stack.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

benchmarks

简体中文 | Documentation

Benchmark, parity, and pressure-test tooling for the Gnalloy modular networking stack.

This module contains benchmark, parity, and pressure-test tooling. It is for measurement and regression protection, not for production runtime dependencies.

Status

  • Import path: gnalloy.org/benchmarks
  • Repository: github.com/gnalloy/benchmarks
  • Default branch: dev
  • Preview install: go get gnalloy.org/benchmarks@dev
  • License: Apache-2.0

Install

GOWORK=off GOTOOLCHAIN=local go test ./... -count=1
go run ./cmd/gnalloy-microbench -module gnalloy -package buffer -benchtime 1s

Documentation

Module Boundary

This repository owns: Benchmark, parity, and pressure-test tooling for the Gnalloy modular networking stack.

It does not absorb neighboring module responsibilities. Core primitives stay in gnalloy.org/gnalloy; protocol codecs, transports, handlers, resolvers, examples, and benchmarks stay in their own repositories.

Packages

  • gnalloy.org/benchmarks/benchdiff (benchdiff)
  • gnalloy.org/benchmarks/cmd/gnalloy-benchdiff (main)
  • gnalloy.org/benchmarks/cmd/gnalloy-microbench (main)
  • gnalloy.org/benchmarks/cmd/bench-client (main)
  • gnalloy.org/benchmarks/cmd/parity-bench (main)
  • gnalloy.org/benchmarks/cmd/stress-client (main)
  • gnalloy.org/benchmarks/cmd/stress-check (main)
  • gnalloy.org/benchmarks/cmd/gnalloy-parity (main)
  • gnalloy.org/benchmarks/external/internal/benchh3 (benchh3)
  • gnalloy.org/benchmarks/external/internal/benchtls (benchtls)
  • gnalloy.org/benchmarks/microbench (microbench)
  • gnalloy.org/benchmarks/parity (parity)

Gnalloy Dependencies

  • gnalloy.org/codec-http1
  • gnalloy.org/codec-http3
  • gnalloy.org/gnalloy
  • gnalloy.org/transport-http3
  • gnalloy.org/transport-quic

Common Integration Pattern

  • Run package microbenchmarks from this repository with go run ./cmd/gnalloy-microbench -module gnalloy -package buffer -bench '^BenchmarkHeapAllocatorAcquireRelease$'.
  • Compare a module's HEAD to its working tree with go run ./cmd/gnalloy-benchdiff -packages gnalloy/buffer -bench '^BenchmarkHeapAllocatorAcquireRelease$'; -suite hotpath selects a predefined set. Both commands assume sibling checkouts by default; use -workspace otherwise.
  • Configure scenario, protocol, payload size, concurrency, warmup count, measured repetitions, timeout, and report output before comparing results.
  • Report throughput and latency separately. Do not compare numbers collected on different hosts as a ranking.
  • Use cmd/gnalloy-parity -matrix linux-full or -matrix windows-full to generate the full TCP, UDP, QUIC, HTTP/1, HTTP/2, HTTP/3, and TLS parity matrix.

Current Public Entry Points

The generated API reference lists the full public surface. Common constructors or option types currently include:

  • var ErrInvalidRunner = errors.New("gnalloy/benchmarks/benchdiff: invalid runner") ...
  • type Config struct{ ... }
  • type Config struct{ ... }
  • const ProtocolHTTP1 = "http1"
  • type Config struct{ ... }
  • const DefaultServerName = "gnalloy.local"
  • var ErrInvalidSpec = errors.New("gnalloy/benchmarks/parity: invalid spec") ...
  • type ExternalHarnessOptions struct{ ... }

Verification

GOWORK=off GOTOOLCHAIN=local go test ./... -count=1
GOWORK=off GOTOOLCHAIN=local go vet ./...
go run ./cmd/gnalloy-microbench -module gnalloy -package buffer -benchtime 1s

For pressure tests, assemble the relevant transport, codec, and handler stack and run the clients from this repository. Keep host, operating system, payload, concurrency, warmup, and repetitions in the report.

Caveats

  • This repository owns performance measurements; applications assemble cross-module behavior and examples demonstrate ordinary usage.
  • Public APIs should remain Go-native and explicit; avoid runtime scanning, hidden global registries, and reflection-heavy behavior in hot paths.
  • Treat network input as untrusted. Configure parser limits and return typed errors instead of panics.
  • Keep benchmark claims tied to a concrete host, operating system, protocol, payload, concurrency, warmup, and repetition count.

About

Benchmark, parity, and pressure-test tooling for the Gnalloy modular networking stack.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages