def dev_test(): dev_plot = plots.DevPlot({'intel_nhm': ['mem']}, {'intel_nhm': ['MemUsed']}, outdir='.', prefix='MemUsed', header='Plot all events for a device', lariat_data='pass', save=True) dev_plot.plot(filelist[0]) assert os.path.isfile(dev_plot.outdir + '/' + dev_plot.fname + '.pdf') os.remove(dev_plot.fname + '.pdf')
def type_plot(request, pk, type_name): data = get_data(pk) schema = build_schema(data,type_name) schema = [x.split(',')[0] for x in schema] k1 = {'intel_snb' : [type_name]*len(schema), 'intel_hsw' : [type_name]*len(schema), 'intel_ivb' : [type_name]*len(schema), 'intel_pmc3' : [type_name]*len(schema) } k2 = {'intel_snb': schema, 'intel_hsw': schema, 'intel_ivb' : schema, 'intel_pmc3': schema } tp = plots.DevPlot(k1=k1,k2=k2,lariat_data='pass') tp.plot(pk,job_data=data) return figure_to_response(tp)
def type_plot(pk, typename): data = get_data(pk) dp = plots.DevPlot() return components(dp.plot(data, typename))