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