-
Notifications
You must be signed in to change notification settings - Fork 19
/
bench.sh
executable file
·65 lines (53 loc) · 1.94 KB
/
bench.sh
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#! /bin/bash
echo '==============================='
echo '= Gateway Mode (not cache) ='
echo '==============================='
npx concurrently --raw -k \
"node ./bench/gateway-service-1.js" \
"node ./bench/gateway-service-2.js" \
"npx wait-on tcp:3001 tcp:3002 && node ./bench/gateway.js" \
"npx wait-on tcp:3000 && node ./bench/gateway-bench.js"
echo
echo '==============================='
echo '= Gateway Mode (0s TTL) ='
echo '==============================='
npx concurrently --raw -k \
"node ./bench/gateway-service-1.js" \
"node ./bench/gateway-service-2.js" \
"npx wait-on tcp:3001 tcp:3002 && node ./bench/gateway.js 0" \
"npx wait-on tcp:3000 && node ./bench/gateway-bench.js"
echo
echo '==============================='
echo '= Gateway Mode (1s TTL) ='
echo '==============================='
npx concurrently --raw -k \
"node ./bench/gateway-service-1.js" \
"node ./bench/gateway-service-2.js" \
"npx wait-on tcp:3001 tcp:3002 && node ./bench/gateway.js 1" \
"npx wait-on tcp:3000 && node ./bench/gateway-bench.js"
echo
echo '==============================='
echo '= Gateway Mode (10s TTL) ='
echo '==============================='
npx concurrently --raw -k \
"node ./bench/gateway-service-1.js" \
"node ./bench/gateway-service-2.js" \
"npx wait-on tcp:3001 tcp:3002 && node ./bench/gateway.js 10" \
"npx wait-on tcp:3000 && node ./bench/gateway-bench.js"
echo
echo '*******************************'
echo
echo
echo '==============================='
echo '= Default Key Serialization ='
echo '==============================='
npx concurrently --raw -k \
"node ./bench/custom-key.js" \
"npx wait-on tcp:3000 && QUERY=0 node ./bench/custom-key-bench.js"
echo
echo '==============================='
echo '= Custom Key Serialization ='
echo '==============================='
npx concurrently --raw -k \
"node ./bench/custom-key.js" \
"npx wait-on tcp:3000 && QUERY=1 node ./bench/custom-key-bench.js"