/* 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("."),e=m;c[0]in e||!e.execScript||e.execScript("var "+c[0]);for(var d;c.length&&(d=c.shift());)c.length||void 0===b?e=e[d]?e[d]:e[d]={}:e[d]=b},t=function(a,b){function c(){}
c.prototype=b.prototype;a.o=b.prototype;a.prototype=new c;a.u=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"),e="",d=Array.prototype.slice.call(arguments,1);d.length&&1<c.length;)e+=c.shift()+d.shift();return e+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 z=function(a,b,c){if(!a){var e="Assertion failed";if(b)var e=e+(": "+b),d=Array.prototype.slice.call(arguments,2);throw new y(""+e,d||[]);}};var B=Array.prototype,C=B.indexOf?function(a,b,c){z(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){z(null!=a.length);B.forEach.call(a,b,c)}:function(a,b,c){for(var e=a.length,d=q(a)?a.split(""):a,f=0;f<e;f++)f in d&&b.call(c,d[f],f,a)},da=B.filter?function(a,b,c){z(null!=a.length);return B.filter.call(a,b,
c)}:function(a,b,c){for(var e=a.length,d=[],f=0,g=q(a)?a.split(""):a,h=0;h<e;h++)if(h in g){var w=g[h];b.call(c,w,h,a)&&(d[f++]=w)}return d},ea=function(a){var b=a.length;if(0<b){for(var c=Array(b),e=0;e<b;e++)c[e]=a[e];return c}return[]},D=function(a,b,c){z(null!=a.length);return 2>=arguments.length?B.slice.call(a,b):B.slice.call(a,b,c)};var E;t:{var F=m.navigator;if(F){var G=F.userAgent;if(G){E=G;break t}}E=""};var H=-1!=E.indexOf("Opera")||-1!=E.indexOf("OPR"),I=-1!=E.indexOf("Trident")||-1!=E.indexOf("MSIE"),J=-1!=E.indexOf("Gecko")&&-1==E.toLowerCase().indexOf("webkit")&&!(-1!=E.indexOf("Trident")||-1!=E.indexOf("MSIE")),K=-1!=E.toLowerCase().indexOf("webkit"),L=function(){var a=m.document;return a?a.documentMode:void 0},M=function(){var a="",b;if(H&&m.opera)return a=m.opera.version,"function"==n(a)?a():a;J?b=/rv\:([^\);]+)(\)|;)/:I?b=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:K&&(b=/WebKit\/(\S+)/);b&&(a=(a=
b.exec(E))?a[1]:"");return I&&(b=L(),b>parseFloat(a))?String(b):a}(),N={},O=function(a){var b;if(!(b=N[a])){b=0;for(var c=String(M).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),d=Math.max(c.length,e.length),f=0;0==b&&f<d;f++){var g=c[f]||"",h=e[f]||"",w=RegExp("(\\d*)(\\D*)","g"),p=RegExp("(\\d*)(\\D*)","g");do{var k=w.exec(g)||["","",""],A=p.exec(h)||["","",""];if(0==k[0].length&&0==A[0].length)break;b=x(0==k[1].length?0:parseInt(k[1],
10),0==A[1].length?0:parseInt(A[1],10))||x(0==k[2].length,0==A[2].length)||x(k[2],A[2])}while(0==b)}b=N[a]=0<=b}return b},fa=m.document,ga=fa&&I?L()||("CSS1Compat"==fa.compatMode?parseInt(M,10):5):void 0;!J&&!I||I&&I&&9<=ga||J&&O("1.9.1");I&&O("9");var P=function(a,b,c){var e=document;c=c||e;var d=a&&"*"!=a?a.toUpperCase():"";if(c.querySelectorAll&&c.querySelector&&(d||b))return c.querySelectorAll(d+(b?"."+b:""));if(b&&c.getElementsByClassName){a=c.getElementsByClassName(b);if(d){c={};for(var f=e=0,g;g=a[f];f++)d==g.nodeName&&(c[e++]=g);c.length=e;return c}return a}a=c.getElementsByTagName(d||"*");if(b){c={};for(f=e=0;g=a[f];f++){var d=g.className,h;if(h="function"==typeof d.split)h=0<=C(d.split(/\s+/),b);h&&(c[e++]=g)}c.length=e;return c}return a};var ha=function(a){a=a.className;return q(a)&&a.match(/\S+/g)||[]},ia=function(a,b){for(var c=ha(a),e=D(arguments,1),d=c,f=0;f<e.length;f++)0<=C(d,e[f])||d.push(e[f]);c=c.join(" ");a.className=c},ka=function(a,b){var c=ha(a),e=D(arguments,1),c=ja(c,e).join(" ");a.className=c},ja=function(a,b){return da(a,function(a){return!(0<=C(b,a))})};var Q=function(a){Q[" "](a);return a};Q[" "]=function(){};var la=!I||I&&9<=ga,ma=I&&!O("9");!K||O("528");J&&O("1.9b")||I&&O("8")||H&&O("9.5")||K&&O("528");J&&!O("8")||I&&O("9");var R=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.j=!1};R.prototype.preventDefault=function(){this.defaultPrevented=!0};var S=function(a,b){R.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 e=a.relatedTarget;if(e){if(J){var d;t:{try{Q(e.nodeName);d=!0;break t}catch(f){}d=!1}d||(e=null)}}else"mouseover"==
c?e=a.fromElement:"mouseout"==c&&(e=a.toElement);this.relatedTarget=e;this.offsetX=K||void 0!==a.offsetX?a.offsetX:a.layerX;this.offsetY=K||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(S,R);S.prototype.preventDefault=function(){S.o.preventDefault.call(this);var a=this.k;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,ma)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var na="closure_listenable_"+(1E6*Math.random()|0),oa=0;var pa=function(a,b,c,e,d){this.c=a;this.e=null;this.src=b;this.type=c;this.g=!!e;this.f=d;this.key=++oa;this.d=this.h=!1},qa=function(a){a.d=!0;a.c=null;a.e=null;a.src=null;a.f=null};var T=function(a){this.src=a;this.b={};this.i=0};T.prototype.add=function(a,b,c,e,d){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==!!e&&h.f==d)break t}g=-1}-1<g?(b=a[g],c||(b.h=!1)):(b=new pa(b,this.src,f,!!e,d),b.h=c,a.push(b));return b};var ra=function(a,b){var c=b.type;if(c in a.b){var e=a.b[c],d=C(e,b),f;if(f=0<=d)z(null!=e.length),B.splice.call(e,d,1);f&&(qa(b),0==a.b[c].length&&(delete a.b[c],a.i--))}};var U="closure_lm_"+(1E6*Math.random()|0),V={},sa=0,ua=function(){var a=ta,b=la?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},va=function(a,b,c,e,d){if("array"==n(b))for(var f=0;f<b.length;f++)va(a,b[f],c,e,d);else if(c=wa(c),a&&a[na])a.t(b,c,e,d);else{if(!b)throw Error("Invalid event type");var f=!!e,g=W(a);g||(a[U]=g=new T(a));c=g.add(b,c,!0,e,d);c.e||(e=ua(),c.e=e,e.src=a,e.c=c,a.addEventListener?a.addEventListener(b.toString(),e,f):a.attachEvent(xa(b.toString()),
e),sa++)}},xa=function(a){return a in V?V[a]:V[a]="on"+a},za=function(a,b,c,e){var d=1;if(a=W(a))if(b=a.b[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.g==c&&!f.d&&(d&=!1!==ya(f,e))}return Boolean(d)},ya=function(a,b){var c=a.c,e=a.f||a.src;if(a.h&&"number"!=typeof a&&a&&!a.d){var d=a.src;if(d&&d[na])ra(d.s,a);else{var f=a.type,g=a.e;d.removeEventListener?d.removeEventListener(f,g,a.g):d.detachEvent&&d.detachEvent(xa(f),g);sa--;(f=W(d))?(ra(f,a),0==f.i&&(f.src=null,d[U]=null)):
qa(a)}}return c.call(e,b)},ta=function(a,b){if(a.d)return!0;if(!la){var c;if(!(c=b))t:{c=["window","event"];for(var e=m,d;d=c.shift();)if(null!=e[d])e=e[d];else{c=null;break t}c=e}d=c;c=new S(d,this);e=!0;if(!(0>d.keyCode||void 0!=d.returnValue)){t:{var f=!1;if(0==d.keyCode)try{d.keyCode=-1;break t}catch(g){f=!0}if(f||void 0==d.returnValue)d.returnValue=!0}d=[];for(f=c.currentTarget;f;f=f.parentNode)d.push(f);for(var f=a.type,h=d.length-1;!c.j&&0<=h;h--)c.currentTarget=d[h],e&=za(d[h],f,!0,c);for(h=
0;!c.j&&h<d.length;h++)c.currentTarget=d[h],e&=za(d[h],f,!1,c)}return e}return ya(a,new S(b,this))},W=function(a){a=a[U];return a instanceof T?a:null},X="__closure_events_fn_"+(1E9*Math.random()>>>0),wa=function(a){z(a,"Listener can not be null.");if("function"==n(a))return a;z(a.handleEvent,"An object listener must have handleEvent method.");a[X]||(a[X]=function(b){return a.handleEvent(b)});return a[X]};var Z=function(a,b,c){"number"==typeof a?(this.a=Aa(a,b||0,c||1),Y(this,c||1)):(b=typeof a,"object"==b&&null!=a||"function"==b?(this.a=Aa(a.getFullYear(),a.getMonth(),a.getDate()),Y(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=Z.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 e;t:{switch(b){case 1:e=0!=c%4||0==c%100&&0!=c%400?28:29;break t;case 5:case 8:case 10:case 3:e=30;break t}e=31}e=Math.min(e,this.getDate());this.setDate(1);this.setFullYear(c);this.setMonth(b);this.setDate(e)}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()),Y(this,a.getDate()))};l.r=function(){return[this.getFullYear(),v(this.getMonth()+1),v(this.getDate())].join("")+""};l.toString=function(){return this.r()};var Y=function(a,b){if(a.getDate()!=b){var c=a.getDate()<b?1:-1;a.a.setUTCHours(a.a.getUTCHours()+c)}};Z.prototype.valueOf=function(){return this.a.valueOf()};var $=function(){};$.l=function(){$.q||($.q=new $)};$.l();new Z(0,0,1);new Z(9999,11,31);I||K&&O("525");$.l();s("ae.init",function(){Ba();Ca();va(window,"load",function(){});Da()});
var Ba=function(){var a;if(a=q("ae-content")?document.getElementById("ae-content"):"ae-content"){a=P("table","ae-table-striped",a);for(var b=0,c;c=a[b];b++){c=P("tbody",null,c);for(var e=0,d;d=c[e];e++){d=P("tr",null,d);for(var f=0,g;g=d[f];f++)f%2&&ia(g,"ae-even")}}}},Ca=function(){var a=P(null,"ae-noscript",void 0);ca(ea(a),function(a){ka(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,e,d){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,e,d))};s("ae.Charts.latencyHistogram",function(a,b,c){var e=new google.visualization.DataTable;e.addColumn("string","");e.addColumn("number","");for(var d=0;d<b.length;d++)e.addRow([""+a[d],b[d]]);for(d=b.length;d<a.length;d++)e.addRow([""+a[d],0]);b=Fa(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}}})});
s("ae.Charts.latencyTimestampScatter",function(a,b,c,e,d){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=e.starttime?e.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,e,d))});
s("ae.Charts.entityCountBarChart",function(a,b,c,e){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 f=50;f>b.length&&(f=b.length);for(var g=0;g<f;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*f;f=b+130;a=new google.visualization.ColumnChart(document.getElementById(e+
"-"+a));c=Ea(c);a.draw(d,{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,e){for(var d=[],f=0;f<b.length;f++)d[f]=b[f]+" milliseconds";Ha(a,b,d,c,e)});s("ae.Charts.rpcTimeBarChart",function(a,b,c,e,d){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,e,d)});})();
