Skip to content

Commit

Permalink
just unix50
Browse files Browse the repository at this point in the history
  • Loading branch information
EtomicBomb committed Oct 20, 2024
1 parent 10fed6b commit 79bfcea
Show file tree
Hide file tree
Showing 41 changed files with 171 additions and 239 deletions.
8 changes: 5 additions & 3 deletions unix50/cleanup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

cd "$(realpath $(dirname "$0"))"
rm -rf ./inputs
rm -rf ./outputs
REPO_TOP=$(git rev-parse --show-toplevel)
eval_dir="${REPO_TOP}/unix50"
results_dir="${eval_dir}/results"

rm -rf $results_dir
34 changes: 34 additions & 0 deletions unix50/hashes/result.full.md5sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
32e0664ae2ad6095cf06b569b373d394 result.full/1.sh.out
2a8d266136df838fd9c30652eb6ce17f result.full/10.sh.out
3ebcd7351a102b3fe189b46879df3ecb result.full/11.sh.out
5c6d81c07f7c268ca6a5c4a9c829dd97 result.full/12.sh.out
532bfbf83d0701fb43f87dbd2249e153 result.full/13.sh.out
4570612cf7135c26f43161ab3ff8c611 result.full/14.sh.out
65d657ba7ad6fa168765bf1e7ffdc579 result.full/15.sh.out
f43778d8f6da6748d97af43247bde326 result.full/16.sh.out
ea1bb5dfd8c6dd598a81778566eb73ca result.full/17.sh.out
b621a9341f154b0c0ebcab328d554c5d result.full/18.sh.out
8cc10d7056dbe21f5c18e071303bbc9a result.full/19.sh.out
b16acc158f5eba7308a8ae87725ab1d7 result.full/2.sh.out
041231a2a1a0e0fff6a8757bc8ff34fd result.full/20.sh.out
8cfabaff483ed87a4fab9ee3099ff209 result.full/21.sh.out
45dfbeed037f4aff5753dc76cc0e1625 result.full/23.sh.out
9a48bc2cc03763427d820b674743e96c result.full/24.sh.out
b44ab60a17604420ab452c793f155b16 result.full/25.sh.out
f7557173e63e417d582059af2bcab97a result.full/26.sh.out
8e4366f8dcd97f00687763abf9a1d6b6 result.full/28.sh.out
de9da587ab738401bddb756eb96b492e result.full/29.sh.out
edee7d8c7401d05159c76ba25f940015 result.full/3.sh.out
955ebbf0224639a9ea822f494604dd07 result.full/30.sh.out
9bdcdc35ae72a85ec159437455fc4a93 result.full/31.sh.out
d40d8a25ac20e9e2a3ffb13408d0375c result.full/32.sh.out
ee127e272d755977337c66271c3e0735 result.full/33.sh.out
ddd8f73a9e0e4da6b3c9f73f3afe395c result.full/34.sh.out
1ffec3e7648c6e8faa8cc5c6e176dbd3 result.full/35.sh.out
2c255881915b264241be7f3036fd03db result.full/36.sh.out
9a5c6e7002452ebf6b3f0d2af77b1390 result.full/4.sh.out
2c6bec7b07a24ed51e7f8fc38cb6b235 result.full/5.sh.out
452e3baed8c566d27fb6fadad1aae9a4 result.full/6.sh.out
5d430443367225b70a097f18da654870 result.full/7.sh.out
c5b3eb7b545f67b994e4f717021141cb result.full/8.sh.out
72d28252d1e91e9beec22a5f8ff739a2 result.full/9.sh.out
34 changes: 34 additions & 0 deletions unix50/hashes/result.small.md5sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
5c8039fca1294f21ddb564e3611e9d17 result.small/1.sh.out
27c713c5af0b2a2ca28613a0f0f04316 result.small/10.sh.out
a36909e7308b97697b3f6806e101bd32 result.small/11.sh.out
5c6d81c07f7c268ca6a5c4a9c829dd97 result.small/12.sh.out
541f7c03e93b905113e08d8b57850e40 result.small/13.sh.out
691b270d27c2116dde7cc2926338b958 result.small/14.sh.out
e64206618b6edebf438e3da660ce631d result.small/15.sh.out
f43778d8f6da6748d97af43247bde326 result.small/16.sh.out
a99346cf970f52cb58178f8667c99624 result.small/17.sh.out
993647e71651a205aba9934350da959c result.small/18.sh.out
83589b22cf04f29f32c5d4df70cfb4db result.small/19.sh.out
d1a9d374708a7128ca2ed9505e2025c0 result.small/2.sh.out
041231a2a1a0e0fff6a8757bc8ff34fd result.small/20.sh.out
bbd56d68cfb6e2ecd641669ec17d5fc1 result.small/21.sh.out
45dfbeed037f4aff5753dc76cc0e1625 result.small/23.sh.out
4055388fa0eea326b9a9523ec4976ea0 result.small/24.sh.out
8e9114389cea487ea886bb0cc7edce9e result.small/25.sh.out
20cfa519046f36b54cdd4f35b80b2bac result.small/26.sh.out
92c2fd488dca039920c34c0acaa2f7b4 result.small/28.sh.out
953e25c0870b4e1693abd88c5df79215 result.small/29.sh.out
edee7d8c7401d05159c76ba25f940015 result.small/3.sh.out
179ef5fabf523aa7e38607e300e6449c result.small/30.sh.out
a602c5bd15a6511a048dfa5f058e8ef4 result.small/31.sh.out
5fa7b7f13a1e0a30b5022c2ca90813d4 result.small/32.sh.out
1588d38c600904a4e803d85f1016e45a result.small/33.sh.out
ddd8f73a9e0e4da6b3c9f73f3afe395c result.small/34.sh.out
7217d4aa18d6fb971ad8aa16b46fe93f result.small/35.sh.out
0834b96c529c633ae1c382dc5e2757b5 result.small/36.sh.out
64879f82d15493a877ecd19087ca82de result.small/4.sh.out
402f314664d6ca12a6cfa410e80c70b0 result.small/5.sh.out
1d317f56449449687637d4fa1dc6d4fa result.small/6.sh.out
fdda3a269df78b91c6de31e579d54b21 result.small/7.sh.out
7ca91ab67c0718d79181096a10093a30 result.small/8.sh.out
72e545f78ff971883548ff4b0f59f5d3 result.small/9.sh.out
1 change: 0 additions & 1 deletion unix50/hashes/small/1.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/10.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/11.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/12.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/13.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/14.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/15.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/16.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/17.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/18.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/19.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/2.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/20.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/21.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/23.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/24.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/25.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/26.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/28.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/29.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/3.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/30.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/31.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/32.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/33.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/34.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/35.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/36.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/4.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/5.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/6.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/7.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/8.hash

This file was deleted.

1 change: 0 additions & 1 deletion unix50/hashes/small/9.hash

This file was deleted.

22 changes: 22 additions & 0 deletions unix50/input.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

REPO_TOP=$(git rev-parse --show-toplevel)
eval_dir="${REPO_TOP}/unix50"
input_dir="${eval_dir}/input"

mkdir -p $input_dir/small
mkdir -p $input_dir/full

for input in 1 10 11 12 2 3 4 5 6 7 8 9.1 9.2 9.3 9.4 9.5 9.6 9.7 9.8 9.9
do
content="$(curl --insecure "https://atlas-group.cs.brown.edu/data/unix50/${input}.txt")"

small="$input_dir/small/${input}_1M.txt"
yes "$content" | head -c 1048576 > $small

filename="$input_dir/full/${input}_3G.txt"
truncate -s0 $filename
for i in {0..1000}; do # can change this back to 3000 for 3G
cat $small >> $filename
done
done
31 changes: 0 additions & 31 deletions unix50/inputs.sh

This file was deleted.

173 changes: 58 additions & 115 deletions unix50/run.sh
Original file line number Diff line number Diff line change
@@ -1,119 +1,62 @@
#!/bin/bash

export SUITE_DIR=$(realpath $(dirname "$0"))
export TIMEFORMAT=%R
cd $SUITE_DIR

REPO_TOP=$(git rev-parse --show-toplevel)
eval_dir="${REPO_TOP}/unix50"
input_dir="${eval_dir}/input"
results_dir="${eval_dir}/results"
scripts_dir="${eval_dir}/scripts"
scripts_dir="${eval_dir}/scripts"

txt_inputs=$input_dir/full
suffix=.full
size_suffix=_3G.txt
if [[ "$@" == *"--small"* ]]; then
scripts_inputs=(
"1;1_1M"
"2;1_1M"
"3;1_1M"
"4;1_1M"
"5;2_1M"
"6;3_1M"
"7;4_1M"
"8;4_1M"
"9;4_1M"
"10;4_1M"
"11;4_1M"
"12;4_1M"
"13;5_1M"
"14;6_1M"
"15;7_1M"
"16;7_1M"
"17;7_1M"
"18;8_1M"
"19;8_1M"
"20;8_1M"
"21;8_1M"
# "22;8_1M"
"23;9.1_1M"
"24;9.2_1M"
"25;9.3_1M"
"26;9.4_1M"
# "27;9.5_1M"
"28;9.6_1M"
"29;9.7_1M"
"30;9.8_1M"
"31;9.9_1M"
"32;10_1M"
"33;10_1M"
"34;10_1M"
"35;11_1M"
"36;11_1M"
)
else
scripts_inputs=(
"1;1_3G"
"2;1_3G"
"3;1_3G"
"4;1_3G"
"5;2_3G"
"6;3_3G"
"7;4_3G"
"8;4_3G"
"9;4_3G"
"10;4_3G"
"11;4_3G"
"12;4_3G"
"13;5_3G"
"14;6_3G"
"15;7_3G"
"16;7_3G"
"17;7_3G"
"18;8_3G"
"19;8_3G"
"20;8_3G"
"21;8_3G"
# "22;8_3G"
"23;9.1_3G"
"24;9.2_3G"
"25;9.3_3G"
"26;9.4_3G"
# "27;9.5_3G"
"28;9.6_3G"
"29;9.7_3G"
"30;9.8_3G"
"31;9.9_3G"
"32;10_3G"
"33;10_3G"
"34;10_3G"
"35;11_3G"
"36;11_3G"
)
txt_inputs=$input_dir/small
suffix=.small
size_suffix=_1M.txt
fi

mkdir -p "outputs"
all_res_file="./outputs/unix50.res"
> $all_res_file

# time_file stores the time taken for each script
# mode_res_file stores the time taken and the script name for every script in a mode (e.g. bash, pash, dish, fish)
# all_res_file stores the time taken for each script for every script run, making it easy to copy and paste into the spreadsheet
unix50() {
mkdir -p "outputs/$1"
mode_res_file="./outputs/$1/unix50.res"
> $mode_res_file

echo executing unix50 $1 $(date) | tee -a $mode_res_file $all_res_file

for script_input in ${scripts_inputs[@]}
do
IFS=";" read -r -a parsed <<< "${script_input}"
script_file="./scripts/${parsed[0]}.sh"
input_file="./inputs/${parsed[1]}.txt"
output_file="./outputs/$1/${parsed[0]}.out"
time_file="./outputs/$1/${parsed[0]}.time"
log_file="./outputs/$1/${parsed[0]}.log"

if [[ "$1" == "bash" ]]; then
(time $script_file $input_file > $output_file) 2> $time_file
fi

cat "${time_file}" >> $all_res_file
echo "$script_file $(cat "$time_file")" | tee -a $mode_res_file
done
}

unix50 "bash"
txt_outputs=$results_dir/result$suffix
mkdir -p $txt_outputs

inputs=(
"1.sh;1"
"2.sh;1"
"3.sh;1"
"4.sh;1"
"5.sh;2"
"6.sh;3"
"7.sh;4"
"8.sh;4"
"9.sh;4"
"10.sh;4"
"11.sh;4"
"12.sh;4"
"13.sh;5"
"14.sh;6"
"15.sh;7"
"16.sh;7"
"17.sh;7"
"18.sh;8"
"19.sh;8"
"20.sh;8"
"21.sh;8"
# "22.sh;8"
"23.sh;9.1"
"24.sh;9.2"
"25.sh;9.3"
"26.sh;9.4"
# "27.sh;9.5"
"28.sh;9.6"
"29.sh;9.7"
"30.sh;9.8"
"31.sh;9.9"
"32.sh;10"
"33.sh;10"
"34.sh;10"
"35.sh;11"
"36.sh;11"
)
for input in "${inputs[@]}"; do
IFS=';' read -r script input <<< "$input"
$scripts_dir/$script $txt_inputs/$input$size_suffix > $txt_outputs/$script.out
done
Loading

0 comments on commit 79bfcea

Please sign in to comment.