Browse Source

fix plot_interval_ip_cum_ent to work with new interval statistics table

fix destination plotting as well
Jens Keim 5 years ago
parent
commit
44b5d056d1
1 changed files with 2 additions and 2 deletions
  1. 2 2
      code/Core/Statistics.py

+ 2 - 2
code/Core/Statistics.py

@@ -1330,7 +1330,7 @@ class Statistics:
             if ip_type is "src":
                 sod = "Src"
                 full = "Source"
-            elif ip_type is "src":
+            elif ip_type is "dst":
                 sod = "Dst"
                 full = "Destination"
             else:
@@ -1338,7 +1338,7 @@ class Statistics:
 
             plt.gcf().clear()
             result = self.stats_db.process_interval_statistics_query(
-                "SELECT lastPktTimestamp, ip%sCumEntropy FROM %s ORDER BY lastPktTimestamp" % sod)
+                "SELECT lastPktTimestamp, ip{0}CumEntropy FROM %s ORDER BY lastPktTimestamp".format(sod))
             graphx, graphy = [], []
             for row in result:
                 graphx.append(row[0])