-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathtestscript
executable file
·35 lines (27 loc) · 1.18 KB
/
testscript
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
#/!/bin/bash
#File: testscript
#Author: Andy Sayler
#Project: CSCI 3753 Programming Assignment 3
#Create Date: 2012/03/09
#Modify Date: 2012/03/21
#Description:
# A simple bash script to run a signle copy of each test case
# and gather the relevent data.
ITERATIONS=100000000
BYTESTOCOPY=102400
BLOCKSIZE=1024
TIMEFORMAT="wall=%e user=%U system=%S CPU=%P i-switched=%c v-switched=%w"
MAKE="make -s"
echo Building code...
$MAKE clean
$MAKE
echo Starting test runs...
echo Calculating pi over $ITERATIONS iterations using SCHED_OTHER with 1 simultaneous process...
/usr/bin/time -f "$TIMEFORMAT" ./pi-sched $ITERATIONS SCHED_OTHER > /dev/null
echo Calculating pi over $ITERATIONS iterations using SCHED_FIFO with 1 simultaneous process...
/usr/bin/time -f "$TIMEFORMAT" sudo ./pi-sched $ITERATIONS SCHED_FIFO > /dev/null
echo Calculating pi over $ITERATIONS iterations using SCHED_RR with 1 simultaneous process...
/usr/bin/time -f "$TIMEFORMAT" sudo ./pi-sched $ITERATIONS SCHED_RR > /dev/null
echo Copying $BYTESTOCOPY bytes in blocks of $BLOCKSIZE from rwinput to rwoutput
echo using SCHED_OTHER with 1 simultaneous process...
/usr/bin/time -f "$TIMEFORMAT" ./rw $BYTESTOCOPY $BLOCKSIZE > /dev/null