Skip to content

Commit

Permalink
bench: print latency and vary connections
Browse files Browse the repository at this point in the history
closes #4880
  • Loading branch information
denizy97 authored and dougwilson committed Apr 24, 2022
1 parent 158a170 commit 0b330ef
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
20 changes: 12 additions & 8 deletions benchmarks/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@

all:
@./run 1 middleware
@./run 5 middleware
@./run 10 middleware
@./run 15 middleware
@./run 20 middleware
@./run 30 middleware
@./run 50 middleware
@./run 100 middleware
@./run 1 middleware 50
@./run 5 middleware 50
@./run 10 middleware 50
@./run 15 middleware 50
@./run 20 middleware 50
@./run 30 middleware 50
@./run 50 middleware 50
@./run 100 middleware 50
@./run 10 middleware 100
@./run 10 middleware 250
@./run 10 middleware 500
@./run 10 middleware 1000
@echo

.PHONY: all
8 changes: 5 additions & 3 deletions benchmarks/run
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ echo
MW=$1 node $2 &
pid=$!

echo " $3 connections"

sleep 2

wrk 'http://localhost:3333/?foo[bar]=baz' \
-d 3 \
-c 50 \
-c $3 \
-t 8 \
| grep 'Requests/sec' \
| awk '{ print " " $2 }'
| grep 'Requests/sec\|Latency' \
| awk '{ print " " $2 }'

kill $pid

0 comments on commit 0b330ef

Please sign in to comment.