stress.sh 456 Bytes
Newer Older
Panagiotis Skarvelis's avatar
Panagiotis Skarvelis committed
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

echo "Stress test Starting, if you want to stop it, press Ctrl+C"

# clean up
rm -rf /tmp/audit
mkdir -p /tmp/audit

# Run 1000 times paralel the generateAuditRecord
for i in {1..1000}; do
    node --trace-warnings --experimental-specifier-resolution=node ./stressnode.js&
done

14
15
sleep 1

Panagiotis Skarvelis's avatar
Panagiotis Skarvelis committed
16
17
18
19
# validate by count the number of records on folder /tmp/audit is equal to 1000
while [ $(ls -1 /tmp/audit/*.json | wc -l) -ne 1000 ]; do
    sleep 1
done