mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 00:38:33 +02:00
perf(mem): replace Scheme and ExcludedReason string with uint8 type to reduce mem usage
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
. "github.com/yusing/godoxy/internal/entrypoint"
|
||||
"github.com/yusing/godoxy/internal/route"
|
||||
"github.com/yusing/godoxy/internal/route/routes"
|
||||
routeTypes "github.com/yusing/godoxy/internal/route/types"
|
||||
"github.com/yusing/godoxy/internal/types"
|
||||
"github.com/yusing/goutils/task"
|
||||
)
|
||||
@@ -78,7 +79,7 @@ func BenchmarkEntrypointReal(b *testing.B) {
|
||||
|
||||
r := &route.Route{
|
||||
Alias: "test",
|
||||
Scheme: "http",
|
||||
Scheme: routeTypes.SchemeHTTP,
|
||||
Host: host,
|
||||
Port: route.Port{Proxy: portInt},
|
||||
HealthCheck: &types.HealthCheckConfig{Disable: true},
|
||||
@@ -119,7 +120,7 @@ func BenchmarkEntrypoint(b *testing.B) {
|
||||
|
||||
r := &route.Route{
|
||||
Alias: "test",
|
||||
Scheme: "http",
|
||||
Scheme: routeTypes.SchemeHTTP,
|
||||
Host: "localhost",
|
||||
Port: route.Port{
|
||||
Proxy: 8080,
|
||||
|
||||
Reference in New Issue
Block a user