mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-21 21:17:13 +02:00
Optimize Policy RouteID (#5359)
This commit is contained in:
parent
82fb9cf29d
commit
ebd9eea30e
6 changed files with 540 additions and 122 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue