Skip to content

Commit 84a44b2

Browse files
authored
Fix plot scripts and doc for traceAnalyzer (#68)
* Fix scripts for traceAnalyzer * Update doc of traceAnalyzer
1 parent 3abee5f commit 84a44b2

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

doc/quickstart_traceAnalyzer.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ After generating plot data, we can plot access pattern, request rate, size, reus
7979
python3 scripts/traceAnalysis/access_pattern.py ${dataname}.accessRtime
8080

8181
# plot the access pattern using logical/virtual (request count) time
82-
python3 scripts/traceAnalysis/access_pattern.py ${dataname}.accessRtime
82+
python3 scripts/traceAnalysis/access_pattern.py ${dataname}.accessVtime
8383
```
8484

8585
Some example plots are shown below:
@@ -243,7 +243,7 @@ There are two versions of the plots, one is line plot, and the other is a heatma
243243
```bash
244244
# this requires a long trace (e.g., 7 day) to generate a meaningful plot
245245
# and most block workloads do not have enough requests to plot meaningful popularity decay
246-
python3 scripts/traceAnalysis/popularity_decay.py ${dataname}.popularityDecay_w300
246+
python3 scripts/traceAnalysis/popularity_decay.py ${dataname}.popularityDecay_w300_obj
247247
```
248248

249249
<!-- Some example plots are shown below:

scripts/traceAnalysis/access_pattern.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def plot_access_pattern(
105105
is_real_time = "Rtime" in datapath
106106
if is_real_time:
107107
xlabel = "Time (hour)"
108-
figname = "fig/{}_access_rt.{}".format(figname_prefix, FIG_TYPE)
108+
figname = "{}/{}_access_rt.{}".format(FIG_DIR, figname_prefix, FIG_TYPE)
109109
for idx, ts_list in enumerate(access_time_list):
110110
# access_rtime_list stores N objects, each object has one access pattern list
111111
plt.scatter(
@@ -117,7 +117,7 @@ def plot_access_pattern(
117117
"Vtime" in datapath
118118
), "the input file might not be accessPattern data file"
119119
xlabel = "Time (# million requests)"
120-
figname = "fig/{}_access_vt.{}".format(figname_prefix, FIG_TYPE)
120+
figname = "{}/{}_access_vt.{}".format(FIG_DIR, figname_prefix, FIG_TYPE)
121121
for idx, ts_list in enumerate(access_time_list):
122122
# access_rtime_list stores N objects, each object has one access pattern list
123123
plt.scatter(

scripts/traceAnalysis/experimental/scanSize.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def plot_scan_size(datapath, figname_prefix=""):
5757

5858
plt.xlabel("Scan size")
5959
plt.ylabel("Count")
60-
plt.savefig("{}_scan_size.png".format(figname_prefix), bbox_inches="tight")
60+
plt.savefig("{}/{}_scan_size.{}".format(FIG_DIR, figname_prefix, FIG_TYPE), bbox_inches="tight")
6161
plt.clf()
6262

6363
x, y = conv_to_cdf(scan_size_cnt)
@@ -74,7 +74,7 @@ def plot_scan_size(datapath, figname_prefix=""):
7474
plt.grid(linestyle="--")
7575
plt.xlabel("Scan size")
7676
plt.ylabel("CDF")
77-
plt.savefig("{}_scan_size_cdf.png".format(figname_prefix), bbox_inches="tight")
77+
plt.savefig("{}/{}_scan_size_cdf.{}".format(FIG_DIR, figname_prefix, FIG_TYPE), bbox_inches="tight")
7878
plt.clf()
7979

8080

scripts/traceAnalysis/run.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
dataname=$1
44

5-
python3 access_pattern.py ${dataname}.access
5+
python3 access_pattern.py ${dataname}.accessRtime
6+
python3 access_pattern.py ${dataname}.accessVtime
67
python3 req_rate.py ${dataname}.reqRate_w300
78
python3 size.py ${dataname}.size
89
python3 reuse.py ${dataname}.reuse
@@ -11,5 +12,5 @@ python3 popularity.py ${dataname}.popularity
1112
python3 size_heatmap.py ${dataname}.sizeWindow_w300
1213
# python3 futureReuse.py ${dataname}.access
1314

14-
python3 popularity_decay.py ${dataname}.popularityDecay_w300
15+
python3 popularity_decay.py ${dataname}.popularityDecay_w300_obj
1516
python3 reuse_heatmap.py ${dataname}.reuseWindow_w300

0 commit comments

Comments
 (0)