diff options
author | Eugeni Dodonov <eugeni.dodonov@intel.com> | 2011-11-07 22:59:30 -0200 |
---|---|---|
committer | Eugeni Dodonov <eugeni.dodonov@intel.com> | 2011-11-09 11:46:10 -0200 |
commit | e48d1ce2f5c544e668c69fc955e176c601efa4ee (patch) | |
tree | 4caef2dee731442a5979093ca08998ea81d42abe | |
parent | 3ffc4289b034b0bbba809a2cc4840451278ad3d0 (diff) |
intel_gpu_analyze: plot gpu-specific power data
Also plot gpu chipset and gpu gfx power data.
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
-rwxr-xr-x | tools/intel_gpu_analyze.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/intel_gpu_analyze.py b/tools/intel_gpu_analyze.py index 513b463..9697bee 100755 --- a/tools/intel_gpu_analyze.py +++ b/tools/intel_gpu_analyze.py @@ -303,8 +303,13 @@ def analyse(results, title, out_dir, perf_logfile=None, summary="index.html"): pylab.title("Power usage summary") pylab.ylabel("Power (W)") pylab.xlabel("Time (s)") + ax = pylab.subplot(111) - pylab.plot(results['power'], label="Power") + ax.plot(results['power'], label="Power") + ax.plot(results['power.chip'], label="Chipset") + ax.plot(results['power.gfx'], label="GFX") + 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.grid() # Shink current axis's height by 10% on the bottom pylab.savefig("%s/plot_power.svg" % out_dir, format="svg", dpi=200) @@ -354,6 +359,8 @@ def analyse(results, title, out_dir, perf_logfile=None, summary="index.html"): # plotting power ax2 = ax.twinx() ax2.plot(results['time'], results["power"], label="Power (W)", color='red') + ax2.plot(results['time'], results['power.chip'], label="Chipset (W)", color='g') + ax2.plot(results['time'], results['power.gfx'], label="GFX (W)", color='m') ax2.set_ylabel('Watts') num_axis += 1 @@ -362,6 +369,7 @@ def analyse(results, title, out_dir, perf_logfile=None, 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)) + ax2.legend(loc = 'upper center', ncol=3, fancybox=True, shadow=True, bbox_to_anchor = (0.5, 0.2)) 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' @@ -383,13 +391,16 @@ def analyse(results, title, out_dir, perf_logfile=None, summary="index.html"): # plotting power ax2 = ax.twinx() ax2.plot(results['time'], results["power"], label="Power (W)", color='red') + ax2.plot(results['time'], results['power.chip'], label="Chipset", color='g') + ax2.plot(results['time'], results['power.gfx'], label="GFX", color='m') ax2.set_ylabel('Watts') pylab.grid() # Shink current axis's height by 10% on the bottom 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)) + ax.legend(loc = 'upper center', ncol=1, fancybox=True, shadow=True, bbox_to_anchor = (0.5, -0.1)) + ax2.legend(loc = 'upper center', ncol=3, fancybox=True, shadow=True, bbox_to_anchor = (0.5, 0.2)) 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 |