Skip to content

Commit 6029cc3

Browse files
committed
sentry - benchmark - add wrk2 simple benchmark:
with a single event and a single campaign
1 parent 29346f0 commit 6029cc3

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

sentry/benchmark/benchmark.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
wrk.method = "POST"
2+
-- uses the PUBLISHER address
3+
wrk.body = "{ \"events\": [ {\"type\": \"IMPRESSION\", \"publisher\": \"0xE882ebF439207a70dDcCb39E13CA8506c9F45fD9\", \"adUnit\": \"Qmasg8FrbuSQpjFu3kRnZF9beg8rEBFrqgi1uXDRwCbX5f\", \"adSlot\": \"QmcUVX7fvoLMM93uN2bD3wGTH8MXSxeL8hojYfL2Lhp7mR\"} ] }"
4+
wrk.headers["Content-Type"] = "application/json"
5+
-- uses the DUMMY_AUTH[CREATOR] token
6+
-- wrk.headers["authorization"] = "Bearer AUTH_awesomeCreator:chain_id:1337"

sentry/benchmark/benchmark.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
# Run the benchmark using
4+
# t3 - one thread
5+
# c100 - one hundred concurrent connections
6+
# d30s - 30 seconds
7+
# R2000 - 2000 requests per second (total, across all connections combined)
8+
9+
wrk2 -s ./sentry/benchmark/benchmark.lua -t3 -c100 -d30s -R2000 --latency \
10+
http://127.0.0.1:8005/v5/campaign/0x936da01f9abd4d9d80c702af85c822a8/events

0 commit comments

Comments
 (0)