Optimize Policy RouteID (#5359)

This commit is contained in:
Joe Kralicky 2024-11-06 12:31:52 -05:00 committed by GitHub
parent 82fb9cf29d
commit ebd9eea30e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 540 additions and 122 deletions

View file

@ -6,6 +6,7 @@ import (
"io"
"math/rand/v2"
"net/http"
"runtime"
"testing"
"github.com/pomerium/pomerium/internal/testenv"
@ -26,6 +27,7 @@ func init() {
}
func TestRequestLatency(t *testing.T) {
runtime.MemProfileRate = 0
env := testenv.New(t, testenv.Silent())
users := []*scenarios.User{}
for i := range numRoutes {
@ -51,6 +53,7 @@ func TestRequestLatency(t *testing.T) {
env.Start()
snippets.WaitStartupComplete(env)
runtime.MemProfileRate = 512 * 1024
out := testing.Benchmark(func(b *testing.B) {
b.ReportAllocs()