/* Copyright 2008-9 Google Inc. All Rights Reserved. */ (function(){var k,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},u=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},v=function(a,b){function c(){}
c.prototype=b.prototype;a.t=b.prototype;a.prototype=new c;a.w=function(a,c,f){for(var g=Array(arguments.length-2),h=2;h<arguments.length;h++)g[h-2]=arguments[h];return b.prototype[c].apply(a,g)}};var w=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,w);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};v(w,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")},x=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},y=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},z=function(a,b){return a<b?-1:a>b?1:0};var A=function(a,b){b.unshift(a);w.call(this,ba.apply(null,b));b.shift()};v(A,w);var C=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 A(""+d,e||[]);}};var D=Array.prototype,E=D.indexOf?function(a,b,c){C(null!=a.length);return D.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=D.forEach?function(a,b,c){C(null!=a.length);D.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=D.filter?function(a,b,c){C(null!=a.length);return D.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 t=g[h];b.call(c,t,h,a)&&(e[f++]=t)}return e},ea=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[]},F=function(a,b,c){C(null!=a.length);return 2>=arguments.length?D.slice.call(a,b):D.slice.call(a,b,c)};var G=function(a){var b=arguments.length;if(1==b&&"array"==n(arguments[0]))return G.apply(null,arguments[0]);for(var c={},d=0;d<b;d++)c[arguments[d]]=!0;return c};G("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));G("action","cite","data","formaction","href","manifest","poster","src");G("embed","iframe","link","object","script","style","template");var H;t:{var I=m.navigator;if(I){var J=I.userAgent;if(J){H=J;break t}}H=""};var fa=-1!=H.indexOf("Opera")||-1!=H.indexOf("OPR"),K=-1!=H.indexOf("Trident")||-1!=H.indexOf("MSIE"),L=-1!=H.indexOf("Gecko")&&-1==H.toLowerCase().indexOf("webkit")&&!(-1!=H.indexOf("Trident")||-1!=H.indexOf("MSIE")),M=-1!=H.toLowerCase().indexOf("webkit"),ga=function(){var a=m.document;return a?a.documentMode:void 0},ha=function(){var a="",b;if(fa&&m.opera)return a=m.opera.version,"function"==n(a)?a():a;L?b=/rv\:([^\);]+)(\)|;)/:K?b=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:M&&(b=/WebKit\/(\S+)/);b&&(a=
(a=b.exec(H))?a[1]:"");return K&&(b=ga(),b>parseFloat(a))?String(b):a}(),ia={},N=function(a){var b;if(!(b=ia[a])){b=0;for(var c=x(String(ha)).split("."),d=x(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var g=c[f]||"",h=d[f]||"",t=RegExp("(\\d*)(\\D*)","g"),p=RegExp("(\\d*)(\\D*)","g");do{var l=t.exec(g)||["","",""],B=p.exec(h)||["","",""];if(0==l[0].length&&0==B[0].length)break;b=z(0==l[1].length?0:parseInt(l[1],10),0==B[1].length?0:parseInt(B[1],10))||z(0==l[2].length,0==
B[2].length)||z(l[2],B[2])}while(0==b)}b=ia[a]=0<=b}return b},ja=m.document,ka=ja&&K?ga()||("CSS1Compat"==ja.compatMode?parseInt(ha,10):5):void 0;!L&&!K||K&&K&&9<=ka||L&&N("1.9.1");K&&N("9");var O=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<=E(e.split(/\s+/),b);h&&(c[d++]=g)}c.length=d;return c}return a};var la=function(a){a=a.className;return q(a)&&a.match(/\S+/g)||[]},ma=function(a,b){for(var c=la(a),d=F(arguments,1),e=c,f=0;f<d.length;f++)0<=E(e,d[f])||e.push(d[f]);c=c.join(" ");a.className=c},oa=function(a,b){var c=la(a),d=F(arguments,1),c=na(c,d).join(" ");a.className=c},na=function(a,b){return da(a,function(a){return!(0<=E(b,a))})};var P=function(a){P[" "](a);return a};P[" "]=function(){};var pa=!K||K&&9<=ka,qa=K&&!N("9");!M||N("528");L&&N("1.9b")||K&&N("8")||fa&&N("9.5")||M&&N("528");L&&!N("8")||K&&N("9");var Q=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.n=!1};Q.prototype.preventDefault=function(){this.defaultPrevented=!0};var R=function(a,b){Q.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.b=this.state=null;if(a){this.b=a;var c=this.type=a.type;this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;if(d){if(L){var e;t:{try{P(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;Object.defineProperties?Object.defineProperties(this,{offsetX:{configurable:!0,enumerable:!0,get:this.l,set:this.r},offsetY:{configurable:!0,enumerable:!0,get:this.m,set:this.s}}):(this.offsetX=this.l(),this.offsetY=this.m());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;a.defaultPrevented&&this.preventDefault()}};v(R,Q);k=R.prototype;k.preventDefault=function(){R.t.preventDefault.call(this);var a=this.b;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,qa)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};k.l=function(){return M||void 0!==this.b.offsetX?this.b.offsetX:this.b.layerX};
k.r=function(a){Object.defineProperties(this,{offsetX:{writable:!0,enumerable:!0,configurable:!0,value:a}})};k.m=function(){return M||void 0!==this.b.offsetY?this.b.offsetY:this.b.layerY};k.s=function(a){Object.defineProperties(this,{offsetY:{writable:!0,enumerable:!0,configurable:!0,value:a}})};var ra="closure_listenable_"+(1E6*Math.random()|0),sa=0;var ta=function(a,b,c,d,e){this.d=a;this.f=null;this.src=b;this.type=c;this.h=!!d;this.i=e;this.key=++sa;this.e=this.g=!1},ua=function(a){a.e=!0;a.d=null;a.f=null;a.src=null;a.i=null};var S=function(a){this.src=a;this.c={};this.j=0};S.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.c[f];a||(a=this.c[f]=[],this.j++);var g;t:{for(g=0;g<a.length;++g){var h=a[g];if(!h.e&&h.d==b&&h.h==!!d&&h.i==e)break t}g=-1}-1<g?(b=a[g],c||(b.g=!1)):(b=new ta(b,this.src,f,!!d,e),b.g=c,a.push(b));return b};var va=function(a,b){var c=b.type;if(c in a.c){var d=a.c[c],e=E(d,b),f;if(f=0<=e)C(null!=d.length),D.splice.call(d,e,1);f&&(ua(b),0==a.c[c].length&&(delete a.c[c],a.j--))}};var T="closure_lm_"+(1E6*Math.random()|0),U={},wa=0,ya=function(){var a=xa,b=pa?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},za=function(a,b,c,d,e){if("array"==n(b))for(var f=0;f<b.length;f++)za(a,b[f],c,d,e);else if(c=Aa(c),a&&a[ra])a.B(b,c,d,e);else{if(!b)throw Error("Invalid event type");var f=!!d,g=V(a);g||(a[T]=g=new S(a));c=g.add(b,c,!0,d,e);c.f||(d=ya(),c.f=d,d.src=a,d.d=c,a.addEventListener?a.addEventListener(b.toString(),d,f):a.attachEvent(Ba(b.toString()),
d),wa++)}},Ba=function(a){return a in U?U[a]:U[a]="on"+a},Da=function(a,b,c,d){var e=!0;if(a=V(a))if(b=a.c[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.h==c&&!f.e&&(f=Ca(f,d),e=e&&!1!==f)}return e},Ca=function(a,b){var c=a.d,d=a.i||a.src;if(a.g&&"number"!=typeof a&&a&&!a.e){var e=a.src;if(e&&e[ra])va(e.A,a);else{var f=a.type,g=a.f;e.removeEventListener?e.removeEventListener(f,g,a.h):e.detachEvent&&e.detachEvent(Ba(f),g);wa--;(f=V(e))?(va(f,a),0==f.j&&(f.src=null,e[T]=null)):
ua(a)}}return c.call(d,b)},xa=function(a,b){if(a.e)return!0;if(!pa){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 R(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.n&&0<=h;h--){c.currentTarget=e[h];var t=Da(e[h],f,!0,c),
d=d&&t}for(h=0;!c.n&&h<e.length;h++)c.currentTarget=e[h],t=Da(e[h],f,!1,c),d=d&&t}return d}return Ca(a,new R(b,this))},V=function(a){a=a[T];return a instanceof S?a:null},W="__closure_events_fn_"+(1E9*Math.random()>>>0),Aa=function(a){C(a,"Listener can not be null.");if("function"==n(a))return a;C(a.handleEvent,"An object listener must have handleEvent method.");a[W]||(a[W]=function(b){return a.handleEvent(b)});return a[W]};var Y=function(a,b,c){"number"==typeof a?(this.a=Ea(a,b||0,c||1),X(this,c||1)):(b=typeof a,"object"==b&&null!=a||"function"==b?(this.a=Ea(a.getFullYear(),a.getMonth(),a.getDate()),X(this,a.getDate())):(this.a=new Date(aa()),this.a.setHours(0),this.a.setMinutes(0),this.a.setSeconds(0),this.a.setMilliseconds(0)))},Ea=function(a,b,c){b=new Date(a,b,c);0<=a&&100>a&&b.setFullYear(b.getFullYear()-1900);return b};k=Y.prototype;k.getFullYear=function(){return this.a.getFullYear()};k.getYear=function(){return this.getFullYear()};
k.getMonth=function(){return this.a.getMonth()};k.getDate=function(){return this.a.getDate()};k.getTime=function(){return this.a.getTime()};k.getUTCHours=function(){return this.a.getUTCHours()};k.set=function(a){this.a=new Date(a.getFullYear(),a.getMonth(),a.getDate())};k.setFullYear=function(a){this.a.setFullYear(a)};k.setMonth=function(a){this.a.setMonth(a)};k.setDate=function(a){this.a.setDate(a)};
k.add=function(a){if(a.v||a.q){var b=this.getMonth()+a.q+12*a.v,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.o&&(b=new Date(this.getYear(),this.getMonth(),this.getDate(),12),a=new Date(b.getTime()+864E5*a.o),this.setDate(1),this.setFullYear(a.getFullYear()),this.setMonth(a.getMonth()),
this.setDate(a.getDate()),X(this,a.getDate()))};k.u=function(){return[this.getFullYear(),y(this.getMonth()+1),y(this.getDate())].join("")+""};k.toString=function(){return this.u()};var X=function(a,b){if(a.getDate()!=b){var c=a.getDate()<b?1:-1;a.a.setUTCHours(a.a.getUTCHours()+c)}};Y.prototype.valueOf=function(){return this.a.valueOf()};var Z=function(){};Z.k=function(){Z.p||(Z.p=new Z)};Z.k();new Y(0,0,1);new Y(9999,11,31);K||M&&N("525");Z.k();u("ae.init",function(){Fa();Ga();za(window,"load",function(){});Ha()});
var Fa=function(){var a;if(a=q("ae-content")?document.getElementById("ae-content"):"ae-content"){a=O("table","ae-table-striped",a);for(var b=0,c;c=a[b];b++){c=O("tbody",null,c);for(var d=0,e;e=c[d];d++){e=O("tr",null,e);for(var f=0,g;g=e[f];f++)f%2&&ma(g,"ae-even")}}}},Ga=function(){var a=O(null,"ae-noscript",void 0);ca(ea(a),function(a){oa(a,"ae-noscript")})},Ha=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)})()};u("ae.trackPageView",function(){m._gaq&&m._gaq._getAsyncTracker("ae")._trackPageview()});var Ja=function(a){if(void 0==a||null==a||0==a.length)return 0;a=Math.max.apply(Math,a);return Ia(a)},Ia=function(a){var b=5;2>b&&(b=2);--b;return Math.ceil(a/b)*b},Ka=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))},
La=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=Ja(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(Ka,a,d,e))};u("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=Ja(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}}})});
u("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(Ka,b,d,e))});
u("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=Ia(c);a.draw(e,{height:100,width:f,chartArea:{width:b},fontSize:10,isStacked:!0,vAxis:{minValue:0,maxValue:c,gridlines:{count:5}}})});
u("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"}})});u("ae.Charts.totalTimeBarChart",function(a,b,c,d){for(var e=[],f=0;f<b.length;f++)e[f]=b[f]+" milliseconds";La(a,b,e,c,d)});u("ae.Charts.rpcTimeBarChart",function(a,b,c,d,e){var f=[],g=[],h=c.indices,t=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]]=t[p];b=c[p];var 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[p]]=l}La(a,f,g,d,e)});})();
