Remi Meier avatar Remi Meier committed 730d8d1

stm: plot_log modifications

Comments (0)

Files changed (1)

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)
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.