first commit

This commit is contained in:
Ayxan committed 2022-05-23 00:16:32 +04:00
commit d660f2a4ca
24786 files changed
+4428337

No files matched your search

@@ -0,0 +1,9 @@
%for ref in referents:
<div class="referents">
<span class="local_name">{{ref.name}}</span>
<span class="local_size">{{ref.size}}</span>
%if ref.refs:
%include('asized_referents', referents=ref.refs)
%end
</div>
%end
@@ -0,0 +1,6 @@
</div>
</div>
</div>
</div>
</body>
</html>
@@ -0,0 +1,33 @@
%include('header', category='Garbage', title='Garbage')
<h1>Garbage - Cycle {{index}}</h1>
<table class="tdata" width="100%">
<thead>
<tr>
<th>id</th>
<th class="num">size</th>
<th>type</th>
<th>representation</th>
</tr>
</thead>
<tbody>
%for o in objects:
<tr>
<td>{{'0x%08x' % o.id}}</td>
<td class="num">{{o.size}}</td>
<td>{{o.type}}</td>
<td>{{o.str}}</td>
</tr>
%end
</tbody>
</table>
<h2>Reference graph</h2>
<img src="/garbage/graph/{{index}}"/>
<h2>Reduced reference graph (cycles only)</h2>
<img src="/garbage/graph/{{index}}?reduce=1"/>
%include('footer')
@@ -0,0 +1,41 @@
%include('header', category='Garbage', title='Garbage')
<h1>Garbage - Overview</h1>
<p>This page gives an overview of all objects that would have been
deleted if those weren't holding circular references to each other
(e.g. in a doubly linked list).</p>
%if len(graphs):
<p>Click on the reference graph titles below to show the objects
contained in the respective cycle. If you have <a
href="http://www.graphviz.org">graphviz</a> installed, you will
also see a visualisation of the reference cycle.</p>
<p>{{len(graphs)}} reference cycles:</p>
<table class="tdata">
<thead>
<tr>
<th>Reference graph</th>
<th># objects</th>
<th># cycle objects</th>
<th>Total size</th>
</tr>
</thead>
<tbody>
%for graph in graphs:
<tr>
<td><a href="/garbage/{{graph.index}}">Cycle {{graph.index}}</a></td>
<td class="num">{{len(graph.metadata)}}</td>
<td class="num">{{graph.num_in_cycles}}</td>
<td class="num">{{graph.total_size}}</td>
</tr>
%end
</tbody>
</table>
%else:
<p>No reference cycles detected.</p>
%end
%include('footer')
@@ -0,0 +1,36 @@
<html>
<head>
<title>Pympler - {{title}}</title>
<link rel="stylesheet" type="text/css" href="/static/style.css">
<script src="http://code.jquery.com/jquery-1.10.1.min.js" type="text/javascript"></script>
</head>
%navbar = [
% ("overview", "/", ""),
% ("|", "", ""),
% ("process", "/process", ""),
% ("|", "", ""),
% ("tracked objects", "/tracker", ""),
% ("|", "", ""),
% ("garbage", "/garbage", ""),
% ("help", "/help", "right"),]
<body>
<div class="related">
<ul>
%for link, href, cls in navbar:
<li class="{{cls}}">
%if bool(href):
<a href="{{href}}"><span>{{link}}</span></a>
%else:
<span>{{link}}</span>
%end
</li>
%end
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
@@ -0,0 +1,26 @@
%include('header', category='Overview', title='Overview')
%from pympler.util.stringutils import pp
<h1>Python application memory profile</h1>
<h2>Process overview</h2>
<table class="tdata">
<tbody>
<tr>
<th>Virtual size:</th>
<td class="num">{{pp(processinfo.vsz)}}</td>
</tr>
<tr>
<th>Physical memory size:</th>
<td class="num">{{pp(processinfo.rss)}}</td>
</tr>
<tr>
<th>Major pagefaults:</th>
<td class="num">{{processinfo.pagefaults}}</td>
</tr>
</tbody>
</table>
%include('footer')
@@ -0,0 +1,8 @@
/* Javascript plotting library for jQuery, version 0.8.3.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.
*/
(function($){$.color={};$.color.make=function(r,g,b,a){var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;o.add=function(c,d){for(var i=0;i<c.length;++i)o[c.charAt(i)]+=d;return o.normalize()};o.scale=function(c,f){for(var i=0;i<c.length;++i)o[c.charAt(i)]*=f;return o.normalize()};o.toString=function(){if(o.a>=1){return"rgb("+[o.r,o.g,o.b].join(",")+")"}else{return"rgba("+[o.r,o.g,o.b,o.a].join(",")+")"}};o.normalize=function(){function clamp(min,value,max){return value<min?min:value>max?max:value}o.r=clamp(0,parseInt(o.r),255);o.g=clamp(0,parseInt(o.g),255);o.b=clamp(0,parseInt(o.b),255);o.a=clamp(0,o.a,1);return o};o.clone=function(){return $.color.make(o.r,o.b,o.g,o.a)};return o.normalize()};$.color.extract=function(elem,css){var c;do{c=elem.css(css).toLowerCase();if(c!=""&&c!="transparent")break;elem=elem.parent()}while(elem.length&&!$.nodeName(elem.get(0),"body"));if(c=="rgba(0, 0, 0, 0)")c="transparent";return $.color.parse(c)};$.color.parse=function(str){var res,m=$.color.make;if(res=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10));if(res=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10),parseFloat(res[4]));if(res=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55);if(res=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55,parseFloat(res[4]));if(res=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))return m(parseInt(res[1],16),parseInt(res[2],16),parseInt(res[3],16));if(res=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))return m(parseInt(res[1]+res[1],16),parseInt(res[2]+res[2],16),parseInt(res[3]+res[3],16));var name=$.trim(str).toLowerCase();if(name=="transparent")return m(255,255,255,0);else{res=lookupColors[name]||[0,0,0];return m(res[0],res[1],res[2])}};var lookupColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);(function($){var hasOwnProperty=Object.prototype.hasOwnProperty;if(!$.fn.detach){$.fn.detach=function(){return this.each(function(){if(this.parentNode){this.parentNode.removeChild(this)}})}}function Canvas(cls,container){var element=container.children("."+cls)[0];if(element==null){element=document.createElement("canvas");element.className=cls;$(element).css({direction:"ltr",position:"absolute",left:0,top:0}).appendTo(container);if(!element.getContext){if(window.G_vmlCanvasManager){element=window.G_vmlCanvasManager.initElement(element)}else{throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.")}}}this.element=element;var context=this.context=element.getContext("2d");var devicePixelRatio=window.devicePixelRatio||1,backingStoreRatio=context.webkitBackingStorePixelRatio||context.mozBackingStorePixelRatio||context.msBackingStorePixelRatio||context.oBackingStorePixelRatio||context.backingStorePixelRatio||1;this.pixelRatio=devicePixelRatio/backingStoreRatio;this.resize(container.width(),container.height());this.textContainer=null;this.text={};this._textCache={}}Canvas.prototype.resize=function(width,height){if(width<=0||height<=0){throw new Error("Invalid dimensions for plot, width = "+width+", height = "+height)}var element=this.element,context=this.context,pixelRatio=this.pixelRatio;if(this.width!=width){element.width=width*pixelRatio;element.style.width=width+"px";this.width=width}if(this.height!=height){element.height=height*pixelRatio;element.style.height=height+"px";this.height=height}context.restore();context.save();context.scale(pixelRatio,pixelRatio)};Canvas.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)};Canvas.prototype.render=function(){vaLine truncated
if(yrange.from==null)yrange.from=yrange.axis.min;if(yrange.to==null)yrange.to=yrange.axis.max;if(xrange.to<xrange.axis.min||xrange.from>xrange.axis.max||yrange.to<yrange.axis.min||yrange.from>yrange.axis.max)continue;xrange.from=Math.max(xrange.from,xrange.axis.min);xrange.to=Math.min(xrange.to,xrange.axis.max);yrange.from=Math.max(yrange.from,yrange.axis.min);yrange.to=Math.min(yrange.to,yrange.axis.max);var xequal=xrange.from===xrange.to,yequal=yrange.from===yrange.to;if(xequal&&yequal){continue}xrange.from=Math.floor(xrange.axis.p2c(xrange.from));xrange.to=Math.floor(xrange.axis.p2c(xrange.to));yrange.from=Math.floor(yrange.axis.p2c(yrange.from));yrange.to=Math.floor(yrange.axis.p2c(yrange.to));if(xequal||yequal){var lineWidth=m.lineWidth||options.grid.markingsLineWidth,subPixel=lineWidth%2?.5:0;ctx.beginPath();ctx.strokeStyle=m.color||options.grid.markingsColor;ctx.lineWidth=lineWidth;if(xequal){ctx.moveTo(xrange.to+subPixel,yrange.from);ctx.lineTo(xrange.to+subPixel,yrange.to)}else{ctx.moveTo(xrange.from,yrange.to+subPixel);ctx.lineTo(xrange.to,yrange.to+subPixel)}ctx.stroke()}else{ctx.fillStyle=m.color||options.grid.markingsColor;ctx.fillRect(xrange.from,yrange.to,xrange.to-xrange.from,yrange.from-yrange.to)}}}axes=allAxes();bw=options.grid.borderWidth;for(var j=0;j<axes.length;++j){var axis=axes[j],box=axis.box,t=axis.tickLength,x,y,xoff,yoff;if(!axis.show||axis.ticks.length==0)continue;ctx.lineWidth=1;if(axis.direction=="x"){x=0;if(t=="full")y=axis.position=="top"?0:plotHeight;else y=box.top-plotOffset.top+(axis.position=="top"?box.height:0)}else{y=0;if(t=="full")x=axis.position=="left"?0:plotWidth;else x=box.left-plotOffset.left+(axis.position=="left"?box.width:0)}if(!axis.innermost){ctx.strokeStyle=axis.options.color;ctx.beginPath();xoff=yoff=0;if(axis.direction=="x")xoff=plotWidth+1;else yoff=plotHeight+1;if(ctx.lineWidth==1){if(axis.direction=="x"){y=Math.floor(y)+.5}else{x=Math.floor(x)+.5}}ctx.moveTo(x,y);ctx.lineTo(x+xoff,y+yoff);ctx.stroke()}ctx.strokeStyle=axis.options.tickColor;ctx.beginPath();for(i=0;i<axis.ticks.length;++i){var v=axis.ticks[i].v;xoff=yoff=0;if(isNaN(v)||v<axis.min||v>axis.max||t=="full"&&(typeof bw=="object"&&bw[axis.position]>0||bw>0)&&(v==axis.min||v==axis.max))continue;if(axis.direction=="x"){x=axis.p2c(v);yoff=t=="full"?-plotHeight:t;if(axis.position=="top")yoff=-yoff}else{y=axis.p2c(v);xoff=t=="full"?-plotWidth:t;if(axis.position=="left")xoff=-xoff}if(ctx.lineWidth==1){if(axis.direction=="x")x=Math.floor(x)+.5;else y=Math.floor(y)+.5}ctx.moveTo(x,y);ctx.lineTo(x+xoff,y+yoff)}ctx.stroke()}if(bw){bc=options.grid.borderColor;if(typeof bw=="object"||typeof bc=="object"){if(typeof bw!=="object"){bw={top:bw,right:bw,bottom:bw,left:bw}}if(typeof bc!=="object"){bc={top:bc,right:bc,bottom:bc,left:bc}}if(bw.top>0){ctx.strokeStyle=bc.top;ctx.lineWidth=bw.top;ctx.beginPath();ctx.moveTo(0-bw.left,0-bw.top/2);ctx.lineTo(plotWidth,0-bw.top/2);ctx.stroke()}if(bw.right>0){ctx.strokeStyle=bc.right;ctx.lineWidth=bw.right;ctx.beginPath();ctx.moveTo(plotWidth+bw.right/2,0-bw.top);ctx.lineTo(plotWidth+bw.right/2,plotHeight);ctx.stroke()}if(bw.bottom>0){ctx.strokeStyle=bc.bottom;ctx.lineWidth=bw.bottom;ctx.beginPath();ctx.moveTo(plotWidth+bw.right,plotHeight+bw.bottom/2);ctx.lineTo(0,plotHeight+bw.bottom/2);ctx.stroke()}if(bw.left>0){ctx.strokeStyle=bc.left;ctx.lineWidth=bw.left;ctx.beginPath();ctx.moveTo(0-bw.left/2,plotHeight+bw.bottom);ctx.lineTo(0-bw.left/2,0);ctx.stroke()}}else{ctx.lineWidth=bw;ctx.strokeStyle=options.grid.borderColor;ctx.strokeRect(-bw/2,-bw/2,plotWidth+bw,plotHeight+bw)}}ctx.restore()}function drawAxisLabels(){$.each(allAxes(),function(_,axis){var box=axis.box,legacyStyles=axis.direction+"Axis "+axis.direction+axis.n+"Axis",layer="flot-"+axis.direction+"-axis flot-"+axis.direction+axis.n+"-axis "+legacyStyles,font=axis.options.font||"flot-tick-label tickLabel",tick,x,y,halign,valign;surface.removeText(layer);if(!axis.show||axis.ticks.length==0)return;for(var i=0;i<axis.ticks.length;++i){tick=axis.ticks[i];if(!tick.label||tick.v<axis.min||tick.v>axis.max)continue;if(axis.direction=="x"){halign="center";x=plotOffset.left+axis.p2c(tick.v);if(axis.position=="bottom"){y=box.top+box.padding}else{y=box.top+box.height-box.padding;valign="bottom"}}else{valign="middle";y=plotOffset.top+axis.p2c(tick.v);if(axis.position=="left"){x=box.left+box.width-box.padding;halign="right"}else{x=box.left+box.padding}}surface.addText(layer,x,y,tick.label,font,null,null,halign,valign)}})}function drawSeries(series){if(series.lines.show)drawSeriesLines(series);if(series.bars.show)drawSeriesBars(series);if(series.points.show)drawSeriesPoints(series)}function drawSeriesLines(series){function plotLine(datapoints,xoffset,yoffset,axisx,axisy){var points=datapoints.points,ps=datapoints.pointsize,prevx=null,prevy=null;ctx.beginPath();for(var i=ps;i<points.length;i+=ps){var x1=points[i-ps],y1=points[i-ps+1],x2=points[i],y2=points[i+1];if(x1==null||x2==null)continue;if(y1<=y2&&y1<axisy.min){if(y2<axLine truncated
@@ -0,0 +1,7 @@
/* Javascript plotting library for jQuery, version 0.8.3.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.
*/
(function($){var options={series:{stack:null}};function init(plot){function findMatchingSeries(s,allseries){var res=null;for(var i=0;i<allseries.length;++i){if(s==allseries[i])break;if(allseries[i].stack==s.stack)res=allseries[i]}return res}function stackData(plot,s,datapoints){if(s.stack==null||s.stack===false)return;var other=findMatchingSeries(s,plot.getData());if(!other)return;var ps=datapoints.pointsize,points=datapoints.points,otherps=other.datapoints.pointsize,otherpoints=other.datapoints.points,newpoints=[],px,py,intery,qx,qy,bottom,withlines=s.lines.show,horizontal=s.bars.horizontal,withbottom=ps>2&&(horizontal?datapoints.format[2].x:datapoints.format[2].y),withsteps=withlines&&s.lines.steps,fromgap=true,keyOffset=horizontal?1:0,accumulateOffset=horizontal?0:1,i=0,j=0,l,m;while(true){if(i>=points.length)break;l=newpoints.length;if(points[i]==null){for(m=0;m<ps;++m)newpoints.push(points[i+m]);i+=ps}else if(j>=otherpoints.length){if(!withlines){for(m=0;m<ps;++m)newpoints.push(points[i+m])}i+=ps}else if(otherpoints[j]==null){for(m=0;m<ps;++m)newpoints.push(null);fromgap=true;j+=otherps}else{px=points[i+keyOffset];py=points[i+accumulateOffset];qx=otherpoints[j+keyOffset];qy=otherpoints[j+accumulateOffset];bottom=0;if(px==qx){for(m=0;m<ps;++m)newpoints.push(points[i+m]);newpoints[l+accumulateOffset]+=qy;bottom=qy;i+=ps;j+=otherps}else if(px>qx){if(withlines&&i>0&&points[i-ps]!=null){intery=py+(points[i-ps+accumulateOffset]-py)*(qx-px)/(points[i-ps+keyOffset]-px);newpoints.push(qx);newpoints.push(intery+qy);for(m=2;m<ps;++m)newpoints.push(points[i+m]);bottom=qy}j+=otherps}else{if(fromgap&&withlines){i+=ps;continue}for(m=0;m<ps;++m)newpoints.push(points[i+m]);if(withlines&&j>0&&otherpoints[j-otherps]!=null)bottom=qy+(otherpoints[j-otherps+accumulateOffset]-qy)*(px-qx)/(otherpoints[j-otherps+keyOffset]-qx);newpoints[l+accumulateOffset]+=bottom;i+=ps}fromgap=false;if(l!=newpoints.length&&withbottom)newpoints[l+2]+=bottom}if(withsteps&&l!=newpoints.length&&l>0&&newpoints[l]!=null&&newpoints[l]!=newpoints[l-ps]&&newpoints[l+1]!=newpoints[l-ps+1]){for(m=0;m<ps;++m)newpoints[l+ps+m]=newpoints[l+m];newpoints[l+1]=newpoints[l-ps+1]}}datapoints.points=newpoints}plot.hooks.processDatapoints.push(stackData)}$.plot.plugins.push({init:init,options:options,name:"stack",version:"1.2"})})(jQuery);
@@ -0,0 +1,12 @@
/*
* jquery.flot.tooltip
*
* description: easy-to-use tooltips for Flot charts
* version: 0.8.4
* authors: Krzysztof Urbas @krzysu [myviews.pl],Evan Steinkerchner @Roundaround
* website: https://github.com/krzysu/flot.tooltip
*
* build on 2014-08-06
* released under MIT License, 2012
*/
!function(a){var b={tooltip:!1,tooltipOpts:{id:"flotTip",content:"%s | X: %x | Y: %y",xDateFormat:null,yDateFormat:null,monthNames:null,dayNames:null,shifts:{x:10,y:20},defaultTheme:!0,lines:!1,onHover:function(){},$compat:!1}},c=function(a){this.tipPosition={x:0,y:0},this.init(a)};c.prototype.init=function(b){function c(a){var c={};c.x=a.pageX,c.y=a.pageY,b.setTooltipPosition(c)}function d(c,d,f){var g=function(a,b,c,d){return Math.sqrt((c-a)*(c-a)+(d-b)*(d-b))},h=function(a,b,c,d,e,f,h){if(!h||(h=function(a,b,c,d,e,f){if("undefined"!=typeof c)return{x:c,y:b};if("undefined"!=typeof d)return{x:a,y:d};var g,h=-1/((f-d)/(e-c));return{x:g=(e*(a*h-b+d)+c*(a*-h+b-f))/(h*(e-c)+d-f),y:h*g-h*a+b}}(a,b,c,d,e,f),h.x>=Math.min(c,e)&&h.x<=Math.max(c,e)&&h.y>=Math.min(d,f)&&h.y<=Math.max(d,f))){var i=d-f,j=e-c,k=c*f-d*e;return Math.abs(i*a+j*b+k)/Math.sqrt(i*i+j*j)}var l=g(a,b,c,d),m=g(a,b,e,f);return l>m?m:l};if(f)b.showTooltip(f,d);else if(e.plotOptions.series.lines.show&&e.tooltipOptions.lines===!0){var i=e.plotOptions.grid.mouseActiveRadius,j={distance:i+1};a.each(b.getData(),function(a,c){for(var e=0,f=-1,i=1;i<c.data.length;i++)c.data[i-1][0]<=d.x&&c.data[i][0]>=d.x&&(e=i-1,f=i);if(-1===f)return void b.hideTooltip();var k={x:c.data[e][0],y:c.data[e][1]},l={x:c.data[f][0],y:c.data[f][1]},m=h(c.xaxis.p2c(d.x),c.yaxis.p2c(d.y),c.xaxis.p2c(k.x),c.yaxis.p2c(k.y),c.xaxis.p2c(l.x),c.yaxis.p2c(l.y),!1);if(m<j.distance){var n=g(k.x,k.y,d.x,d.y)<g(d.x,d.y,l.x,l.y)?e:f,o=(c.datapoints.pointsize,[d.x,k.y+(l.y-k.y)*((d.x-k.x)/(l.x-k.x))]),p={datapoint:o,dataIndex:n,series:c,seriesIndex:a};j={distance:m,item:p}}}),j.distance<i+1?b.showTooltip(j.item,d):b.hideTooltip()}else b.hideTooltip()}var e=this,f=a.plot.plugins.length;if(this.plotPlugins=[],f)for(var g=0;f>g;g++)this.plotPlugins.push(a.plot.plugins[g].name);b.hooks.bindEvents.push(function(b,f){if(e.plotOptions=b.getOptions(),e.plotOptions.tooltip!==!1&&"undefined"!=typeof e.plotOptions.tooltip){e.tooltipOptions=e.plotOptions.tooltipOpts,e.tooltipOptions.$compat?(e.wfunc="width",e.hfunc="height"):(e.wfunc="innerWidth",e.hfunc="innerHeight");{e.getDomElement()}a(b.getPlaceholder()).bind("plothover",d),a(f).bind("mousemove",c)}}),b.hooks.shutdown.push(function(b,e){a(b.getPlaceholder()).unbind("plothover",d),a(e).unbind("mousemove",c)}),b.setTooltipPosition=function(b){var c=e.getDomElement(),d=c.outerWidth()+e.tooltipOptions.shifts.x,f=c.outerHeight()+e.tooltipOptions.shifts.y;b.x-a(window).scrollLeft()>a(window)[e.wfunc]()-d&&(b.x-=d),b.y-a(window).scrollTop()>a(window)[e.hfunc]()-f&&(b.y-=f),e.tipPosition.x=b.x,e.tipPosition.y=b.y},b.showTooltip=function(a,c){var d=e.getDomElement(),f=e.stringFormat(e.tooltipOptions.content,a);d.html(f),b.setTooltipPosition({x:c.pageX,y:c.pageY}),d.css({left:e.tipPosition.x+e.tooltipOptions.shifts.x,top:e.tipPosition.y+e.tooltipOptions.shifts.y}).show(),"function"==typeof e.tooltipOptions.onHover&&e.tooltipOptions.onHover(a,d)},b.hideTooltip=function(){e.getDomElement().hide().html("")}},c.prototype.getDomElement=function(){var b=a("#"+this.tooltipOptions.id);return 0===b.length&&(b=a("<div />").attr("id",this.tooltipOptions.id),b.appendTo("body").hide().css({position:"absolute"}),this.tooltipOptions.defaultTheme&&b.css({background:"#fff","z-index":"1040",padding:"0.4em 0.6em","border-radius":"0.5em","font-size":"0.8em",border:"1px solid #111",display:"none","white-space":"nowrap"})),b},c.prototype.stringFormat=function(a,b){var c,d,e,f,g=/%p\.{0,1}(\d{0,})/,h=/%s/,i=/%lx/,j=/%ly/,k=/%x\.{0,1}(\d{0,})/,l=/%y\.{0,1}(\d{0,})/,m="%x",n="%y",o="%ct";if("undefined"!=typeof b.series.threshold?(c=b.datapoint[0],d=b.datapoint[1],e=b.datapoint[2]):"undefined"!=typeof b.series.lines&&b.series.lines.steps?(c=b.series.datapoints.points[2*b.dataIndex],d=b.series.datapoints.points[2*b.dataIndex+1],e=""):(c=b.series.data[b.dataIndex][0],d=b.series.data[b.dataIndex][1],e=b.series.data[b.dataIndex][2]),null===b.series.label&&b.series.originSeries&&(b.series.label=b.series.originSeries.label),"function"==typeof a&&(a=a(b.series.label,c,d,b)),"undefined"!=typeof b.series.percent?f=b.series.percent:"undefined"!=typeof b.series.percents&&(f=b.series.percents[b.dataIndex]),"number"==typeof f&&(a=this.adjustValPrecision(g,a,f)),a="undefined"!=typeof b.series.label?a.replace(h,b.series.label):a.replace(h,""),a=this.hasAxisLabel("xaxis",b)?a.replace(i,b.series.xaxis.options.axisLabel):a.replace(i,""),a=this.hasAxisLabel("yaxis",b)?a.replace(j,b.series.yaxis.options.axisLabel):a.replace(j,""),this.isTimeMode("xaxis",b)&&this.isXDateFormat(b)&&(a=a.replace(k,this.timestampToDate(c,this.tooltipOptions.xDateFormat,b.series.xaxis.options))),this.isTimeMode("yaxis",b)&&this.isYDateFormat(b)&&(a=a.replace(l,this.timestampToDate(d,this.tooltipOptions.yDateFormat,b.series.yaxis.options))),"number"==typeof c&&(a=this.adjustValPrecision(k,a,c)),"number"==typeof d&&(a=this.adjustValPrecision(l,a,d)),"undefined"!=typeof b.series.xaxis.ticks){var p;p=this.hasRotatedXAxisTicksLine truncated
@@ -0,0 +1,58 @@
{% load i18n %}{% load static %}
<script type="text/javascript" src="{% static 'jquery.sparkline.min.js' %}"></script>
<table>
<colgroup>
<col style="width:20%"/>
<col/>
</colgroup>
<thead>
<tr>
<th>{% trans "Resource" %}</th>
<th>{% trans "Value" %}</th>
</tr>
</thead>
<tbody>
{% for key, value in rows %}
<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ key|escape }}</td>
<td>{{ value|escape }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<table>
<colgroup>
<col style="width:20%"/>
<col/>
<col/>
</colgroup>
<thead>
<tr>
<th>{% trans "Class" %}</th>
<th>{% trans "Number of instances" %} <a class="show_sparkline" href="#">Show sparklines</a></th>
<th>{% trans "Total size" %}</th>
</tr>
</thead>
<tbody>
{% for cls, history, size in classes %}
<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ cls|escape }}</td>
<td id="{{ cls|escape|cut:'.' }}_history" values="{{ history|join:',' }}">
{{ history|safeseq|join:', ' }}
</td>
<td>{{ size|escape }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<script type="text/javascript">
(function ($) {
window.jQuery = $; // for jquery.sparkline
$("#MemoryPanel .show_sparkline").on('click', function() {
{% for cls, _, _ in classes %}
$("#{{ cls|escape|cut:'.' }}_history").sparkline('html', {width: '200px'});
{% endfor %}
});
})(jQuery || djdt.jQuery);
</script>
@@ -0,0 +1,89 @@
%include('header', category='Process', title='Process Information')
%from pympler.util.stringutils import pp
<h1>Process information</h1>
<table class="tdata">
<tbody>
<tr>
<th>Virtual size:</th>
<td class="num">{{pp(info.vsz)}}</td>
</tr>
<tr>
<th>Physical memory size:</th>
<td class="num">{{pp(info.rss)}}</td>
</tr>
<tr>
<th>Major pagefaults:</th>
<td class="num">{{info.pagefaults}}</td>
</tr>
%for key, value in info.os_specific:
<tr>
<th>{{key}}:</th>
<td class="num">{{value}}</td>
</tr>
%end
</tbody>
</table>
<h2>Thread information</h2>
<table class="tdata">
<tbody>
<tr>
<th>ID</th>
<th>Name</th>
<th>Daemon</th>
</tr>
%for tinfo in threads:
<tr>
<td>{{tinfo.ident}}</td>
<td>{{tinfo.name}}</td>
<td>{{tinfo.daemon}}</td>
</tr>
%end
</tbody>
</table>
<h2>Thread stacks</h2>
<div class="stacks">
%for tinfo in threads:
<div class="stacktrace" id="{{tinfo.ident}}">
<a class="show_traceback" href="#">Traceback for thread {{tinfo.name}}</a>
</div>
%end
</div>
<script type="text/javascript">
$(".show_traceback").click(function() {
var tid = $(this).parent().attr("id");
$.get("/traceback/"+tid, function(data) {
$("#"+tid).replaceWith(data);
});
return false;
});
$(".stacks").delegate(".expand_local", "click", function() {
var oid = $(this).attr("id");
$.get("/objects/"+oid, function(data) {
$("#"+oid).replaceWith(data);
});
return false;
});
$(".stacks").delegate(".expand_ref", "click", function() {
var node_id = $(this).attr("id");
var oid = node_id.split("_")[0];
$.get("/objects/"+oid, function(data) {
$("#children_"+node_id).append(data);
});
$(this).removeClass("expand_ref").addClass("toggle_ref");
return false;
});
$(".stacks").delegate(".toggle_ref", "click", function() {
var node_id = $(this).attr("id");
$("#children_"+node_id).toggle();
return false;
});
</script>
%include('footer')
@@ -0,0 +1,13 @@
%from random import randint
%for name, (ref, type_name, obj_repr, size) in referents.items():
%ref = "%s_%s" % (ref, randint(0, 65535))
<div class="referents">
<a class="expand_ref" id="{{ref}}" href="#">
<span class="local_name">{{name}}</span>
<span class="local_type">{{type_name}}</span>
<span class="local_size">{{size}}</span>
<span class="local_value">{{obj_repr}}</span>
</a>
<span id="children_{{ref}}"/>
</div>
%end
@@ -0,0 +1,30 @@
<div class="stacktrace">
<strong>Stacktrace for thread {{threadid}}</strong>
%for frame in stack:
<div class="stackframe">
<span class="filename">{{frame[1]}}</span>
<span class="lineno">{{frame[2]}}</span>
<span class="function">{{frame[3]}}</span>
%if frame[4]:
%context = frame[4]
<div class="context">
%highlight = len(context) / 2
%for idx, line in enumerate(frame[4]):
%hl = (idx == highlight) and "highlighted" or ""
%if line.strip():
<div class="{{hl}}" style="padding-left:{{len(line)-len(line.lstrip())}}em" width="100%">
{{line.strip()}}
</div>
%end
%end
</div>
%end
<div class="local">
<a class="expand_local" id="{{frame[0]}}" href="#">Show locals</a>
</div>
</div>
%end
%if not stack:
Cannot retrieve stacktrace for thread {{threadid}}.
%end
</div>
@@ -0,0 +1,992 @@
/**
* Sphinx Doc Design
*/
body {
font-family: "Verdana", "Tahoma", Sans-Serif;
font-size: 90%;
background-color: #11303d;
color: #000;
margin: 0;
padding: 0;
}
/* :::: LAYOUT :::: */
div.document {
background-color: #158906;
}
div.documentwrapper {
float: left;
width: 100%;
}
div.bodywrapper {
margin: 0 0 0 0;
}
div.body {
background-color: white;
padding: 0 20px 16px 20px;
}
div.sphinxsidebarwrapper {
padding: 10px 5px 0 10px;
}
div.sphinxsidebar {
display: none;
}
div.sphinxsidebar {
float: right;
width: 230px;
margin-left: -100%;
font-size: 90%;
}
div.clearer {
clear: both;
}
div.footer {
color: #fff;
width: 100%;
padding: 9px 0 9px 0;
text-align: center;
font-size: 75%;
}
div.footer a {
color: #fff;
text-decoration: underline;
}
div.related {
background-color: #5A3D31;
color: #fff;
width: 100%;
height: 30px;
line-height: 30px;
font-size: 90%;
}
div.related h3 {
display: none;
}
div.related ul {
margin: 0;
padding: 0 0 0 10px;
list-style: none;
}
div.related li {
display: inline;
}
div.related li.right {
float: right;
margin-right: 5px;
}
div.related a {
color: white;
}
/* ::: TOC :::: */
div.sphinxsidebar h3 {
color: white;
font-size: 1.4em;
font-weight: normal;
margin: 0;
padding: 0;
}
div.sphinxsidebar h4 {
color: white;
font-size: 1.3em;
font-weight: normal;
margin: 5px 0 0 0;
padding: 0;
}
div.sphinxsidebar p {
color: white;
}
div.sphinxsidebar p.topless {
margin: 5px 10px 10px 10px;
}
div.sphinxsidebar ul {
margin: 10px;
padding: 0;
list-style: none;
color: white;
}
div.sphinxsidebar ul ul,
div.sphinxsidebar ul.want-points {
margin-left: 20px;
list-style: square;
}
div.sphinxsidebar ul ul {
margin-top: 0;
margin-bottom: 0;
}
div.sphinxsidebar a {
color: #A4FF98;
}
div.sphinxsidebar form {
margin-top: 10px;
}
div.sphinxsidebar input {
border: 1px solid #A4FF98;
font-size: 1em;
}
/* :::: MODULE CLOUD :::: */
div.modulecloud {
margin: -5px 10px 5px 10px;
padding: 10px;
line-height: 160%;
border: 1px solid #cbe7e5;
background-color: #f2fbfd;
}
div.modulecloud a {
padding: 0 5px 0 5px;
}
/* :::: SEARCH :::: */
ul.search {
margin: 10px 0 0 20px;
padding: 0;
}
ul.search li {
padding: 5px 0 5px 20px;
background-image: url(file.png);
background-repeat: no-repeat;
background-position: 0 7px;
}
ul.search li a {
font-weight: bold;
}
ul.search li div.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
}
ul.keywordmatches li.goodmatch a {
font-weight: bold;
}
/* :::: COMMON FORM STYLES :::: */
div.actions {
padding: 5px 10px 5px 10px;
border-top: 1px solid #cbe7e5;
border-bottom: 1px solid #cbe7e5;
background-color: #e0f6f4;
}
form dl {
color: #333;
}
form dt {
clear: both;
float: left;
min-width: 110px;
margin-right: 10px;
padding-top: 2px;
}
input#homepage {
display: none;
}
div.error {
margin: 5px 20px 0 0;
padding: 5px;
border: 1px solid #d00;
font-weight: bold;
}
/* :::: INLINE COMMENTS :::: */
div.inlinecomments {
position: absolute;
right: 20px;
}
div.inlinecomments a.bubble {
display: block;
float: right;
background-image: url(style/comment.png);
background-repeat: no-repeat;
width: 25px;
height: 25px;
text-align: center;
padding-top: 3px;
font-size: 0.9em;
line-height: 14px;
font-weight: bold;
color: black;
}
div.inlinecomments a.bubble span {
display: none;
}
div.inlinecomments a.emptybubble {
background-image: url(style/nocomment.png);
}
div.inlinecomments a.bubble:hover {
background-image: url(style/hovercomment.png);
text-decoration: none;
color: #3ca0a4;
}
div.inlinecomments div.comments {
float: right;
margin: 25px 5px 0 0;
max-width: 50em;
min-width: 30em;
border: 1px solid #2eabb0;
background-color: #f2fbfd;
z-index: 150;
}
div#comments {
border: 1px solid #2eabb0;
margin-top: 20px;
}
div#comments div.nocomments {
padding: 10px;
font-weight: bold;
}
div.inlinecomments div.comments h3,
div#comments h3 {
margin: 0;
padding: 0;
background-color: #2eabb0;
color: white;
border: none;
padding: 3px;
}
div.inlinecomments div.comments div.actions {
padding: 4px;
margin: 0;
border-top: none;
}
div#comments div.comment {
margin: 10px;
border: 1px solid #2eabb0;
}
div.inlinecomments div.comment h4,
div.commentwindow div.comment h4,
div#comments div.comment h4 {
margin: 10px 0 0 0;
background-color: #2eabb0;
color: white;
border: none;
padding: 1px 4px 1px 4px;
}
div#comments div.comment h4 {
margin: 0;
}
div#comments div.comment h4 a {
color: #d5f4f4;
}
div.inlinecomments div.comment div.text,
div.commentwindow div.comment div.text,
div#comments div.comment div.text {
margin: -5px 0 -5px 0;
padding: 0 10px 0 10px;
}
div.inlinecomments div.comment div.meta,
div.commentwindow div.comment div.meta,
div#comments div.comment div.meta {
text-align: right;
padding: 2px 10px 2px 0;
font-size: 95%;
color: #538893;
border-top: 1px solid #cbe7e5;
background-color: #e0f6f4;
}
div.commentwindow {
position: absolute;
width: 500px;
border: 1px solid #cbe7e5;
background-color: #f2fbfd;
display: none;
z-index: 130;
}
div.commentwindow h3 {
margin: 0;
background-color: #2eabb0;
color: white;
border: none;
padding: 5px;
font-size: 1.5em;
cursor: pointer;
}
div.commentwindow div.actions {
margin: 10px -10px 0 -10px;
padding: 4px 10px 4px 10px;
color: #538893;
}
div.commentwindow div.actions input {
border: 1px solid #2eabb0;
background-color: white;
color: #135355;
cursor: pointer;
}
div.commentwindow div.form {
padding: 0 10px 0 10px;
}
div.commentwindow div.form input,
div.commentwindow div.form textarea {
border: 1px solid #3c9ea2;
background-color: white;
color: black;
}
div.commentwindow div.error {
margin: 10px 5px 10px 5px;
background-color: #fbe5dc;
display: none;
}
div.commentwindow div.form textarea {
width: 99%;
}
div.commentwindow div.preview {
margin: 10px 0 10px 0;
background-color: #70d0d4;
padding: 0 1px 1px 25px;
}
div.commentwindow div.preview h4 {
margin: 0 0 -5px -20px;
padding: 4px 0 0 4px;
color: white;
font-size: 1.3em;
}
div.commentwindow div.preview div.comment {
background-color: #f2fbfd;
}
div.commentwindow div.preview div.comment h4 {
margin: 10px 0 0 0!important;
padding: 1px 4px 1px 4px!important;
font-size: 1.2em;
}
/* :::: SUGGEST CHANGES :::: */
div#suggest-changes-box input, div#suggest-changes-box textarea {
border: 1px solid #ccc;
background-color: white;
color: black;
}
div#suggest-changes-box textarea {
width: 99%;
height: 400px;
}
/* :::: PREVIEW :::: */
div.preview {
background-image: url(style/preview.png);
padding: 0 20px 20px 20px;
margin-bottom: 30px;
}
/* :::: INDEX PAGE :::: */
table.contentstable {
width: 90%;
}
table.contentstable p.biglink {
line-height: 150%;
}
a.biglink {
font-size: 1.3em;
}
span.linkdescr {
font-style: italic;
padding-top: 5px;
font-size: 90%;
}
/* :::: INDEX STYLES :::: */
table.indextable td {
text-align: left;
vertical-align: top;
}
table.indextable dl, table.indextable dd {
margin-top: 0;
margin-bottom: 0;
}
table.indextable tr.pcap {
height: 10px;
}
table.indextable tr.cap {
margin-top: 10px;
background-color: #f2f2f2;
}
img.toggler {
margin-right: 3px;
margin-top: 3px;
cursor: pointer;
}
form.pfform {
margin: 10px 0 20px 0;
}
/* :::: GLOBAL STYLES :::: */
.docwarning {
background-color: #ffe4e4;
padding: 10px;
margin: 0 -20px 0 -20px;
border-bottom: 1px solid #f66;
}
p.subhead {
font-weight: bold;
margin-top: 20px;
}
a {
color: #355F7C;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6 {
font-weight: bold;
margin: 16px -20px 16px -20px;
padding: 3px 0 3px 10px;
}
div.body h1 {
margin-top: 0;
font-size: 140%;
background-color: #E5EDB8;
color: #000;
border-bottom: 1px solid #ccc;
}
div.body h2 {
font-size: 120%;
background-color: #E5EDB8;
color: #000;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}
div.body h3 {
font-size: 120%;
border-bottom: 1px dashed #ccc;
}
div.body h4 { font-size: 120%; }
div.body h5 { font-size: 110%; }
div.body h6 { font-size: 100%; }
a.headerlink {
color: #c60f0f;
font-size: 0.8em;
padding: 0 4px 0 4px;
text-decoration: none;
visibility: hidden;
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
h6:hover > a.headerlink,
dt:hover > a.headerlink {
visibility: visible;
}
a.headerlink:hover {
background-color: #c60f0f;
color: white;
}
div.body p, div.body dd, div.body li {
line-height: 100%;
}
div.body p.caption {
text-align: inherit;
}
div.body td {
text-align: left;
}
ul.fakelist {
list-style: none;
margin: 10px 0 10px 20px;
padding: 0;
}
.field-list ul {
padding-left: 1em;
}
.first {
margin-top: 0 !important;
}
/* "Footnotes" heading */
p.rubric {
margin-top: 30px;
font-weight: bold;
}
/* "Topics" */
div.topic {
background-color: #eee;
border: 1px solid #ccc;
padding: 0 7px 0 7px;
margin: 10px 0 10px 0;
}
p.topic-title {
font-size: 1.1em;
font-weight: bold;
margin-top: 10px;
}
/* Admonitions */
div.admonition {
margin-top: 10px;
margin-bottom: 10px;
padding: 7px;
}
div.admonition dt {
font-weight: bold;
}
div.admonition dl {
margin-bottom: 0;
}
div.admonition p {
display: inline;
}
div.seealso {
background-color: #ffc;
border: 1px solid #ff6;
}
div.warning {
background-color: #ffe4e4;
border: 1px solid #f66;
}
div.note {
background-color: #eee;
border: 1px solid #ccc;
}
p.admonition-title {
margin: 0px 10px 5px 0px;
font-weight: bold;
display: inline;
}
p.admonition-title:after {
content: ":";
}
div.body p.centered {
text-align: center;
margin-top: 25px;
}
table.docutils {
border: 0;
}
table.docutils td, table.docutils th {
padding: 1px 8px 1px 0;
border-top: 0;
border-left: 0;
border-right: 0;
border-bottom: 1px solid #aaa;
}
table.field-list td, table.field-list th {
border: 0 !important;
}
table.footnote td, table.footnote th {
border: 0 !important;
}
.field-list ul {
margin: 0;
padding-left: 1em;
}
.field-list p {
margin: 0;
}
dl {
margin-bottom: 1px;
clear: both;
}
dd p {
margin-top: 0px;
}
dd ul, dd table {
margin-bottom: 10px;
}
dd {
margin-top: 3px;
margin-bottom: 10px;
margin-left: 30px;
}
.refcount {
color: #060;
}
dt:target,
.highlight {
background-color: #fbe54e;
}
dl.glossary dt {
font-weight: bold;
font-size: 1.1em;
}
th {
text-align: left;
padding-right: 5px;
}
pre {
padding: 5px;
background-color: #efc;
color: #333;
border: 1px solid #ac9;
border-left: none;
border-right: none;
overflow: auto;
}
td.linenos pre {
padding: 5px 0px;
border: 0;
background-color: transparent;
color: #aaa;
}
table.highlighttable {
margin-left: 0.5em;
}
table.highlighttable td {
padding: 0 0.5em 0 0.5em;
}
tt {
background-color: #ecf0f3;
padding: 0 1px 0 1px;
font-size: 0.95em;
}
tt.descname {
background-color: transparent;
font-weight: bold;
font-size: 1.2em;
}
tt.descclassname {
background-color: transparent;
}
tt.xref, a tt {
background-color: transparent;
font-weight: bold;
}
.footnote:target { background-color: #ffa }
h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
background-color: transparent;
}
.optional {
font-size: 1.3em;
}
.versionmodified {
font-style: italic;
}
form.comment {
margin: 0;
padding: 10px 30px 10px 30px;
background-color: #eee;
}
form.comment h3 {
background-color: #326591;
color: white;
margin: -10px -30px 10px -30px;
padding: 5px;
font-size: 1.4em;
}
form.comment input,
form.comment textarea {
border: 1px solid #ccc;
padding: 2px;
font-size: 100%;
}
form.comment input[type="text"] {
width: 240px;
}
form.comment textarea {
width: 100%;
height: 200px;
margin-bottom: 10px;
}
.system-message {
background-color: #fda;
padding: 5px;
border: 3px solid red;
}
/* :::: PRINT :::: */
@media print {
div.document,
div.documentwrapper,
div.bodywrapper {
margin: 0;
width : 100%;
}
div.sphinxsidebar,
div.related,
div.footer,
div#comments div.new-comment-box,
#top-link {
display: none;
}
}
/* :::: OWN :::: */
.section ul {
margin: 0.2em;
}
/* Data tables */
table.tdata
{
font-size: 12px;
background: #fff;
border-collapse: collapse;
text-align: left;
}
table.tdata th
{
font-size: 14px;
font-weight: normal;
padding: 8px 8px;
background-color: #E5EDB8;
border-bottom: 1px solid #ccc;
}
table.tdata tr:first-child th:first-child
{
border-top-left-radius: 8px;
}
table.tdata tr:first-child th:last-child
{
border-top-right-radius: 8px;
}
table.tdata td
{
border-bottom: 1px solid #ccc;
padding: 8px 8px;
}
table.tdata tbody tr:hover td
{
color: #060;
}
table th.num,
table td.num
{
text-align: right;
}
div.stacktrace
{
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
border-radius: 6px;
border: 1px solid #999;
padding: 6px;
margin-bottom: 1em;
}
div.stacktrace div.stackframe
{
margin: 8px;
}
div.stackframe .context,
div.stackframe .local
{
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
padding: 4px;
margin-left: 10px;
margin-top: 4px;
background: #f2f2f2;
}
div.stackframe div.context div.highlighted
{
background: #E5EDB8;
}
div.stackframe span.lineno,
div.stackframe span.filename
{
}
div.stackframe span.function
{
font-weight: bold;
}
div.stackframe span.function,
div.stackframe div.context
{
font-family: monospace;
}
div.local,
div.referents
{
margin-top: 4px;
margin-bottom: 4px;
margin-left: 10px;
}
div.stackframe div.local
{
background: #fafafa;
}
div.referents span.local_name,
div.referents span.local_size
{
font-family: monospace;
padding: 1px;
}
div.referents span.local_value,
div.referents span.local_size,
div.referents span.local_type
{
font-family: monospace;
margin-left: 1em;
}
div.referents span.local_type
{
color: #999;
}
div.referents span.local_size
{
color: #03F;
}
div.local div.referents a
{
color: #000;
text-decoration: none;
}
div.local div.referents a:hover
{
background-color: #EEE;
color: #090;
text-decoration: none;
}
@@ -0,0 +1,127 @@
%include('header', category='Tracker', title='Tracked objects')
%from pympler.util.stringutils import pp, pp_timestamp
%from json import dumps
<h1>Tracked objects</h1>
%if snapshots:
<h2>Memory distribution over time</h2>
<div id="memory_chart_flot" style="width:100%; height: 400px"></div>
<script type="text/javascript" src="/static/jquery.flot.min.js"></script>
<script type="text/javascript" src="/static/jquery.flot.stack.min.js"></script>
<script type="text/javascript" src="/static/jquery.flot.tooltip.min.js"></script>
<script type="text/javascript">
function format_size(value) {
var val = Math.round(value / (1000*1000));
return val.toLocaleString() + ' MB';
};
$(document).ready(function() {
var timeseries = {{!timeseries}};
var options = {
xaxis: {
show: false,
},
yaxis: {
tickFormatter: format_size
},
grid: {
hoverable: true
},
tooltip: true,
tooltipOpts: {
content: "%s | %y"
},
legend: {
position: "nw"
},
series: {
bars: {
show: true,
barWidth: .9,
fillColor: { colors: [ { opacity: 0.9 }, { opacity: 0.9 } ] },
align: "center"
},
stack: true
}
};
$.plot($('#memory_chart_flot'), timeseries, options);
});
</script>
<h2>Snapshots statistics</h2>
%for sn in snapshots:
<h3>{{sn.desc or 'Untitled'}} snapshot at {{pp_timestamp(sn.timestamp)}}</h3>
<table class="tdata">
<thead>
<tr>
<th width="20%">Class</th>
<th width="20%" class="num">Instance #</th>
<th width="20%" class="num">Total</th>
<th width="20%" class="num">Average size</th>
<th width="20%" class="num">Share</th>
</tr>
</thead>
<tbody>
%cnames = list(sn.classes.keys())
%cnames.sort()
%for cn in cnames:
%data = sn.classes[cn]
<tr>
<td><a href="/tracker/class/{{cn}}">{{cn}}</a></td>
<td class="num">{{data['active']}}</td>
<td class="num">{{pp(data['sum'])}}</td>
<td class="num">{{pp(data['avg'])}}</td>
<td class="num">{{'%3.2f%%' % data['pct']}}</td>
</tr>
%end
</tbody>
</table>
%if sn.system_total.available:
<h4>Process memory</h4>
<table class="tdata">
<thead>
<tr>
<th>Type</th>
<th class="num">Size</th>
</tr>
</thead>
<tbody>
<tr>
<td>Virtual memory size</td>
<td class="num">{{pp(sn.system_total.vsz)}}</td>
</tr>
<tr>
<td>Resident set size</td>
<td class="num">{{pp(sn.system_total.rss)}}</td>
</tr>
<tr>
<td>Pagefaults</td>
<td class="num">{{sn.system_total.pagefaults}}</td>
</tr>
%for key, value in sn.system_total.os_specific:
<tr>
<td>{{key}}</td>
<td class="num">{{value}}</td>
</tr>
%end
</tbody>
</table>
%end
%end
%else:
<p>No objects are currently tracked. Consult the Pympler documentation for
instructions of how to use the classtracker module.</p>
%end
%include('footer')
@@ -0,0 +1,79 @@
%include('header', category='Tracker', title=clsname)
%from pympler.util.stringutils import pp, pp_timestamp
<h1>{{clsname}}</h1>
%sizes = [tobj.get_max_size() for tobj in stats.index[clsname]]
<p>{{len(stats.index[clsname])}} instances of {{clsname}} were registered. The
average size is {{pp(sum(sizes)/len(sizes))}}, the minimal size is
{{pp(min(sizes))}}, the maximum size is {{pp(max(sizes))}}.</p>
<h2>Coalesced Referents per Snapshot</h2>
%for snapshot in stats.snapshots:
%if clsname in snapshot.classes:
%merged = snapshot.classes[clsname]['merged']
<h3>Snapshot: {{snapshot.desc}}</h3>
<p>{{pp(merged.size)}} occupied by instances of class {{clsname}}</p>
%if merged.refs:
%include('asized_referents', referents=merged.refs)
%else:
<p>No per-referent sizes recorded.</p>
%end
%end
%end
<h2>Instances</h2>
%for tobj in stats.index[clsname]:
<table class="tdata" width="100%" rules="rows">
<tr>
<th width="140px">Instance</th>
<td>{{tobj.name}} at {{'0x%08x' % tobj.id}}</td>
</tr>
%if tobj.repr:
<tr>
<th>Representation</th>
<td>{{tobj.repr}}&nbsp;</td>
</tr>
%end
<tr>
<th>Lifetime</th>
<td>{{pp_timestamp(tobj.birth)}} - {{pp_timestamp(tobj.death)}}</td>
</tr>
%if getattr(tobj, 'trace'):
<tr>
<th>Instantiation</th>
<td>
% # <div class="stacktrace">
%for frame in tobj.trace:
<div class="stackframe">
<span class="filename">{{frame[0]}}</span>
<span class="lineno">{{frame[1]}}</span>
<span class="function">{{frame[2]}}</span>
<div class="context">{{frame[3][0].strip()}}</div>
</div>
%end
% # </div>
</td>
</tr>
%end
%for (timestamp, size) in tobj.snapshots:
<tr>
<td>{{pp_timestamp(timestamp)}}</td>
%if not size.refs:
<td>{{pp(size.size)}}</td>
%else:
<td>
{{pp(size.size)}}
%include('asized_referents', referents=size.refs)
</td>
%end
</tr>
%end
</table>
%end
%include('footer')