forked from chiangkd/rcuhashbash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdo_insert_measurement.sh
44 lines (35 loc) · 1.05 KB
/
do_insert_measurement.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
TARGET_MODULE=(rcuhashbash-resize rcuhashbash-resize_wob_lock)
sleep_time=(5 10 15 20 25)
tests="rcu"
readers=1
insert=true
sudo dmesg -C
for((sleept = 0; sleept < 5; sleept = sleept + 1))
do
sudo insmod ${TARGET_MODULE[0]}.ko \
shift1=13 \
resize=true \
insert=true
sleep ${sleep_time[sleept]}
sudo rmmod ${TARGET_MODULE[0]}
done
mapfile -t inserts < <(sudo dmesg | grep "rcuhashbash summary: inserts" | awk '{print $4}')
for i in "${!inserts[@]}"; do
echo "${sleep_time[i]} ${inserts[i]}"
done > output_bucket_lock.txt
sudo dmesg -C
for((sleept = 0; sleept < 5; sleept = sleept + 1))
do
sudo insmod ${TARGET_MODULE[1]}.ko \
shift1=13 \
resize=true \
insert=true
sleep ${sleep_time[sleept]}
sudo rmmod ${TARGET_MODULE[1]}
done
mapfile -t inserts < <(sudo dmesg | grep "rcuhashbash summary: inserts" | awk '{print $4}')
for i in "${!inserts[@]}"; do
echo "${sleep_time[i]} ${inserts[i]}"
done > output_table_mutex.txt
gnuplot script_insert.gp