about summary refs log tree commit diff homepage
path: root/tools
diff options
context:
space:
mode:
authorDomenico Fabio Marino <nospamdomi@hotmail.it>2018-01-06 11:51:32 +0000
committerCristian Cadar <c.cadar@imperial.ac.uk>2018-03-01 16:24:17 +0000
commit4ec9b9ada1aeebf55286eafa6bb39d9ecc499c2f (patch)
treee57837ca60f035691bc34fdc5e3d358db9b1f13c /tools
parentb96e0eac2fefa609b1e5d613986caa7c880185c3 (diff)
downloadklee-4ec9b9ada1aeebf55286eafa6bb39d9ecc499c2f.tar.gz
Store CexCache stats and then update klee-stats to use them
Signed-off-by: Domenico Fabio Marino <nospamdomi@hotmail.it>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/klee-stats/klee-stats10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/klee-stats/klee-stats b/tools/klee-stats/klee-stats
index 93ae33d5..34afd4c2 100755
--- a/tools/klee-stats/klee-stats
+++ b/tools/klee-stats/klee-stats
@@ -45,6 +45,8 @@ Legend = [
     ('Tcex', 'time spent in the counterexample caching code'),
     ('Tfork', 'time spent forking'),
     ('TResolve', 'time spent in object resolution'),
+    ('QCexCMisses', 'Counterexample cache misses'),
+    ('QCexCHits', 'Counterexample cache hits'),
 ]
 
 KleeTable = TableFormat(lineabove=Line("-", "-", "-", "-"),
@@ -150,7 +152,7 @@ def getLabels(pr):
         labels = ('Path', 'Instrs', 'Time(s)', 'ICov(%)', 'BCov(%)', 'ICount',
                   'TSolver(%)', 'States', 'maxStates', 'avgStates', 'Mem(MB)',
                   'maxMem(MB)', 'avgMem(MB)', 'Queries', 'AvgQC', 'Tcex(%)',
-                  'Tfork(%)')
+                  'Tfork(%)', 'QCexCMisses', 'QCexCHits')
     elif pr == 'reltime':
         labels = ('Path', 'Time(s)', 'TUser(%)', 'TSolver(%)',
                   'Tcex(%)', 'Tfork(%)', 'TResolve(%)')
@@ -169,7 +171,7 @@ def getLabels(pr):
 def getRow(record, stats, pr):
     """Compose data for the current run into a row."""
     I, BFull, BPart, BTot, T, St, Mem, QTot, QCon,\
-        _, Treal, SCov, SUnc, _, Ts, Tcex, Tf, Tr = record
+        _, Treal, SCov, SUnc, _, Ts, Tcex, Tf, Tr, QCexMiss, QCexHits = record
     maxMem, avgMem, maxStates, avgStates = stats
 
     # special case for straight-line code: report 100% branch coverage
@@ -184,7 +186,7 @@ def getRow(record, stats, pr):
                100 * (2 * BFull + BPart) / (2 * BTot), SCov + SUnc,
                100 * Ts / Treal, St, maxStates, avgStates,
                Mem, maxMem, avgMem, QTot, AvgQC,
-               100 * Tcex / Treal, 100 * Tf / Treal)
+               100 * Tcex / Treal, 100 * Tf / Treal, QCexMiss, QCexHits)
     elif pr == 'reltime':
         row = (Treal, 100 * T / Treal, 100 * Ts / Treal,
                100 * Tcex / Treal, 100 * Tf / Treal,
@@ -229,7 +231,7 @@ def drawLineChart(vectors, titles):
 
     fig = plt.figure()
     for i in range(nFigs):
-        ax = fig.add_subplot(nRow, nCol, i)
+        ax = fig.add_subplot(nRow, nCol, i+1)
         ax.plot(vectors[i])
         ax.set_title(titles[i])
         #ax.set_xlabel()