Commits

Chris Perl  committed 87aa4bf

Fixing up UI stuff to match previous commit

  • Participants
  • Parent commits 2d1c059

Comments (0)

Files changed (1)

File loganalyze.py

         self._display_x_count(data, num_talkers, "%-20s %10d")
 
     def _display_x_hits_per_time(self, data):
-        sorted_keys = sorted(data, lambda a,b: cmp(data[a]['total_hits'], data[b]['total_hits']))
+        sorted_keys = sorted(data, lambda a,b: cmp(data[a].hits, data[b].hits))
         for key in sorted_keys:
-            print "%-100s %10d" % (key, data[key]['total_hits'])
-            time_period_keys = [ x for x in data[key] if x != 'total_hits']
+            print "%-100s %10d" % (key, data[key].hits)
+            time_period_keys = [ x for x in data[key] ]
             sorted_time_period_keys = sorted(time_period_keys, lambda a,b: cmp(a[0], b[0]))
             for bucket_bottom, bucket_top in sorted_time_period_keys:
                 print "\t%s - %s %20d" % (bucket_bottom, bucket_top, 
         self._display_x_hits_per_time(data)
 
     def _display_x_time_to_render(self, data):
-        sorted_keys = sorted(data, lambda a,b: cmp(data[a]['total_hits'], data[b]['total_hits']))
+        sorted_keys = sorted(data, lambda a,b: cmp(data[a].hits, data[b].hits))
         for key in sorted_keys:
-            print "%-100s %10d" % (key, data[key]['total_hits'])
-            ms_period_keys = [ x for x in data[key] if x != 'total_hits']
+            print "%-100s %10d" % (key, data[key].hits)
+            ms_period_keys = [ x for x in data[key] ]
             sorted_ms_period_keys = sorted(ms_period_keys, lambda a,b: cmp(a[0], b[0]))
             for bucket_bottom, bucket_top in sorted_ms_period_keys:
                     print "\t%4d ms - %4d ms %10d" % (bucket_bottom, bucket_top,