/* Copyright 2008-9 Google Inc. All Rights Reserved. */ (function(){var k=void 0,m=!0,n=null,p=!1,q,r=this,s=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&
!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},t=function(a){return"string"==typeof a},u="closure_uid_"+Math.floor(2147483648*Math.random()).toString(36),v=0,aa=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}},x=function(a,b){var c=a.split("."),e=r;!(c[0]in e)&&e.execScript&&e.execScript("var "+
c[0]);for(var f;c.length&&(f=c.shift());)!c.length&&b!==k?e[f]=b:e=e[f]?e[f]:e[f]={}},y=function(a,b){function c(){}c.prototype=b.prototype;a.o=b.prototype;a.prototype=new c};var z=function(a){Error.captureStackTrace?Error.captureStackTrace(this,z):this.stack=Error().stack||"";a&&(this.message=String(a))};y(z,Error);var ba=function(a,b){for(var c=1;c<arguments.length;c++)var e=String(arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,e);return a};var ca=function(a,b){b.unshift(a);z.call(this,ba.apply(n,b));b.shift()};y(ca,z);var A=function(a,b,c){if(!a){var e=Array.prototype.slice.call(arguments,2),f="Assertion failed";if(b)var f=f+(": "+b),d=e;throw new ca(""+f,d||[]);}};var B=Array.prototype,C=B.indexOf?function(a,b,c){A(a.length!=n);return B.indexOf.call(a,b,c)}:function(a,b,c){c=c==n?0:0>c?Math.max(0,a.length+c):c;if(t(a))return!t(b)||1!=b.length?-1:a.indexOf(b,c);for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},da=B.forEach?function(a,b,c){A(a.length!=n);B.forEach.call(a,b,c)}:function(a,b,c){for(var e=a.length,f=t(a)?a.split(""):a,d=0;d<e;d++)d in f&&b.call(c,f[d],d,a)},ea=B.filter?function(a,b,c){A(a.length!=n);return B.filter.call(a,b,c)}:function(a,
b,c){for(var e=a.length,f=[],d=0,g=t(a)?a.split(""):a,h=0;h<e;h++)if(h in g){var j=g[h];b.call(c,j,h,a)&&(f[d++]=j)}return f},fa=function(a,b,c){A(a.length!=n);return 2>=arguments.length?B.slice.call(a,b):B.slice.call(a,b,c)};var D,E,F,G,ga=function(){return r.navigator?r.navigator.userAgent:n};G=F=E=D=p;var H;if(H=ga()){var ha=r.navigator;D=0==H.indexOf("Opera");E=!D&&-1!=H.indexOf("MSIE");F=!D&&-1!=H.indexOf("WebKit");G=!D&&!F&&"Gecko"==ha.product}var ia=D,I=E,J=G,K=F,L;
a:{var M="",N;if(ia&&r.opera)var O=r.opera.version,M="function"==typeof O?O():O;else if(J?N=/rv\:([^\);]+)(\)|;)/:I?N=/MSIE\s+([^\);]+)(\)|;)/:K&&(N=/WebKit\/(\S+)/),N)var ja=N.exec(ga()),M=ja?ja[1]:"";if(I){var P,ka=r.document;P=ka?ka.documentMode:k;if(P>parseFloat(M)){L=String(P);break a}}L=M}
var la=L,ma={},Q=function(a){var b;if(!(b=ma[a])){b=0;for(var c=String(la).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(c.length,e.length),d=0;0==b&&d<f;d++){var g=c[d]||"",h=e[d]||"",j=RegExp("(\\d*)(\\D*)","g"),i=RegExp("(\\d*)(\\D*)","g");do{var l=j.exec(g)||["","",""],o=i.exec(h)||["","",""];if(0==l[0].length&&0==o[0].length)break;b=((0==l[1].length?0:parseInt(l[1],10))<(0==o[1].length?0:parseInt(o[1],10))?-1:(0==l[1].length?
0:parseInt(l[1],10))>(0==o[1].length?0:parseInt(o[1],10))?1:0)||((0==l[2].length)<(0==o[2].length)?-1:(0==l[2].length)>(0==o[2].length)?1:0)||(l[2]<o[2]?-1:l[2]>o[2]?1:0)}while(0==b)}b=ma[a]=0<=b}return b},na={},R=function(){return na[9]||(na[9]=I&&!!document.documentMode&&9<=document.documentMode)};!I||R();!J&&!I||I&&R()||J&&Q("1.9.1");I&&Q("9");var oa=function(a){a=a.className;return t(a)&&a.match(/\S+/g)||[]},pa=function(a,b){for(var c=oa(a),e=fa(arguments,1),f=c,d=0;d<e.length;d++)0<=C(f,e[d])||f.push(e[d]);a.className=c.join(" ")},qa=function(a,b){var c=oa(a),e=fa(arguments,1),c=ea(c,function(a){return!(0<=C(e,a))});a.className=c.join(" ")};var S=function(a,b,c){var e=document,c=c||e,a=a&&"*"!=a?a.toUpperCase():"";if(c.querySelectorAll&&c.querySelector&&(a||b))return c.querySelectorAll(a+(b?"."+b:""));if(b&&c.getElementsByClassName){c=c.getElementsByClassName(b);if(a){for(var e={},f=0,d=0,g;g=c[d];d++)a==g.nodeName&&(e[f++]=g);e.length=f;return e}return c}c=c.getElementsByTagName(a||"*");if(b){e={};for(d=f=0;g=c[d];d++)a=g.className,"function"==typeof a.split&&0<=C(a.split(/\s+/),b)&&(e[f++]=g);e.length=f;return e}return c};var ra=function(a){ra[" "](a);return a};ra[" "]=function(){};!I||R();var sa=!I||R(),ta=I&&!Q("8");!K||Q("528");J&&Q("1.9b")||I&&Q("8")||ia&&Q("9.5")||K&&Q("528");J&&!Q("8")||I&&Q("9");var U=function(a,b){this.type=a;this.currentTarget=this.target=b};U.prototype.h=p;U.prototype.defaultPrevented=p;U.prototype.preventDefault=function(){this.defaultPrevented=m};var V=function(a,b){a&&this.e(a,b)};y(V,U);q=V.prototype;q.target=n;q.relatedTarget=n;q.offsetX=0;q.offsetY=0;q.clientX=0;q.clientY=0;q.screenX=0;q.screenY=0;q.button=0;q.keyCode=0;q.charCode=0;q.ctrlKey=p;q.altKey=p;q.shiftKey=p;q.metaKey=p;q.m=n;
q.e=function(a,b){var c=this.type=a.type;U.call(this,c);this.target=a.target||a.srcElement;this.currentTarget=b;var e=a.relatedTarget;if(e){if(J){var f;a:{try{ra(e.nodeName);f=m;break a}catch(d){}f=p}f||(e=n)}}else"mouseover"==c?e=a.fromElement:"mouseout"==c&&(e=a.toElement);this.relatedTarget=e;this.offsetX=K||a.offsetX!==k?a.offsetX:a.layerX;this.offsetY=K||a.offsetY!==k?a.offsetY:a.layerY;this.clientX=a.clientX!==k?a.clientX:a.pageX;this.clientY=a.clientY!==k?a.clientY:a.pageY;this.screenX=a.screenX||
0;this.screenY=a.screenY||0;this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.state=a.state;this.m=a;a.defaultPrevented&&this.preventDefault();delete this.h};
q.preventDefault=function(){V.o.preventDefault.call(this);var a=this.m;if(a.preventDefault)a.preventDefault();else if(a.returnValue=p,ta)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var ua=function(){},va=0;q=ua.prototype;q.key=0;q.c=p;q.g=p;q.e=function(a,b,c,e,f,d){if("function"==s(a))this.l=m;else if(a&&a.handleEvent&&"function"==s(a.handleEvent))this.l=p;else throw Error("Invalid listener argument");this.d=a;this.j=b;this.src=c;this.type=e;this.capture=!!f;this.i=d;this.g=p;this.key=++va;this.c=p};q.handleEvent=function(a){return this.l?this.d.call(this.i||this.src,a):this.d.handleEvent.call(this.d,a)};var W={},X={},Y={},Z={},wa=function(a,b,c,e,f){if(b){if("array"==s(b)){for(var d=0;d<b.length;d++)wa(a,b[d],c,e,f);return n}var e=!!e,g=X;b in g||(g[b]={a:0,b:0});g=g[b];e in g||(g[e]={a:0,b:0},g.a++);var g=g[e],h=a[u]||(a[u]=++v),j;g.b++;if(g[h]){j=g[h];for(d=0;d<j.length;d++)if(g=j[d],g.d==c&&g.i==f){if(g.c)break;return j[d].key}}else j=g[h]=[],g.a++;var i=xa,l=sa?function(a){return i.call(l.src,l.key,a)}:function(a){a=i.call(l.src,l.key,a);if(!a)return a},d=l;d.src=a;g=new ua;g.e(c,d,a,b,e,f);
c=g.key;d.key=c;j.push(g);W[c]=g;Y[h]||(Y[h]=[]);Y[h].push(g);a.addEventListener?(a==r||!a.n)&&a.addEventListener(b,d,e):a.attachEvent(b in Z?Z[b]:Z[b]="on"+b,d);return c}throw Error("Invalid event type");},ya=function(a,b,c,e,f){if("array"==s(b))for(var d=0;d<b.length;d++)ya(a,b[d],c,e,f);else a=wa(a,b,c,e,f),W[a].g=m},za=function(a,b,c,e){if(!e.f&&e.k){for(var f=0,d=0;f<e.length;f++)e[f].c?e[f].j.src=n:(f!=d&&(e[d]=e[f]),d++);e.length=d;e.k=p;0==d&&(delete X[a][b][c],X[a][b].a--,0==X[a][b].a&&(delete X[a][b],
X[a].a--),0==X[a].a&&delete X[a])}},Ba=function(a,b,c,e,f){var d=1,b=b[u]||(b[u]=++v);if(a[b]){a.b--;a=a[b];a.f?a.f++:a.f=1;try{for(var g=a.length,h=0;h<g;h++){var j=a[h];j&&!j.c&&(d&=Aa(j,f)!==p)}}finally{a.f--,za(c,e,b,a)}}return Boolean(d)},Aa=function(a,b){if(a.g){var c=a.key;if(W[c]){var e=W[c];if(!e.c){var f=e.src,d=e.type,g=e.j,h=e.capture;f.removeEventListener?(f==r||!f.n)&&f.removeEventListener(d,g,h):f.detachEvent&&f.detachEvent(d in Z?Z[d]:Z[d]="on"+d,g);f=f[u]||(f[u]=++v);if(Y[f]){var g=
Y[f],j=C(g,e);0<=j&&(A(g.length!=n),B.splice.call(g,j,1));0==g.length&&delete Y[f]}e.c=m;if(e=X[d][h][f])e.k=m,za(d,h,f,e);delete W[c]}}}return a.handleEvent(b)},xa=function(a,b){if(!W[a])return m;var c=W[a],e=c.type,f=X;if(!(e in f))return m;var f=f[e],d,g;if(!sa){var h;if(!(h=b))a:{h=["window","event"];for(var j=r;d=h.shift();)if(j[d]!=n)j=j[d];else{h=n;break a}h=j}d=h;h=m in f;j=p in f;if(h){if(0>d.keyCode||d.returnValue!=k)return m;a:{var i=p;if(0==d.keyCode)try{d.keyCode=-1;break a}catch(l){i=
m}if(i||d.returnValue==k)d.returnValue=m}}i=new V;i.e(d,this);d=m;try{if(h){for(var o=[],T=i.currentTarget;T;T=T.parentNode)o.push(T);g=f[m];g.b=g.a;for(var w=o.length-1;!i.h&&0<=w&&g.b;w--)i.currentTarget=o[w],d&=Ba(g,o[w],e,m,i);if(j){g=f[p];g.b=g.a;for(w=0;!i.h&&w<o.length&&g.b;w++)i.currentTarget=o[w],d&=Ba(g,o[w],e,p,i)}}else d=Aa(c,i)}finally{o&&(o.length=0)}return d}e=new V(b,this);return d=Aa(c,e)};var $=function(){};$.p=function(){$.q||($.q=new $)};$.p();I||K&&Q("525");x("ae.init",function(){var a=t("ae-content")?document.getElementById("ae-content"):"ae-content";if(a)for(var a=S("table","ae-table-striped",a),b=0,c;c=a[b];b++){c=S("tbody",n,c);for(var e=0,f;f=c[e];e++){f=S("tr",n,f);for(var d=0,g;g=f[d];d++)d%2&&pa(g,"ae-even")}}a=S(n,"ae-noscript",k);b=a.length;if(0<b){c=Array(b);for(e=0;e<b;e++)c[e]=a[e];a=c}else a=[];da(a,function(a){qa(a,"ae-noscript")});ya(window,"load",function(){});r._gaq=r._gaq||[];r._gaq.push(function(){r._gaq._createAsyncTracker("UA-3739047-3",
"ae")._trackPageview()});a=document.createElement("script");a.src=("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";a.setAttribute("async","true");document.documentElement.firstChild.appendChild(a)});x("ae.trackPageView",function(){r._gaq&&r._gaq._getAsyncTracker("ae")._trackPageview()});var Da=function(a){if(a==k||a==n||0==a.length)return 0;a=Math.max.apply(Math,a);return Ca(a)},Ca=function(a){var b=5;2>b&&(b=2);b-=1;return Math.ceil(a/b)*b},Ea=function(a,b,c){a=a.getSelection();1==a.length&&(a=a[0],a.row!=n&&(b.starttime!=n&&(c+="&starttime="+b.starttime),b.endtime!=n&&(c+="&endtime="+b.endtime),b.latency_lower!=n&&(c+="&latency_lower="+b.latency_lower),b.latency_upper!=n&&(c+="&latency_upper="+b.latency_upper),b=c+"&detail="+a.row,window.location.href=b))},Fa=function(a,b,c,e,
f){var d=new google.visualization.DataTable;d.addColumn("string","");d.addColumn("number","");d.addColumn({type:"string",role:"tooltip"});for(var g=0;g<b.length;g++)d.addRow(["",b[g],c[g]]);c=Math.max(10*b.length,200);b=Da(b);a=new google.visualization.ColumnChart(document.getElementById("rpctime-"+a));a.draw(d,{height:100,width:c,legend:"none",chartArea:{left:40},fontSize:11,vAxis:{minValue:0,maxValue:b,gridlines:{count:5}}});google.visualization.events.addListener(a,"select",aa(Ea,a,e,f))};
x("ae.Charts.latencyHistogram",function(a,b,c){var e=new google.visualization.DataTable;e.addColumn("string","");e.addColumn("number","");for(var f=0;f<b.length;f++)e.addRow([""+a[f],b[f]]);for(f=b.length;f<a.length;f++)e.addRow([""+a[f],0]);b=Da(b);(new google.visualization.ColumnChart(document.getElementById("latency-"+c))).draw(e,{legend:"none",width:20*a.length,height:200,vAxis:{maxValue:b,gridlines:{count:5}}})});
x("ae.Charts.latencyTimestampScatter",function(a,b,c,e,f){var d=new google.visualization.DataTable;d.addColumn("number","Time (seconds from start)");d.addColumn("number","Latency");for(var g=0;g<a.length;g++){var h=Math.round(a[g]-c);d.addRow([h,b[g]])}a=e.starttime?e.starttime:0;b=new google.visualization.ScatterChart(document.getElementById("LatencyVsTimestamp"));b.draw(d,{hAxis:{title:"Time (seconds from start of recording)",minValue:a},vAxis:{title:"Request Latency (milliseconds)",minValue:0},
tooltip:{trigger:"none"},legend:"none"});google.visualization.events.addListener(b,"select",aa(Ea,b,e,f))});
x("ae.Charts.entityCountBarChart",function(a,b,c,e){var f=new google.visualization.DataTable;f.addColumn("string","");f.addColumn("number","Reads");f.addColumn({type:"string",role:"tooltip"});f.addColumn("number","Misses");f.addColumn({type:"string",role:"tooltip"});f.addColumn("number","Writes");f.addColumn({type:"string",role:"tooltip"});var d=50;d>b.length&&(d=b.length);for(var g=0;g<d;g++)f.addRow(["",b[g][1]-b[g][3],b[g][0],b[g][3],b[g][0],b[g][2],b[g][0]]);b=20*d;d=b+130;a=new google.visualization.ColumnChart(document.getElementById(e+
"-"+a));c=Ca(c);a.draw(f,{height:100,width:d,chartArea:{width:b},fontSize:10,isStacked:m,vAxis:{minValue:0,maxValue:c,gridlines:{count:5}}})});
x("ae.Charts.rpcVariationCandlestick",function(a){var b=new google.visualization.DataTable;b.addColumn("string","");b.addColumn("number","");b.addColumn("number","");b.addColumn("number","");b.addColumn("number","");b.addRows(a);(new google.visualization.CandlestickChart(document.getElementById("rpcvariation"))).draw(b,{vAxis:{title:"RPC Latency variation (milliseconds)"},hAxis:{textPosition:"out",slantedText:m,slantedTextAngle:45,textStyle:{fontSize:13}},height:250,chartArea:{top:10,height:100},
legend:"none",tooltip:{trigger:"none"}})});x("ae.Charts.totalTimeBarChart",function(a,b,c,e){for(var f=[],d=0;d<b.length;d++)f[d]=b[d]+" milliseconds";Fa(a,b,f,c,e)});x("ae.Charts.rpcTimeBarChart",function(a,b,c,e,f){for(var d=[],g=[],h=c.indices,j=c.times,c=c.stats,i=0;i<b;i++)d[i]=0,g[i]=n;for(i=0;i<h.length;i++){d[h[i]]=j[i];var b=c[i],l="Calls: "+b[0];if(0<b[1]||0<b[2]||0<b[3])l+=" Entities";0<b[1]&&(l+=" R:"+b[1]);0<b[2]&&(l+=" W:"+b[2]);0<b[3]&&(l+=" M:"+b[3]);g[h[i]]=l}Fa(a,d,g,e,f)});})();
