Skip to content

Commit c6a77bd

Browse files
committed
adding streaming relay make test
1 parent 757be9a commit c6a77bd

File tree

1 file changed

+12
-45
lines changed

1 file changed

+12
-45
lines changed

makefiles/relay.mk

Lines changed: 12 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ pocketd_relayminer_relay_JSONRPC: test_e2e_env ## Send a JSONRPC relay through r
1111
--network=local \
1212
--supplier-public-endpoint-override=http://localhost:8085
1313

14+
15+
.PHONY: pocketd_relayminer_relay_NDJSONRPC
16+
pocketd_relayminer_relay_NDJSONRPC: test_e2e_env ## Send a NDJSONRPC relay through relayminer to a local OpenAI compatible API served by Ollama
17+
pocketd relayminer relay \
18+
--app=pokt1pn64d94e6u5g8cllsnhgrl6t96ysnjw59j5gst \
19+
--payload='{"messages":[{"role": "user", "content": "Count down from 10 to 0: ", "type": "text"}],"max_tokens":25, "model":"qwen:0.5b","stream":true}' \
20+
--home=./localnet/pocketd \
21+
--network=local \
22+
--supplier-public-endpoint-override=http://localhost:8085/v1/chat/completions
23+
24+
1425
#####################
1526
### Curl Helpers ###
1627
#####################
@@ -57,48 +68,4 @@ test_relay_util_100: check_path_up check_relay_util ## Test anvil PATH behind G
5768
-H "App-Address: pokt1mrqt5f7qh8uxs27cjm9t7v9e74a9vvdnq5jva4" \
5869
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","id":1}' \
5970
-x 100 \
60-
-b
61-
62-
.PHONY: test_baseline_static_server_load
63-
test_baseline_static_server_load: ## Establish baseline load test performance against static nginx chainid server (default: R=100000 T=16 C=5000 D=30s)
64-
@echo "=== Load Testing Options ==="
65-
@echo "Parameters:"
66-
@echo " R: Requests per second rate (default: 100,000)"
67-
@echo " T: Number of threads (default: 16)"
68-
@echo " C: Concurrent connections (default: 5,000)"
69-
@echo " D: Test duration (default: 30s)"
70-
@echo ""
71-
@echo "Examples:"
72-
@echo " make test_baseline_static_server_load # Default test"
73-
@echo " make test_baseline_static_server_load R=10000 C=1000 # Light load"
74-
@echo " make test_baseline_static_server_load R=5000 C=500 D=10s # Quick test"
75-
@echo " make test_baseline_static_server_load R=200000 T=32 C=15000 D=45s # Maximum load"
76-
@echo ""
77-
@echo "Running test with: R=$(or $(R),100000) T=$(or $(T),16) C=$(or $(C),5000) D=$(or $(D),30s)"
78-
@echo "=========================="
79-
kubectl exec -it deployment/wrk2 -- wrk -R $(or $(R),100000) -L -d $(or $(D),30s) -t $(or $(T),16) -c $(or $(C),5000) http://nginx-chainid/
80-
81-
.PHONY: test_relayminer_only_load
82-
test_relayminer_only_load: ## Generate and run load test against RelayMiner using real RelayRequest data (default: R=512 t=16 c=256 d=300s)
83-
@echo "=== RelayRequest Load Testing ==="
84-
@echo "This tool generates proper RelayRequest data and runs load tests against RelayMiner endpoints"
85-
@echo ""
86-
@echo "Parameters:"
87-
@echo " R: Requests per second rate (default: 512)"
88-
@echo " d: Test duration (default: 300s)"
89-
@echo " t: Number of threads (default: 16)"
90-
@echo " c: Concurrent connections (default: 256)"
91-
@echo ""
92-
@echo "Examples:"
93-
@echo " make test_relayminer_only_load # Default test"
94-
@echo " make test_relayminer_only_load R=1000 d=60s # Higher rate, shorter duration"
95-
@echo " make test_relayminer_only_load R=100 t=4 c=50 d=30s # Light load test"
96-
@echo " make test_relayminer_only_load R=2000 t=32 c=1000 # Heavy load test"
97-
@echo ""
98-
@echo "Running with: R=$(or $(R),512) d=$(or $(d),300s) t=$(or $(t),16) c=$(or $(c),256)"
99-
@echo "================================"
100-
go run tools/scripts/wrk2_relays/main.go \
101-
-R $(or $(R),512) \
102-
-d $(or $(d),300s) \
103-
-t $(or $(t),16) \
104-
-c $(or $(c),256)
71+
-b

0 commit comments

Comments
 (0)