Skip to content

Commit 0d558d1

Browse files
committed
Further improvement of legend.
1 parent ef1a603 commit 0d558d1

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

scripts/collect_stats.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,21 @@ def _main(cmdline):
4545
total_time = 0.0
4646
for _, time in stats["table-phases"].items():
4747
total_time += time
48-
result[os.path.basename(xroot)] = {
49-
"category": "small" if num_locations < 10000 else "big",
48+
benchmark_name = os.path.basename(xroot)
49+
webgoat_lessons = [
50+
"Assignment5",
51+
"Assignment6",
52+
"BlindSendFileAssignment",
53+
"CrossSiteScriptingLesson5a",
54+
"SimpleXXE",
55+
"SqlInjectionChallenge",
56+
"SqlInjectionLesson12a",
57+
"SqlInjectionLesson5a",
58+
"SqlInjectionLesson5b",
59+
"SqlInjectionLesson6a",
60+
]
61+
result[benchmark_name] = {
62+
"category": benchmark_name if benchmark_name not in webgoat_lessons else "WebGoat",
5063
"num_goto_program_locations": num_locations,
5164
"time_in_seconds": total_time,
5265
"memory_in_mega_bytes": 0,

scripts/make_performance_scatter_plots.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,15 @@ def make_scatter_plot(
8888
all_xs = []
8989
all_ys = []
9090
idx = 0
91-
for group, points in point_groups.items():
91+
for group in sorted(point_groups.keys()):
92+
points = point_groups[group]
9293
colour, idx = choose_colour(idx)
9394
xs = []
9495
ys = []
9596
for x, y in points:
9697
xs.append(x)
9798
ys.append(y)
98-
ax.scatter(xs, ys, color=colour, label=group + " (#" + str(len(xs)) + ")")
99+
ax.scatter(xs, ys, marker="o", color=colour, label=group)
99100
all_xs += xs
100101
all_ys += ys
101102
ax.legend()
@@ -111,7 +112,7 @@ def make_scatter_plot(
111112
dx = (x_hi - x_lo) / n_steps
112113
lxs = sorted(all_xs + [x_lo + t * dx for t in range(n_steps + 1)])
113114
lys = [line_coefs[0] * x + line_coefs[1] for x in lxs]
114-
ax.plot(lxs, lys, "r-")
115+
ax.plot(lxs, lys, "k:")
115116
fig.savefig(pathname, bbox_inches='tight', format=format)
116117

117118

0 commit comments

Comments
 (0)