Commits

Remi Meier  committed 730d8d1

stm: plot_log modifications

  • Participants
  • Parent commits ac16a72
  • Branches stm-logging

Comments (0)

Files changed (1)

File pypy/tool/plot_log.py

     coords = [(x, w) for x, w, c, i in boxes]
     colors = [c for x, w, c, i in boxes]
     bars = ax.broken_barh(coords, (y+0.1, BOX_HEIGHT),
-                          facecolors=colors, lw=0.1, edgecolor=(0, 0, 0, 0.5),
+                          facecolors=colors, lw=1, edgecolor=(0, 0, 0),
                           picker=True, antialiased=False, rasterized=True)
 
     bars.boxes = boxes
 
     l += ['Successful Transaction']
     h += [Rectangle((0, 0), 1, 1, fc="g")]
-    l += ['Soon Inevitable']
+    # l += ['Regular Transaction (blue) Turning Inevitable (orange)']
+    # h += [(Rectangle((1, 1), 1, 1, fc="b"), Rectangle((2, 2), 0.1, 0.11, fc="orange"))]
+    l += ['Transaction Turning\nInevitable']
     h += [Rectangle((0, 0), 1, 1, fc="b")]
-    l += ['Inevitable']
+    l += ['Inevitable Transaction']
     h += [Rectangle((0, 0), 1, 1, fc="orange")]
     l += ['Aborted Transaction']
     h += [Rectangle((0, 0), 1, 1, fc="r")]
     # adjust labels:
     left = min([l[0][0] for l in logs.values()])
     right = max([l[-1][0] for l in logs.values()])
+
     axs[0].set_xlim((left - 0.05e6, right + 0.05e6))
 
     def label_format(x, pos):
-        return "%.2f" % ((x - left) * 1e-6, )
+        return "%.2f" % (abs((x - left) * 1e-6), )
     major_formatter = matplotlib.ticker.FuncFormatter(label_format)
     axs[0].xaxis.set_major_formatter(major_formatter)