Skip to content

Commit 78f8f2f

Browse files
committed
Add protocol performance benchmark tool
- Add cmd/protocolperf for comparing Direct Engine, TCP, and HTTP/AuthZen performance - Add Config.Engine field to server package for engine injection (enables benchmarking) - Add protocolperf and protocolperf-quick Makefile targets - Add docs/PROTOCOL_PERFORMANCE.md with usage and interpretation guide The benchmark uses library calls exclusively to eliminate external binary overhead, providing accurate measurements of protocol overhead vs direct engine access.
1 parent 4c8721d commit 78f8f2f

File tree

4 files changed

+768
-13
lines changed

4 files changed

+768
-13
lines changed

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: all build test test-verbose coverage clean fmt vet lint help bench bench-long perftest perftest-sizes perftest-large indexperf indexperf-large
1+
.PHONY: all build test test-verbose coverage clean fmt vet lint help bench bench-long perftest perftest-sizes perftest-large indexperf indexperf-large protocolperf protocolperf-quick
22

33
# Go parameters
44
GOCMD=go
@@ -116,6 +116,14 @@ indexperf-large: ## Compare indexed vs non-indexed with large ruleset (50k rules
116116
@echo "Running index performance comparison (large)..."
117117
$(GOCMD) run cmd/indexperf/main.go -rules 50000 -queries 5000 -tags 20 -stats
118118

119+
protocolperf: ## Compare Direct vs TCP vs HTTP/AuthZen performance
120+
@echo "Running protocol performance comparison..."
121+
$(GOCMD) run cmd/protocolperf/main.go -rules 1000 -queries 10000
122+
123+
protocolperf-concurrent: ## Compare protocols with concurrent clients
124+
@echo "Running protocol performance comparison (concurrent)..."
125+
$(GOCMD) run cmd/protocolperf/main.go -rules 1000 -queries 10000 -concurrent 4
126+
119127
deps: ## Download dependencies
120128
@echo "Downloading dependencies..."
121129
$(GOMOD) download

0 commit comments

Comments
 (0)