Skip to content
Myr

bench

This file

Path

support/bench

15 lines · 265 bytes

Last changed by

bench against loopbackTj Holowaychukbefore adoptionad9bbda

History of this file

Take it

Added `make benchmark` for experimental continuous-benchmarking toolTj Holowaychukbefore adoptione3aabdc

lines 1–6why, one step back
1#!/usr/bin/env bash
23node ./support/app &4pid=$!56bench() {

bench against loopbackTj Holowaychukbefore adoptionad9bbda

line 7why, one step back
7 ab -n 5000 -c 50 -k -q http://127.0.0.1:8000$1 | grep "Requests per" | cut -d ' ' -f 7 | xargs echo "$2:"

Added `make benchmark` for experimental continuous-benchmarking toolTj Holowaychukbefore adoptione3aabdc

lines 8–15why, one step back
8}
910sleep .511bench / "Hello World"12bench /json "JSON"13bench /middleware "Middleware"1415kill -9 $pid