diff options
author | Eugeni Dodonov <eugeni.dodonov@intel.com> | 2011-11-05 13:07:19 -0200 |
---|---|---|
committer | Eugeni Dodonov <eugeni.dodonov@intel.com> | 2012-01-06 13:34:40 -0200 |
commit | 8db6037cd53f70a65be145f5b0504300c677aec1 (patch) | |
tree | 272809fb32916d88b20e8fb0d869e6e4d6025275 | |
parent | 46feaa48ac75c7c48f29a60cebed92c4a762ab79 (diff) |
intel_gpu_analyser: Save images as SVG
This improves both resulting pdf size and their visualization. And SVG is
the future anyway.
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
-rwxr-xr-x | tools/intel_gpu_analyser.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tools/intel_gpu_analyser.py b/tools/intel_gpu_analyser.py index b1e0bf6..e1d16d6 100755 --- a/tools/intel_gpu_analyser.py +++ b/tools/intel_gpu_analyser.py @@ -46,9 +46,9 @@ MINMAXAVG=""" FIGURE=""" <p> <hr/> -<b>%(title)s</b> -<br/> <a href="%(img)s"><img src="%(img)s" width=800 height=600></a> +<br/> +<b>%(title)s</b> </p> """ @@ -174,8 +174,8 @@ def analyse(results, title, out_dir, summary="index.html"): box = ax.get_position() ax.set_position([box.x0, box.y0 + box.height * 0.1, box.width, box.height * 0.9]) ax.legend(loc = 'upper center', ncol=num_axis, fancybox=True, shadow=True, bbox_to_anchor = (0.5, -0.1)) - pylab.savefig("%s/plot_summary.png" % out_dir, format="png", dpi=200) - print >>output, FIGURE % {'img': 'plot_summary.png', + pylab.savefig("%s/plot_summary.svg" % out_dir, format="svg", dpi=200) + print >>output, FIGURE % {'img': 'plot_summary.svg', 'title': 'Summary of the execution, outlining the CPU usage (in user and system mode), per-ring GPU usage, and power usage (if available) ' } @@ -199,8 +199,8 @@ def analyse(results, title, out_dir, summary="index.html"): box = ax.get_position() ax.set_position([box.x0, box.y0 + box.height * 0.1, box.width, box.height * 0.9]) ax.legend(loc = 'upper center', ncol=num_axis, fancybox=True, shadow=True, bbox_to_anchor = (0.5, -0.1)) - pylab.savefig("%s/plot_gpu_ops.png" % out_dir, format="png", dpi=200) - print >>output, FIGURE % {'img': 'plot_gpu_ops.png', + pylab.savefig("%s/plot_gpu_ops.svg" % out_dir, format="svg", dpi=200) + print >>output, FIGURE % {'img': 'plot_gpu_ops.svg', 'title': 'Ops per interval for each GPU ring during the execution' } @@ -213,8 +213,8 @@ def analyse(results, title, out_dir, summary="index.html"): pylab.plot(results['power'], label="Power") pylab.grid() # Shink current axis's height by 10% on the bottom - pylab.savefig("%s/plot_power.png" % out_dir, format="png", dpi=200) - print >>output, FIGURE % {'img': 'plot_power.png', + pylab.savefig("%s/plot_power.svg" % out_dir, format="svg", dpi=200) + print >>output, FIGURE % {'img': 'plot_power.svg', 'title': 'Power usage over the course of execution' } @@ -237,8 +237,8 @@ def analyse(results, title, out_dir, summary="index.html"): box = ax.get_position() ax.set_position([box.x0, box.y0 + box.height * 0.1, box.width, box.height * 0.9]) ax.legend(loc = 'upper center', ncol=3, fancybox=True, shadow=True, bbox_to_anchor = (0.5, -0.1)) - pylab.savefig("%s/plot_power_cpu.png" % out_dir, format="png", dpi=200) - print >>output, FIGURE % {'img': 'plot_power_cpu.png', + pylab.savefig("%s/plot_power_cpu.svg" % out_dir, format="svg", dpi=200) + print >>output, FIGURE % {'img': 'plot_power_cpu.svg', 'title': 'Power utilization co-related to CPU' } @@ -268,8 +268,8 @@ def analyse(results, title, out_dir, summary="index.html"): box = ax.get_position() ax.set_position([box.x0, box.y0 + box.height * 0.1, box.width, box.height * 0.9]) ax.legend(loc = 'upper center', ncol=num_axis, fancybox=True, shadow=True, bbox_to_anchor = (0.5, -0.1)) - pylab.savefig("%s/plot_power_gpu.png" % out_dir, format="png", dpi=200) - print >>output, FIGURE % {'img': 'plot_power_gpu.png', + pylab.savefig("%s/plot_power_gpu.svg" % out_dir, format="svg", dpi=200) + print >>output, FIGURE % {'img': 'plot_power_gpu.svg', 'title': 'Power utilization co-related to all GPU rings' } @@ -296,8 +296,8 @@ def analyse(results, title, out_dir, summary="index.html"): box = ax.get_position() ax.set_position([box.x0, box.y0 + box.height * 0.1, box.width, box.height * 0.9]) ax.legend(loc = 'upper center', ncol=2, fancybox=True, shadow=True, bbox_to_anchor = (0.5, -0.1)) - pylab.savefig("%s/plot_power_gpu_%s.png" % (out_dir, ring), format="png", dpi=200) - print >>output, FIGURE % {'img': 'plot_power_gpu_%s.png' % ring, + pylab.savefig("%s/plot_power_gpu_%s.svg" % (out_dir, ring), format="svg", dpi=200) + print >>output, FIGURE % {'img': 'plot_power_gpu_%s.svg' % ring, 'title': 'Power utilization co-related to the %s ring' % ring } |