Skip to content
A benchmark comparison of my sessions service to gorilla sessions with redis
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
benchmark
LICENSE
README.md
main.go

README.md

sessions-comparison

This project benchmarks the github.com/adam-hanna/sessions sessions framework against the github.com/gorilla/sessions framework.

github.com/adam-hanna/sessions

As stated in the package, my benchmark results are as follows:

$ (cd benchmark && go test -bench=.)

setting up benchmark tests
BenchmarkBaseServer-2              20000             72479 ns/op
BenchmarkValidSession-2            10000            151650 ns/op
PASS
shutting down benchmark tests
ok      github.com/adam-hanna/sessions/benchmark        3.727s

github.com/gorilla/sessions

The gorilla sessions server was setup as shown in main.go. The server was started before performing the benchmarks. The benchmarks were run on the same machine, on the same day as the benchmarks given above (FWTW).

$ (cd benchmark && go test -bench=.)

BenchmarkValidSession-2             5000            310136 ns/op
PASS
ok      github.com/adam-hanna/sessions-comparison/gorilla-sessions/benchmark    1.593s
You can’t perform that action at this time.