Skip to content

Commit

Permalink
Merge branch 'main' into bio_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhuoxuan-Zhang authored Nov 12, 2024
2 parents 3b4bc71 + f9d81e7 commit d19ac15
Show file tree
Hide file tree
Showing 177 changed files with 1,082 additions and 1,737 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ jobs:
run-benchmark:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
benchmark: [nlp, file-enc, unix50, log-analysis, max-temp, uniq-ips, media-conv, sklearn, covid-mts, bio]


steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -30,6 +32,7 @@ jobs:

- name: Upload .out and .err files
uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ matrix.benchmark }}-logs
path: ${{ matrix.benchmark }}/${{ matrix.benchmark }}.*
Expand Down
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,28 @@

> _It's a suite that has benchmarks in it._
## Docker
## Benchmarks

| Benchmark | Description |
| --------- | ----------- |
| aurpkg | |
| bio | Bioinformatics. |
| covid-mts | COVID-19 multivariate time series. |
| file-enc | File encoding. |
| log-analysis | Log analysis. |
| max-temp | Maximum temperature. |
| media-conv | Media conversion. |
| nlp | Natural language processing. |
| oneliners | One-liners. |
| riker | |
| sklearn | Machine learning. |
| teraseq | |
| tuft-weather | Tuft weather. |
| uniq-ips | Unique IPs. |
| unix50 | Unix 50. |
| web-index | Web index. |

## Docker Instructions

```sh
# Build the container
Expand Down
4 changes: 0 additions & 4 deletions analysis-logs/input/.kaggle/kaggle.json

This file was deleted.

1 change: 0 additions & 1 deletion analysis-logs/input/checksum.md5

This file was deleted.

8 changes: 0 additions & 8 deletions analysis-logs/input/cleanup.sh

This file was deleted.

30 changes: 0 additions & 30 deletions analysis-logs/input/input.sh

This file was deleted.

17 changes: 0 additions & 17 deletions analysis-logs/input/run.sh

This file was deleted.

15 changes: 0 additions & 15 deletions analysis-logs/input/verify.sh

This file was deleted.

21 changes: 0 additions & 21 deletions analysis-logs/nginx.sh

This file was deleted.

2 changes: 0 additions & 2 deletions analysis-pcap/count_packets.sh

This file was deleted.

1 change: 0 additions & 1 deletion analysis-pcap/input/checksum.md5

This file was deleted.

Empty file removed analysis-pcap/input/cleanup.sh
Empty file.
15 changes: 0 additions & 15 deletions analysis-pcap/input/input.sh

This file was deleted.

24 changes: 0 additions & 24 deletions analysis-pcap/input/run.sh

This file was deleted.

15 changes: 0 additions & 15 deletions analysis-pcap/input/verify.sh

This file was deleted.

6 changes: 0 additions & 6 deletions analysis-pcap/pcap_bench.sh

This file was deleted.

40 changes: 0 additions & 40 deletions analysis-pcap/split_pcap.sh

This file was deleted.

6 changes: 3 additions & 3 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ correct() { [ "$(cat $BENCHMARK.hash | cut -d' ' -f 2 | grep -c 1)" -eq 0 ]; }

main()
{
export BENCHMARK="$1"
shift

cd "$(dirname "$0")/$BENCHMARK" || exit 1

# Download dependencies
Expand All @@ -34,7 +37,4 @@ main()
cd - || exit 1
}

export BENCHMARK="$1"
shift

main $@
8 changes: 8 additions & 0 deletions oneliners/deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

sudo apt update
sudo apt install -y \
wget \
bsdmainutils \
file \
dos2unix
2 changes: 1 addition & 1 deletion oneliners/hashes/small/diff.hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1095af6f701dc683c2c88fcd4cdf86fe324f10784a540b38d3240e279e3af244
e0f3f7916effc9373fa39b3a8c211671305b5771d4a8bb10b37c3b9a5cf1f2b7
2 changes: 1 addition & 1 deletion oneliners/hashes/small/nfa-regex.hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4582552d134115ffd6052b5e445c9eb775304da7c2c1f86b32599eb04c6eff63
589f64d6c9a5c9501b0a2b92ee35a880fcdf2b89075628b18d3472661d00fcb6
2 changes: 1 addition & 1 deletion oneliners/hashes/small/set-diff.hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b82baa59f30e29dd37094d092df024e376dd2ca1d62c23339b2b009b692eedaa
e737aa088e2771e162fb60ce42d9374c8a8768b9bba9f3d6aaba6c7b47bbd862
1 change: 0 additions & 1 deletion oneliners/hashes/small/shortest-scripts.hash

This file was deleted.

2 changes: 1 addition & 1 deletion oneliners/hashes/small/sort-sort.hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bba05f5706fffdfcc17244553a01595957fe7de6025a404da5e9e826e694667f
b10dd497b66955e63cf32eb3a4796d7edd0ae4876a450cca6970a9d261968780
2 changes: 1 addition & 1 deletion oneliners/hashes/small/sort.hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18979d4fae333d462c406a7cb4d9a59db5b935d5f6b95e8ab9e737b744432b96
965dfcdb1fa45be5cb5b125683e01a1882d2693384cd76782beacadfda5f2872
2 changes: 1 addition & 1 deletion oneliners/hashes/small/spell.hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4aae590c69ab5f5aa63f101c330b15942ae8e94f356d8c45598061e795edbdb4
83a9657314b52598447ebc4a4a6717fdd23d3d81b27e4821d434054a989a97b9
5 changes: 3 additions & 2 deletions oneliners/inputs.sh → oneliners/input.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ cd inputs
input_files=("1M.txt" "1G.txt" "3G.txt" "all_cmds.txt" "all_cmdsx100.txt" "dict.txt")

if [ ! -f ./1M.txt ]; then
wget https://atlas-group.cs.brown.edu/data/dummy/1M.txt
wget --no-check-certificate https://atlas-group.cs.brown.edu/data/dummy/1M.txt
# TODO: Add newline to the original file
echo >> 1M.txt
dos2unix 1M.txt
fi

if [ ! -f ./1G.txt ]; then
Expand All @@ -27,7 +28,7 @@ if [ ! -f ./3G.txt ]; then
fi

if [ ! -f ./dict.txt ]; then
wget -O - https://atlas-group.cs.brown.edu/data/dummy/dict.txt | sort > dict.txt
wget -O - https://atlas-group.cs.brown.edu/data/dummy/dict.txt --no-check-certificate | sort > dict.txt
fi

if [ ! -f ./all_cmds.txt ]; then
Expand Down
42 changes: 11 additions & 31 deletions oneliners/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ if [[ "$@" == *"--small"* ]]; then
"bi-grams;1M"
"set-diff;1M"
"sort-sort;1M"
"shortest-scripts;all_cmds"
)
else
scripts_inputs=(
Expand All @@ -28,40 +27,21 @@ else
"bi-grams;3G"
"set-diff;3G"
"sort-sort;3G"
"shortest-scripts;all_cmdsx100"
)
fi

mkdir -p "outputs"
all_res_file="./outputs/oneliners.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
oneliners() {
mkdir -p "outputs/$1"
mode_res_file="./outputs/$1/oneliners.res"
> $mode_res_file
echo executing oneliners $(date)

echo executing oneliners $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/${parsed[0]}.out"

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
}

oneliners "bash"
echo "$script_file"
time "$SHELL" "$script_file" "$input_file" > "$output_file"
echo "$?"
done
Loading

0 comments on commit d19ac15

Please sign in to comment.