Skip to content

Commit

Permalink
Analyze update
Browse files Browse the repository at this point in the history
  • Loading branch information
SoveraNia committed Jan 16, 2020
1 parent 70481d0 commit 5257b44
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions analyze/analyze_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,18 @@ def plotCoverage(tests=["RAMINDEX", "KCOV"]):
tmp[name0] = cliffsDelta(data[name0], data[name1], key="Time_Elapsed", value="Total_Coverage", bin_size=600)
plot(tmp, 0, 1, xlabel="Time elapsed (hr)", ylabel="Cliff's Delta", outfile="coverage_cd_time.png", xunit=3600.0, nmarkers=12, xstep=4);
# Average / median result
print("Median")
tmp = {}
for name in data:
tmp[name] = averageData(data[name], key="Time_Elapsed", value="Total_Coverage", bin_size=600)
plot(tmp, 0, 1, xlabel="Time elapsed (hr)", ylabel="Coverage (# edges)", outfile="coverage_%s_time.png" % module, xunit=3600.0, nmarkers=12, xstep=4);
print(name, tmp[name][-1])
plot(tmp, 0, 1, xlabel="Time elapsed (hr)", ylabel="Coverage (1000 edges)", outfile="coverage_%s_time.png" % module, xunit=3600.0, yunit=1000.0, nmarkers=12, xstep=4);
print("Mean")
tmp = {}
for name in data:
tmp[name] = averageData(data[name], key="Time_Elapsed", value="Total_Coverage", bin_size=600, median=False)
plot(tmp, 0, 1, xlabel="Time elapsed (hr)", ylabel="Coverage (# edges)", outfile="coverage_%s_time_mean.png" % module, xunit=3600.0, nmarkers=12, xstep=4);
print(name, tmp[name][-1])
plot(tmp, 0, 1, xlabel="Time elapsed (hr)", ylabel="Coverage (1000 edges)", outfile="coverage_%s_time_mean.png" % module, xunit=3600.0, yunit=1000.0, nmarkers=12, xstep=4);
#tmp = {}
#for name in data:
# tmp[name] = averageData(data[name], key="Syscall_Count", value="Total_Coverage")
Expand Down
2 changes: 1 addition & 1 deletion analyze/analyze_crashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def buildCrashDb(datas):
for csig in d:
print(d[csig]["Description"])
desc = d[csig]["Description"].strip('\n')
crash_dir = "crash-db/" + desc.replace(' ', '_').replace('\n', '_')
crash_dir = "crash-db/" + desc.replace(' ', '_').replace('\n', '_').replace(':', '').replace("'", '')
if not desc in db:
db[desc] = {
"Discover_Count": {},
Expand Down
4 changes: 2 additions & 2 deletions analyze/analyze_mab.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def __processTest(test):
status["ts"] = (ts_cur - ts_bgn) / 1000000000
cur_ts = status["ts"]
ret.append(copy.deepcopy(status))
elif line[0] == '-' and ("MAB Dequeue: " in line or "MAB Update: " in line or "MAB Poll: " in line or "MAB Sync " in line or "MAB NewTriage: " in line or "MAB CompleteTriage: " in line): # MAB Overhead
elif line[0] == '-' and ("MAB Dequeue: " in line or "MAB Update: " in line or "MAB Poll: " in line or "MAB Sync" in line or "MAB NewTriage: " in line or "MAB CompleteTriage: " in line): # MAB Overhead
TIME_THRESHOLD = cur_ts - prev_ts + 10.0 # Upper bound
tmp = line.split(": ");
try:
Expand Down Expand Up @@ -178,7 +178,7 @@ def plotMAB(tests=["RAMINDEX", "KCOV"]):
mab_prob_tri = {}
mab_prob_mg = {}
for name in data[module]:
if not "Sched" in name:
if not "TS" in name:
continue
# Probability
mab_prob = {"Generate": [], "Mutate": [], "Triage": []}
Expand Down

0 comments on commit 5257b44

Please sign in to comment.