Renamed go/server to go/web

This commit is contained in:
Eduard Urbach 2024-03-22 15:47:52 +01:00
parent 716aced139
commit 39ee64067c
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0
5 changed files with 29 additions and 29 deletions

View File

@ -9,7 +9,6 @@ goos: linux
goarch: amd64
cpu: Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
BenchmarkAero/GitHub-12 14560964 80.22 ns/op 0 B/op 0 allocs/op
BenchmarkAkyoto/GitHub-12 18967251 62.96 ns/op 0 B/op 0 allocs/op
BenchmarkBeego/GitHub-12 656966 1656 ns/op 929 B/op 9 allocs/op
BenchmarkBone/GitHub-12 86756 11830 ns/op 4705 B/op 67 allocs/op
BenchmarkChi/GitHub-12 3274795 359.6 ns/op 336 B/op 2 allocs/op
@ -18,6 +17,7 @@ BenchmarkGin/GitHub-12 11746930 108.2 ns/op
BenchmarkJSHR/GitHub-12 9244504 123.1 ns/op 96 B/op 1 allocs/op
BenchmarkPat/GitHub-12 20920 83830 ns/op 375238 B/op 235 allocs/op
BenchmarkWay/GitHub-12 117394 9808 ns/op 4979 B/op 177 allocs/op
BenchmarkWeb/GitHub-12 18967251 62.96 ns/op 0 B/op 0 allocs/op
```
```
@ -25,7 +25,6 @@ goos: darwin
goarch: amd64
cpu: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
BenchmarkAero/GitHub-4 13352727 92.37 ns/op 0 B/op 0 allocs/op
BenchmarkAkyoto/GitHub-4 15244411 76.21 ns/op 0 B/op 0 allocs/op
BenchmarkBeego/GitHub-4 511820 2089 ns/op 929 B/op 9 allocs/op
BenchmarkBone/GitHub-4 81193 14661 ns/op 4705 B/op 67 allocs/op
BenchmarkChi/GitHub-4 2492223 481.9 ns/op 336 B/op 2 allocs/op
@ -34,4 +33,5 @@ BenchmarkGin/GitHub-4 11333715 105.6 ns/op 0 B/op
BenchmarkJSHR/GitHub-4 7400620 160.0 ns/op 96 B/op 1 allocs/op
BenchmarkPat/GitHub-4 13444 109901 ns/op 248069 B/op 235 allocs/op
BenchmarkWay/GitHub-4 100990 11921 ns/op 4979 B/op 177 allocs/op
BenchmarkWeb/GitHub-4 15244411 76.21 ns/op 0 B/op 0 allocs/op
```

View File

@ -1,21 +0,0 @@
package main_test
import (
"testing"
"git.akyoto.dev/go/server"
)
func BenchmarkAkyoto(b *testing.B) {
bench(
b,
func() server.Server {
return server.New()
},
func(s server.Server, method string, path string) {
s.Router().Add(method, path, func(ctx server.Context) error {
return ctx.Bytes(payload)
})
},
)
}

View File

@ -3,8 +3,8 @@ module git.akyoto.dev/go/benchmarks/web
go 1.22.1
require (
git.akyoto.dev/go/router v0.1.3
git.akyoto.dev/go/server v0.0.0-20240314115203-fe184c089268
git.akyoto.dev/go/router v0.1.4
git.akyoto.dev/go/web v0.0.0-20240322141854-48f10f3ee7a3
github.com/aerogo/aero v1.3.59
github.com/beego/beego/v2 v2.1.6
github.com/bmizerany/pat v0.0.0-20210406213842-e4b6760bdd6f

View File

@ -1,9 +1,9 @@
git.akyoto.dev/go/assert v0.1.3 h1:QwCUbmG4aZYsNk/OuRBz1zWVKmGlDUHhOnnDBfn8Qw8=
git.akyoto.dev/go/assert v0.1.3/go.mod h1:0GzMaM0eURuDwtGkJJkCsI7r2aUKr+5GmWNTFPgDocM=
git.akyoto.dev/go/router v0.1.3 h1:H4wJCYdDD3/i9miYSK/e5sCoGiXe9OX7KmgH4/Toa60=
git.akyoto.dev/go/router v0.1.3/go.mod h1:VfSsK/Z6fUhT3pWaAAnuAcj++bWRZD+bzNaqJoTAunU=
git.akyoto.dev/go/server v0.0.0-20240314115203-fe184c089268 h1:hJKwhtTMvJKa8ZLHvbL985cRgc3Eujgr5tFbAY1uWKE=
git.akyoto.dev/go/server v0.0.0-20240314115203-fe184c089268/go.mod h1:VVr9rDl+CPnQyXphXpOcpSovrjzPGsSk00PjUBHkx1c=
git.akyoto.dev/go/router v0.1.4 h1:ZL5HPl4aNn4QKihf3VVs0Mm9R6ZGn2StAHGRQxjEbws=
git.akyoto.dev/go/router v0.1.4/go.mod h1:rbHbkLJlQOafuOuvBalO3O8E0JtMFPT3zzTKX3h9T08=
git.akyoto.dev/go/web v0.0.0-20240322141854-48f10f3ee7a3 h1:LULS0bu+oQNIyXWLGUeqfDT9+OwyPHcsMBJhFX4QlPU=
git.akyoto.dev/go/web v0.0.0-20240322141854-48f10f3ee7a3/go.mod h1:oB/+nfWbAsBXYhV+TidUjmxdbyGpU7pODdo95bYaRVc=
github.com/aerogo/aero v1.3.59 h1:5yu+kk/uIXAXADKSLCFKhxAzThCehvpbF6gst+G32Fw=
github.com/aerogo/aero v1.3.59/go.mod h1:ehwj+mb117xQRTvp11jlnrRNPgbcYL6s6aBk9wbIZ0o=
github.com/aerogo/csp v0.1.10 h1:2PJf9gkdRvCFYOA0baTUyp34vwPp5ZJJX8GZRCYc/nM=

21
web/web_test.go Normal file
View File

@ -0,0 +1,21 @@
package main_test
import (
"testing"
"git.akyoto.dev/go/web"
)
func BenchmarkWeb(b *testing.B) {
bench(
b,
func() web.Server {
return web.NewServer()
},
func(s web.Server, method string, path string) {
s.Router().Add(method, path, func(ctx web.Context) error {
return ctx.Bytes(payload)
})
},
)
}