/* Copyright 2008-9 Google Inc. All Rights Reserved. */ (function(){var m=void 0,n=!0,q=null,r=!1,s,u=this,aa=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},v=function(a){return"string"==typeof a},w="closure_uid_"+(1E9*Math.random()>>>0),x=0,ba=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)}},y=function(a,b){var c=a.split("."),f=u;!(c[0]in f)&&f.execScript&&f.execScript("var "+c[0]);for(var d;c.length&&
(d=c.shift());)!c.length&&b!==m?f[d]=b:f=f[d]?f[d]:f[d]={}},A=function(a,b){function c(){}c.prototype=b.prototype;a.m=b.prototype;a.prototype=new c};var B=function(a){Error.captureStackTrace?Error.captureStackTrace(this,B):this.stack=Error().stack||"";a&&(this.message=String(a))};A(B,Error);var ca=function(a,b){for(var c=1;c<arguments.length;c++){var f=String(arguments[c]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,f)}return a};var da=function(a,b){b.unshift(a);B.call(this,ca.apply(q,b));b.shift()};A(da,B);var C=function(a,b,c){if(!a){var f=Array.prototype.slice.call(arguments,2),d="Assertion failed";if(b)var d=d+(": "+b),e=f;throw new da(""+d,e||[]);}};var D=Array.prototype,E=D.indexOf?function(a,b,c){C(a.length!=q);return D.indexOf.call(a,b,c)}:function(a,b,c){c=c==q?0:0>c?Math.max(0,a.length+c):c;if(v(a))return!v(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},ea=D.forEach?function(a,b,c){C(a.length!=q);D.forEach.call(a,b,c)}:function(a,b,c){for(var f=a.length,d=v(a)?a.split(""):a,e=0;e<f;e++)e in d&&b.call(c,d[e],e,a)},fa=D.filter?function(a,b,c){C(a.length!=q);return D.filter.call(a,b,c)}:function(a,
b,c){for(var f=a.length,d=[],e=0,g=v(a)?a.split(""):a,h=0;h<f;h++)if(h in g){var l=g[h];b.call(c,l,h,a)&&(d[e++]=l)}return d},ga=function(a,b){var c=E(a,b),f;if(f=0<=c)C(a.length!=q),D.splice.call(a,c,1);return f},ha=function(a){var b=a.length;if(0<b){for(var c=Array(b),f=0;f<b;f++)c[f]=a[f];return c}return[]},ia=function(a,b,c){C(a.length!=q);return 2>=arguments.length?D.slice.call(a,b):D.slice.call(a,b,c)};var F,G,H,I,ja=function(){return u.navigator?u.navigator.userAgent:q};I=H=G=F=r;var J;if(J=ja()){var ka=u.navigator;F=0==J.indexOf("Opera");G=!F&&-1!=J.indexOf("MSIE");H=!F&&-1!=J.indexOf("WebKit");I=!F&&!H&&"Gecko"==ka.product}var la=F,K=G,L=I,M=H,ma=function(){var a=u.document;return a?a.documentMode:m},N;
e:{var O="",P;if(la&&u.opera)var Q=u.opera.version,O="function"==typeof Q?Q():Q;else if(L?P=/rv\:([^\);]+)(\)|;)/:K?P=/MSIE\s+([^\);]+)(\)|;)/:M&&(P=/WebKit\/(\S+)/),P)var na=P.exec(ja()),O=na?na[1]:"";if(K){var oa=ma();if(oa>parseFloat(O)){N=String(oa);break e}}N=O}
var pa=N,qa={},R=function(a){var b;if(!(b=qa[a])){b=0;for(var c=String(pa).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),d=Math.max(c.length,f.length),e=0;0==b&&e<d;e++){var g=c[e]||"",h=f[e]||"",l=RegExp("(\\d*)(\\D*)","g"),p=RegExp("(\\d*)(\\D*)","g");do{var k=l.exec(g)||["","",""],t=p.exec(h)||["","",""];if(0==k[0].length&&0==t[0].length)break;b=((0==k[1].length?0:parseInt(k[1],10))<(0==t[1].length?0:parseInt(t[1],10))?-1:(0==k[1].length?
0:parseInt(k[1],10))>(0==t[1].length?0:parseInt(t[1],10))?1:0)||((0==k[2].length)<(0==t[2].length)?-1:(0==k[2].length)>(0==t[2].length)?1:0)||(k[2]<t[2]?-1:k[2]>t[2]?1:0)}while(0==b)}b=qa[a]=0<=b}return b},ra=u.document,sa=!ra||!K?m:ma()||("CSS1Compat"==ra.compatMode?parseInt(pa,10):5);!L&&!K||K&&K&&9<=sa||L&&R("1.9.1");K&&R("9");var ta=function(a){a=a.className;return v(a)&&a.match(/\S+/g)||[]},ua=function(a,b){for(var c=ta(a),f=ia(arguments,1),d=c,e=0;e<f.length;e++)0<=E(d,f[e])||d.push(f[e]);c=c.join(" ");a.className=c},wa=function(a,b){var c=ta(a),f=ia(arguments,1),c=va(c,f).join(" ");a.className=c},va=function(a,b){return fa(a,function(a){return!(0<=E(b,a))})};var S=function(a,b,c){var f=document;c=c||f;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 f={},d=0,e=0,g;g=c[e];e++)a==g.nodeName&&(f[d++]=g);f.length=d;return f}return c}c=c.getElementsByTagName(a||"*");if(b){f={};for(e=d=0;g=c[e];e++)a=g.className,"function"==typeof a.split&&0<=E(a.split(/\s+/),b)&&(f[d++]=g);f.length=d;return f}return c};var T=function(a){T[" "](a);return a};T[" "]=function(){};var xa=!K||K&&9<=sa,ya=K&&!R("9");!M||R("528");L&&R("1.9b")||K&&R("8")||la&&R("9.5")||M&&R("528");L&&!R("8")||K&&R("9");var U=function(a,b){this.type=a;this.currentTarget=this.target=b};U.prototype.i=r;U.prototype.defaultPrevented=r;U.prototype.preventDefault=function(){this.defaultPrevented=n};var V=function(a,b){a&&za(this,a,b)};A(V,U);s=V.prototype;s.target=q;s.relatedTarget=q;s.offsetX=0;s.offsetY=0;s.clientX=0;s.clientY=0;s.screenX=0;s.screenY=0;s.button=0;s.keyCode=0;s.charCode=0;s.ctrlKey=r;s.altKey=r;s.shiftKey=r;s.metaKey=r;s.l=q;
var za=function(a,b,c){var f=a.type=b.type;U.call(a,f);a.target=b.target||b.srcElement;a.currentTarget=c;if(c=b.relatedTarget){if(L){var d;e:{try{T(c.nodeName);d=n;break e}catch(e){}d=r}d||(c=q)}}else"mouseover"==f?c=b.fromElement:"mouseout"==f&&(c=b.toElement);a.relatedTarget=c;a.offsetX=M||b.offsetX!==m?b.offsetX:b.layerX;a.offsetY=M||b.offsetY!==m?b.offsetY:b.layerY;a.clientX=b.clientX!==m?b.clientX:b.pageX;a.clientY=b.clientY!==m?b.clientY:b.pageY;a.screenX=b.screenX||0;a.screenY=b.screenY||0;
a.button=b.button;a.keyCode=b.keyCode||0;a.charCode=b.charCode||("keypress"==f?b.keyCode:0);a.ctrlKey=b.ctrlKey;a.altKey=b.altKey;a.shiftKey=b.shiftKey;a.metaKey=b.metaKey;a.state=b.state;a.l=b;b.defaultPrevented&&a.preventDefault();delete a.i};V.prototype.preventDefault=function(){V.m.preventDefault.call(this);var a=this.l;if(a.preventDefault)a.preventDefault();else if(a.returnValue=r,ya)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var Aa="closure_listenable_"+(1E6*Math.random()|0),Ba=0;var Ca=function(a,b,c,f,d,e){this.d=a;this.k=b;this.src=c;this.type=f;this.capture=!!d;this.e=e;this.key=++Ba;this.c=this.h=r};var W={},X={},Y={},Z={},Ea=function(){var a=Da,b=xa?function(c){return a.call(b.src,b.d,c)}:function(c){c=a.call(b.src,b.d,c);if(!c)return c};return b},Fa=function(a,b,c,f,d){if("array"==aa(b))for(var e=0;e<b.length;e++)Fa(a,b[e],c,f,d);else if(c=Ga(c),a&&a[Aa]){e=c;C(a.f,"Event target is not initialized. Did you call superclass (goog.events.EventTarget) constructor?");c=a.f[b]||(a.f[b]=[]);var g;t:{for(g=0;g<c.length;++g){var h=c[g];if(h.d==e&&h.capture==!!f&&h.e==d)break t}g=-1}-1<g||(a=new Ca(e,
q,a,b,!!f,d),a.h=n,c.push(a))}else e:{if(!b)throw Error("Invalid event type");f=!!f;h=X;b in h||(h[b]={a:0,b:0});h=h[b];f in h||(h[f]={a:0,b:0},h.a++);h=h[f];e=a[w]||(a[w]=++x);h.b++;if(h[e]){g=h[e];for(var l=0;l<g.length;l++)if(h=g[l],h.d==c&&h.e==d){if(h.c)break;break e}}else g=h[e]=[],h.a++;l=Ea();h=new Ca(c,l,a,b,f,d);h.h=n;l.src=a;l.d=h;g.push(h);Y[e]||(Y[e]=[]);Y[e].push(h);a.addEventListener?a.addEventListener(b,l,f):a.attachEvent(b in Z?Z[b]:Z[b]="on"+b,l);W[h.key]=h}},Ha=function(a,b,c,f){if(!f.g&&
f.j){for(var d=0,e=0;d<f.length;d++)f[d].c||(d!=e&&(f[e]=f[d]),e++);f.length=e;f.j=r;0==e&&(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])}},Ja=function(a,b,c,f,d){var e=1;b=b[w]||(b[w]=++x);if(a[b]){var g=--a.b,h=a[b];h.g?h.g++:h.g=1;try{for(var l=h.length,p=0;p<l;p++){var k=h[p];k&&!k.c&&(e&=Ia(k,d)!==r)}}finally{a.b=Math.max(g,a.b),h.g--,Ha(c,f,b,h)}}return Boolean(e)},Ia=function(a,b){var c=a.d,f=a.e||a.src;if(a.h&&"number"!=typeof a&&a&&!a.c){var d=
a.src;if(d&&d[Aa]){var e=a.type;e in d.f&&ga(d.f[e],a)&&(delete W[a.key],a.c=n)}else{var e=a.type,g=a.k,h=a.capture;d.removeEventListener?d.removeEventListener(e,g,h):d.detachEvent&&d.detachEvent(e in Z?Z[e]:Z[e]="on"+e,g);d=d[w]||(d[w]=++x);Y[d]&&(g=Y[d],ga(g,a),0==g.length&&delete Y[d]);a.c=n;a.d=q;a.k=q;a.src=q;a.e=q;if(g=X[e][h][d])g.j=n,Ha(e,h,d,g);delete W[a.key]}}return c.call(f,b)},Da=function(a,b){if(a.c)return n;var c=a.type,f=X;if(!(c in f))return n;var f=f[c],d,e;if(!xa){var g;if(!(g=
b))e:{g=["window","event"];for(var h=u;d=g.shift();)if(h[d]!=q)h=h[d];else{g=q;break e}g=h}d=g;g=n in f;h=r in f;if(g){if(0>d.keyCode||d.returnValue!=m)return n;e:{var l=r;if(0==d.keyCode)try{d.keyCode=-1;break e}catch(p){l=n}if(l||d.returnValue==m)d.returnValue=n}}l=new V;za(l,d,this);d=n;try{if(g){for(var k=[],t=l.currentTarget;t;t=t.parentNode)k.push(t);e=f[n];e.b=e.a;for(var z=k.length-1;!l.i&&0<=z&&e.b;z--)l.currentTarget=k[z],d&=Ja(e,k[z],c,n,l);if(h){e=f[r];e.b=e.a;for(z=0;!l.i&&z<k.length&&
e.b;z++)l.currentTarget=k[z],d&=Ja(e,k[z],c,r,l)}}else d=Ia(a,l)}finally{k&&(k.length=0)}return d}c=new V(b,this);return d=Ia(a,c)},Ka="__closure_events_fn_"+(1E9*Math.random()>>>0),Ga=function(a){C(a,"Listener can not be null.");if("function"==aa(a))return a;C(a.handleEvent,"An object listener must have handleEvent method.");return a[Ka]||(a[Ka]=function(b){return a.handleEvent(b)})};var $=function(){};$.n=function(){$.o||($.o=new $)};$.n();K||M&&R("525");y("ae.init",function(){La();Ma();Fa(window,"load",function(){});Na()});
var La=function(){var a;if(a=v("ae-content")?document.getElementById("ae-content"):"ae-content"){a=S("table","ae-table-striped",a);for(var b=0,c;c=a[b];b++){c=S("tbody",q,c);for(var f=0,d;d=c[f];f++){d=S("tr",q,d);for(var e=0,g;g=d[e];e++)e%2&&ua(g,"ae-even")}}}},Ma=function(){var a=S(q,"ae-noscript",m);ea(ha(a),function(a){wa(a,"ae-noscript")})},Na=function(){u._gaq=u._gaq||[];u._gaq.push(function(){u._gaq._createAsyncTracker("UA-3739047-3","ae")._trackPageview()});(function(){var 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)})()};y("ae.trackPageView",function(){u._gaq&&u._gaq._getAsyncTracker("ae")._trackPageview()});var Pa=function(a){if(a==m||a==q||0==a.length)return 0;a=Math.max.apply(Math,a);return Oa(a)},Oa=function(a){var b=5;2>b&&(b=2);b-=1;return Math.ceil(a/b)*b},Qa=function(a,b,c){a=a.getSelection();1==a.length&&(a=a[0],a.row!=q&&(b.starttime!=q&&(c+="&starttime="+b.starttime),b.endtime!=q&&(c+="&endtime="+b.endtime),b.latency_lower!=q&&(c+="&latency_lower="+b.latency_lower),b.latency_upper!=q&&(c+="&latency_upper="+b.latency_upper),b=c+"&detail="+a.row,window.location.href=b))},Ra=function(a,b,c,f,
d){var e=new google.visualization.DataTable;e.addColumn("string","");e.addColumn("number","");e.addColumn({type:"string",role:"tooltip"});for(var g=0;g<b.length;g++)e.addRow(["",b[g],c[g]]);c=Math.max(10*b.length,200);b=Pa(b);a=new google.visualization.ColumnChart(document.getElementById("rpctime-"+a));a.draw(e,{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",ba(Qa,a,f,d))};
y("ae.Charts.latencyHistogram",function(a,b,c){var f=new google.visualization.DataTable;f.addColumn("string","");f.addColumn("number","");for(var d=0;d<b.length;d++)f.addRow([""+a[d],b[d]]);for(d=b.length;d<a.length;d++)f.addRow([""+a[d],0]);b=Pa(b);(new google.visualization.ColumnChart(document.getElementById("latency-"+c))).draw(f,{legend:"none",width:20*a.length,height:200,vAxis:{maxValue:b,gridlines:{count:5}}})});
y("ae.Charts.latencyTimestampScatter",function(a,b,c,f,d){var e=new google.visualization.DataTable;e.addColumn("number","Time (seconds from start)");e.addColumn("number","Latency");for(var g=0;g<a.length;g++){var h=Math.round(a[g]-c);e.addRow([h,b[g]])}a=f.starttime?f.starttime:0;b=new google.visualization.ScatterChart(document.getElementById("LatencyVsTimestamp"));b.draw(e,{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",ba(Qa,b,f,d))});
y("ae.Charts.entityCountBarChart",function(a,b,c,f){var d=new google.visualization.DataTable;d.addColumn("string","");d.addColumn("number","Reads");d.addColumn({type:"string",role:"tooltip"});d.addColumn("number","Misses");d.addColumn({type:"string",role:"tooltip"});d.addColumn("number","Writes");d.addColumn({type:"string",role:"tooltip"});var e=50;e>b.length&&(e=b.length);for(var g=0;g<e;g++)d.addRow(["",b[g][1]-b[g][3],b[g][0],b[g][3],b[g][0],b[g][2],b[g][0]]);b=20*e;e=b+130;a=new google.visualization.ColumnChart(document.getElementById(f+
"-"+a));c=Oa(c);a.draw(d,{height:100,width:e,chartArea:{width:b},fontSize:10,isStacked:n,vAxis:{minValue:0,maxValue:c,gridlines:{count:5}}})});
y("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:n,slantedTextAngle:45,textStyle:{fontSize:13}},height:250,chartArea:{top:10,height:100},
legend:"none",tooltip:{trigger:"none"}})});y("ae.Charts.totalTimeBarChart",function(a,b,c,f){for(var d=[],e=0;e<b.length;e++)d[e]=b[e]+" milliseconds";Ra(a,b,d,c,f)});y("ae.Charts.rpcTimeBarChart",function(a,b,c,f,d){var e=[],g=[],h=c.indices,l=c.times;c=c.stats;for(var p=0;p<b;p++)e[p]=0,g[p]=q;for(p=0;p<h.length;p++){e[h[p]]=l[p];b=c[p];var k="Calls: "+b[0];if(0<b[1]||0<b[2]||0<b[3])k+=" Entities";0<b[1]&&(k+=" R:"+b[1]);0<b[2]&&(k+=" W:"+b[2]);0<b[3]&&(k+=" M:"+b[3]);g[h[p]]=k}Ra(a,e,g,f,d)});})();
