diff options
| author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-04-12 23:27:51 -0400 |
|---|---|---|
| committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-04-12 23:27:51 -0400 |
| commit | 269025c216e4245f2b10927630130db89fddf4c8 (patch) | |
| tree | 49f513db666af952d38cdfda6d7ae2c6de6f4f82 /scripts/pm_test_script | |
| parent | 4538f7e4fcaa3bf199377b9b735562e53cd1c7d3 (diff) | |
Add various test scripts
- also useful for normal debugging, not just PM
Diffstat (limited to 'scripts/pm_test_script')
| -rwxr-xr-x | scripts/pm_test_script | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/scripts/pm_test_script b/scripts/pm_test_script new file mode 100755 index 0000000..c76947b --- /dev/null +++ b/scripts/pm_test_script | |||
| @@ -0,0 +1,79 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | # | ||
| 3 | # pm_test_script: | ||
| 4 | # Batch script for running (all?) pm benchmarking experiments. | ||
| 5 | # Run it as root! | ||
| 6 | # | ||
| 7 | # Original script by John Calandrino 2008 | ||
| 8 | # Changes by Andrea Bastoni 2010 | ||
| 9 | # | ||
| 10 | # Distribution A can be in "PFAIR" "GSN-EDF" "C-EDF" "PSN-EDF"; | ||
| 11 | |||
| 12 | launchpolluter() | ||
| 13 | { | ||
| 14 | NCPU=`cat /sys/devices/system/cpu/present | cut -d - -f 2` | ||
| 15 | |||
| 16 | for i in `seq 0 $NCPU`; | ||
| 17 | do | ||
| 18 | taskset -pc $i ./pm_polluter & | ||
| 19 | done | ||
| 20 | } | ||
| 21 | |||
| 22 | run_taskset() | ||
| 23 | { | ||
| 24 | rm -f curr_taskset | ||
| 25 | cat $1 | sed "s/task //" | sed "s/\#.*//" | sed "/^$/d" >> curr_taskset | ||
| 26 | # Read task set from some source and start all tasks. | ||
| 27 | TASK=0 | ||
| 28 | while read inputline; | ||
| 29 | do | ||
| 30 | e=`echo $inputline | awk -F' ' '{print $1}'` | ||
| 31 | p=`echo $inputline | awk -F' ' '{print $2}'` | ||
| 32 | ./rt_launch -w $e $p ./pm_task "./$2/res_plugin=`expr $A`_wss=`expr $W`_tss=`expr $X`_`expr $Y`_`expr $TASK`.raw" | ||
| 33 | TASK=`expr $TASK + 1` | ||
| 34 | done < ./curr_taskset | ||
| 35 | echo "($A, $W, $X, $Y)" | ||
| 36 | # try to see if this solves the problem of the task which is not released at every run | ||
| 37 | # speculation: not properly set up when release put it in the queue | ||
| 38 | sleep 5 | ||
| 39 | ./release_ts -d 3000 | ||
| 40 | # launchpolluter | ||
| 41 | # Sleep for 150 seconds. This includes ~60 seconds | ||
| 42 | # of run time followed by 90 seconds of "tear down" time. (to save files) | ||
| 43 | # NOTE: may need to sleep longer than this... | ||
| 44 | sleep 150 | ||
| 45 | sync | ||
| 46 | # killall pm_be_polluter | ||
| 47 | # sleep 2 | ||
| 48 | killall pm_task | ||
| 49 | sleep 1 | ||
| 50 | killall rt_launch | ||
| 51 | } | ||
| 52 | |||
| 53 | for A in "GSN-EDF"; | ||
| 54 | do | ||
| 55 | echo "Setting plugin $A..." | ||
| 56 | ./setsched $A | ||
| 57 | sleep 1 | ||
| 58 | |||
| 59 | for W in 1024; | ||
| 60 | do | ||
| 61 | echo "Experiments for WSS of `expr $W`KB" | ||
| 62 | scons ARCH=x86_64 WSS=$W | ||
| 63 | sleep 1 | ||
| 64 | |||
| 65 | SET1=$(echo `seq 10 10 40`) | ||
| 66 | SET2=$(echo `seq 50 25 125`) | ||
| 67 | SET3=$(echo `seq 150 50 250`) | ||
| 68 | for X in $SET1 $SET2 $SET3; # Number of tasks | ||
| 69 | do | ||
| 70 | for Y in `seq 0 9`; # Taskset number | ||
| 71 | do | ||
| 72 | run_taskset "`expr ../$A`-ts/ts-uni_light-`expr $X`-`expr $Y`.ts" "pm_raw_results" | ||
| 73 | done | ||
| 74 | done | ||
| 75 | done | ||
| 76 | DATE=`date +%Y%m%d-%H%M` | ||
| 77 | mkdir pm_raw_results/$DATE | ||
| 78 | mv pm_raw_results/*.raw pm_raw_results/$DATE | ||
| 79 | done | ||
