File: run.sh

package info (click to toggle)
golang-github-client9-reopen 1.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 112 kB
  • sloc: sh: 41; makefile: 39
file content (33 lines) | stat: -rwxr-xr-x 411 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
#set -e

SERVER=127.0.0.1:8123
COUNT=300

killall example1
rm -f ./example1 /tmp/example.log*

echo "Starting server..."
go build .
./example1 &


echo "Starting requests...."
./curl.sh $SERVER $COUNT &
sleep 1

echo "Rotating..."
mv /tmp/example.log /tmp/example.log-old
killall -1 example1

# wait for curl to finish
wait %2

killall -TERM example1

# count results
wc -l /tmp/example.log*



# exit