Skip to content

Latest commit

Β 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Fiber Benchmarks Fiber Benchmarks

In-process request benchmarks for Fiber v2 and v3: the latest v2 release against v3.0.0, the latest v3 release and v3 main. Each scenario is written against the version's own API, and each version builds with the dependencies it ships with.

Results: https://gofiber.github.io/benchmarks/

Path Content
v2/, v3/ One Go module per major version, the Fiber pin in go.mod is bumped by Dependabot. compare.sh also builds the v3 scenarios against v3.0.0 and main
*/harness_test.go Request parsing, timing and response checks, identical in both modules
*/scenarios_test.go The scenarios in each version's API
compare.sh Paired runs of all versions and the benchstat comparison
paired.py Median time ratio of each version against v2 per scenario with a sign-test interval
site/ The results page and the script that publishes a run to it

Running

make compare                        # COUNT=10 BENCHTIME=500ms
COUNT=20 BENCHTIME=1s make compare

It needs Go and python3. A run whose median paired interval is Β±5% or wider after COUNT rounds gets COUNT more.

CI runs the comparison on every push and pull request. The paired and benchstat tables are in the job summary, the raw results are attached as an artifact.

Reading the results

  • sec/op covers parsing the raw request and the handler, as a server runs them for every request. App construction, serializing the response and the network are not included, so it is not end-to-end latency.
  • Each round runs all versions of a scenario back to back, rotating which goes first. paired.py reports the median of the per-round ratios against v2 with a sign-test interval, so load on the CI host that hits both halves of a pair cancels out. benchstat still gives the absolute numbers per version and the memory and allocation changes.
  • v3.0.0 and main are resolved on every run, main at its latest commit. The published metadata names the exact versions.
  • Every scenario checks status, body and required headers before and after timing.
  • fasthttp_floor runs no Fiber code and shows what the fasthttp version alone changes.
  • not_found_default uses each version's default body, not_found_custom the same custom body in both.

The scenarios are based on the comparison by @fzlzjerry in gofiber/fiber#4669.

β˜• Supporters

Fiber is an open-source project that runs on donations to pay the bills, e.g., our domain name, hosting, and serverless infrastructure. If you want to support Fiber, please become a GitHub Sponsor.

CodeRabbit

Blacksmith

Tool Sponsors - supporting Fiber with free IDE licenses and AI credits

JetBrains Β  OpenAI Β  Anthropic

πŸ“… Monthly Sponsors

πŸ”₯ Fiber Guardian@coderabbitai
β˜• Fiber Supporter@NdoleStudio
πŸͺ΄ Fiber Friend@simonheisstpeter

🎁 One-time Sponsors

πŸš€ Fiber Hero@thnxdev
πŸͺ΄ Fiber Friend@Gl1tchedPixzl

License

MIT licensed. See the LICENSE file for details.

About

πŸ“Š Fiber v2 vs v3 benchmarks

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages