about summary refs log tree commit diff homepage
path: root/tools
diff options
context:
space:
mode:
authorMartin Nowack <m.nowack@imperial.ac.uk>2020-02-20 12:56:15 +0000
committerCristian Cadar <c.cadar@imperial.ac.uk>2020-03-01 20:29:18 +0000
commitf9744300055b6afcfa9424b6cb7982072018c74a (patch)
treecc131cc90436b5e0d62fe3cab664d212fcd60139 /tools
parentf62f8b954a00ae8538f8d3ef2aad77c11e6ed710 (diff)
downloadklee-f9744300055b6afcfa9424b6cb7982072018c74a.tar.gz
[klee-stats] Use the last row inserted instead of the row with highest Instructions
Last `Instructions` is not a good identifier to retrieve the correct row.
For the default setup, KLEE will generate two entries with the same last instruction.
One before clean-up and one after clean-up (i.e. if states are terminated on halt).

Using `rowid` will select the last line.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/klee-stats/klee-stats2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/klee-stats/klee-stats b/tools/klee-stats/klee-stats
index 78b7b0cb..f68502f0 100755
--- a/tools/klee-stats/klee-stats
+++ b/tools/klee-stats/klee-stats
@@ -81,7 +81,7 @@ class LazyEvalList:
 
     def getLastRecord(self):
         try:
-            cursor = self.conn().execute("SELECT * FROM stats ORDER BY Instructions DESC LIMIT 1")
+            cursor = self.conn().execute("SELECT * FROM stats ORDER BY rowid DESC LIMIT 1")
             column_names = [description[0] for description in cursor.description]
             return dict(zip(column_names, cursor.fetchone()))
         except sqlite3.OperationalError as e: