Skip to content

Commit

Permalink
minor fix (#102)
Browse files Browse the repository at this point in the history
Co-authored-by: Juncheng Yang <[email protected]>
  • Loading branch information
jycmu2024 and Juncheng Yang authored Nov 6, 2024
1 parent f4d6bf0 commit 3a53233
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/plot_mrc_size.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def plot_mrc_size(
plt.plot(
[x[0] / size_unit for x in mrc],
miss_ratio if not use_byte_miss_ratio else byte_miss_ratio,
linewidth=4,
linewidth=2.4,
# marker=next(markers),
# markersize=1,
linestyle=next(linestyles),
Expand Down Expand Up @@ -225,7 +225,7 @@ def run():

if __name__ == "__main__":
default_args = {
"algos": "fifo,lru,arc,lhd,lecar,s3fifo,sieve",
"algos": "fifo,lru,arc,lhd,tinylfu,lecar,s3fifo,sieve",
"sizes": "0.001,0.005,0.01,0.02,0.05,0.10,0.20,0.40",
}
import argparse
Expand All @@ -236,7 +236,8 @@ def run():
+ "--tracepath ../data/twitter_cluster52.csv "
"--trace-format csv "
'--trace-format-params="time-col=1,obj-id-col=2,obj-size-col=3,delimiter=,,obj-id-is-num=1" '
"--algos=fifo,lru,lecar,s3fifo"
"--algos=fifo,lru,lecar,s3fifo "
"--sizes=0.001,0.005,0.01,0.02,0.05,0.10,0.20,0.40"
)
p.add_argument("--tracepath", type=str, required=False)
p.add_argument(
Expand Down
31 changes: 31 additions & 0 deletions scripts/run_traceAnalyzer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

function help() {
echo "Usage: $0 <tracepath> <trace_format> [<trace_format_parameters>]"
}

if [ $# -lt 2 ]; then
help;
exit 1;
fi

CURR_DIR=$(cd $(dirname $0); pwd)
tracepath=$1
trace_format=$2
trace_format_parameters=${@:3}

./_build/bin/traceAnalyzer ${tracepath} ${trace_format} ${trace_format_parameters} --common

dataname=$(basename ${tracepath})
python3 ${CURR_DIR}/traceAnalysis/access_pattern.py ${dataname}.accessRtime
python3 ${CURR_DIR}/traceAnalysis/access_pattern.py ${dataname}.accessVtime
python3 ${CURR_DIR}/traceAnalysis/req_rate.py ${dataname}.reqRate_w300
python3 ${CURR_DIR}/traceAnalysis/size.py ${dataname}.size
python3 ${CURR_DIR}/traceAnalysis/reuse.py ${dataname}.reuse
python3 ${CURR_DIR}/traceAnalysis/popularity.py ${dataname}.popularity
# python3 ${CURR_DIR}/traceAnalysis/requestAge.py ${dataname}.requestAge
# python3 ${CURR_DIR}/traceAnalysis/size_heatmap.py ${dataname}.sizeWindow_w300
# python3 ${CURR_DIR}/traceAnalysis/futureReuse.py ${dataname}.access

# python3 ${CURR_DIR}/traceAnalysis/popularity_decay.py ${dataname}.popularityDecay_w300_obj
# python3 ${CURR_DIR}/traceAnalysis/reuse_heatmap.py ${dataname}.reuseWindow_w300
17 changes: 17 additions & 0 deletions scripts/utils/const.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

KiB = 1024
MiB = 1024 * KiB
GiB = 1024 * MiB
TiB = 1024 * GiB
PiB = 1024 * TiB
EiB = 1024 * PiB
ZiB = 1024 * EiB
YiB = 1024 * ZiB

KB = 1000
MB = 1000 * KB
GB = 1000 * MB
TB = 1000 * GB
PB = 1000 * TB
EB = 1000 * PB

0 comments on commit 3a53233

Please sign in to comment.