Skip to content

Commit

Permalink
Merge pull request #24 from bmf-san/feature/update-servemux
Browse files Browse the repository at this point in the history
Add new ServeMux test case
  • Loading branch information
bmf-san authored Apr 23, 2024
2 parents 27cb259 + f764aee commit 2b78fe2
Show file tree
Hide file tree
Showing 36 changed files with 455 additions and 424 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ workflows:
- test:
matrix:
parameters:
version: ["1.20", "1.19"]
version: ["1.22"]
170 changes: 87 additions & 83 deletions README.md

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,21 @@ func BenchmarkStaticRoutes10ServeMux(b *testing.B) {
benchmark(b, staticRoutes10, router)
}

func BenchmarkPathParamRoutes1BracketServeMux(b *testing.B) {
router := loadServeMux(pathParamRoutes1Bracket)
benchmark(b, pathParamRoutes1Bracket, router)
}

func BenchmarkPathParamRoutes5BracketServeMux(b *testing.B) {
router := loadServeMux(pathParamRoutes5Bracket)
benchmark(b, pathParamRoutes5Bracket, router)
}

func BenchmarkPathParamRoutes10BracketServeMux(b *testing.B) {
router := loadServeMux(pathParamRoutes10Bracket)
benchmark(b, pathParamRoutes10Bracket, router)
}

// bmf-san/goblin
// https://github.com/bmf-san/goblin
func BenchmarkStaticRoutesRootGoblin(b *testing.B) {
Expand Down
50 changes: 26 additions & 24 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,56 +1,58 @@
module github.com/go-router-benchmark

go 1.19
go 1.22

require (
github.com/beego/mux v0.0.0-20170807094426-6660b4b5accb
github.com/bmf-san/goblin v0.0.0-20230612165304-8aa4a2b4eb0a
github.com/bmf-san/goblin v0.0.0-20231001152959-ea7a860c6b0c
github.com/dimfeld/httptreemux/v5 v5.5.0
github.com/gin-gonic/gin v1.9.1
github.com/go-chi/chi/v5 v5.0.8
github.com/go-chi/chi/v5 v5.0.12
github.com/go-ozzo/ozzo-routing/v2 v2.4.0
github.com/gocraft/web v0.0.0-20190207150652-9707327fb69b
github.com/gorilla/mux v1.8.0
github.com/gorilla/mux v1.8.1
github.com/julienschmidt/httprouter v1.3.0
github.com/labstack/echo v3.3.10+incompatible
github.com/lkeix/techbook13-sample v0.0.0-20221218104044-fc1348dfcf99
github.com/naoina/denco v0.0.0-20180930074809-8475105a6b4c
github.com/nissy/bon v1.3.0
github.com/uptrace/bunrouter v1.0.20
github.com/uptrace/bunrouter v1.0.21
github.com/vardius/gorouter/v4 v4.5.1
)

require (
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/bytedance/sonic v1.9.1 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/andybalholm/brotli v1.1.0 // indirect
github.com/bytedance/sonic v1.11.5 // indirect
github.com/bytedance/sonic/loader v0.1.1 // indirect
github.com/cloudwego/base64x v0.1.3 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
github.com/dimfeld/httptreemux v5.0.1+incompatible // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.14.1 // indirect
github.com/go-playground/validator/v10 v10.19.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.16.5 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/labstack/gommon v0.4.0 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/klauspost/compress v1.17.8 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/labstack/gommon v0.4.2 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pelletier/go-toml/v2 v2.2.1 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.47.0 // indirect
github.com/valyala/fasthttp v1.52.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sys v0.9.0 // indirect
golang.org/x/text v0.10.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
golang.org/x/arch v0.7.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 2b78fe2

Please sign in to comment.