-
Notifications
You must be signed in to change notification settings - Fork 0
/
benchmark.sh
executable file
·44 lines (36 loc) · 958 Bytes
/
benchmark.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
#!/bin/bash
# Executes the test protocol for MemFS
# Create the results file
DATE=$(date +%Y%m%d%H%M)
MEMFSLOG="fixtures/memfs-$DATE.log"
RESULTS="fixtures/results-$DATE.csv"
# Test Paths
TESTDIR="disk"
MEMFSDIR="memfs"
# Executables
WORKLOAD="./workload.py"
# Run the standard file system tests
mkdir $TESTDIR
$WORKLOAD -p redis -H -o $RESULTS $TESTDIR
$WORKLOAD -p postgres -o $RESULTS $TESTDIR
$WORKLOAD -p nginx -o $RESULTS $TESTDIR
$WORKLOAD -p apache -o $RESULTS $TESTDIR
$WORKLOAD -p ruby -o $RESULTS $TESTDIR
$WORKLOAD -p python -o $RESULTS $TESTDIR
rmdir $TESTDIR
# Run the MemFS tests
mkdir $MEMFSDIR
run_memfs_workload() {
memfs -c fixtures/memfs.json memfs/ > $MEMFSLOG 2>&1 &
PID=$!
$WORKLOAD -p $1 -o $RESULTS $MEMFSDIR
kill -INT $PID
sleep 10
}
run_memfs_workload redis
run_memfs_workload postgres
run_memfs_workload nginx
run_memfs_workload apache
run_memfs_workload ruby
run_memfs_workload python
rmdir $MEMFSDIR