File: benchmark

package info (click to toggle)
httpcore 1.0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 868 kB
  • sloc: python: 9,383; sh: 101; makefile: 41
file content (17 lines) | stat: -rwxr-xr-x 302 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh -e

# Usage: scripts/benchmark async|sync

export PREFIX=""
if [ -d 'venv' ] ; then
    export PREFIX="venv/bin/"
fi

set -x

${PREFIX}python tests/benchmark/server.py &
SERVER_PID=$!
EXIT_CODE=0
${PREFIX}python tests/benchmark/client.py "$@" || EXIT_CODE=$?
kill $SERVER_PID
exit $EXIT_CODE