"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6631],{9944:function(e,t,n){var r=n(64836);t.Z=void 0;var i=r(n(64938)),o=n(85893),a=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}),"Help");t.Z=a},64938:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(76031)},88078:function(e,t,n){n.d(t,{Z:function(){return j}});var r=n(63366),i=n(87462),o=n(67294),a=n(86010),l=n(70917),u=n(94780);function c(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function s(e){return parseFloat(e)}var d=n(41796),f=n(90948),m=n(71657),h=n(1588),p=n(34867);function v(e){return(0,p.Z)("MuiSkeleton",e)}(0,h.Z)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var g=n(85893);const y=["animation","className","component","height","style","variant","width"];let b,w,x,k,Z=e=>e;const S=(0,l.F4)(b||(b=Z`
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }

  100% {
    opacity: 1;
  }
`)),C=(0,l.F4)(w||(w=Z`
  0% {
    transform: translateX(-100%);
  }

  50% {
    /* +0.5s of delay between each loop */
    transform: translateX(100%);
  }

  100% {
    transform: translateX(100%);
  }
`)),_=(0,f.ZP)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!1!==n.animation&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})((({theme:e,ownerState:t})=>{const n=c(e.shape.borderRadius)||"px",r=s(e.shape.borderRadius);return(0,i.Z)({display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:(0,d.Fq)(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em"},"text"===t.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${r}${n}/${Math.round(r/.6*10)/10}${n}`,"&:empty:before":{content:'"\\00a0"'}},"circular"===t.variant&&{borderRadius:"50%"},"rounded"===t.variant&&{borderRadius:(e.vars||e).shape.borderRadius},t.hasChildren&&{"& > *":{visibility:"hidden"}},t.hasChildren&&!t.width&&{maxWidth:"fit-content"},t.hasChildren&&!t.height&&{height:"auto"})}),(({ownerState:e})=>"pulse"===e.animation&&(0,l.iv)(x||(x=Z`
      animation: ${0} 1.5s ease-in-out 0.5s infinite;
    `),S)),(({ownerState:e,theme:t})=>"wave"===e.animation&&(0,l.iv)(k||(k=Z`
      position: relative;
      overflow: hidden;

      /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */
      -webkit-mask-image: -webkit-radial-gradient(white, black);

      &::after {
        animation: ${0} 1.6s linear 0.5s infinite;
        background: linear-gradient(
          90deg,
          transparent,
          ${0},
          transparent
        );
        content: '';
        position: absolute;
        transform: translateX(-100%); /* Avoid flash during server-side hydration */
        bottom: 0;
        left: 0;
        right: 0;
        top: 0;
      }
    `),C,(t.vars||t).palette.action.hover)));var j=o.forwardRef((function(e,t){const n=(0,m.Z)({props:e,name:"MuiSkeleton"}),{animation:o="pulse",className:l,component:c="span",height:s,style:d,variant:f="text",width:h}=n,p=(0,r.Z)(n,y),b=(0,i.Z)({},n,{animation:o,component:c,variant:f,hasChildren:Boolean(p.children)}),w=(e=>{const{classes:t,variant:n,animation:r,hasChildren:i,width:o,height:a}=e,l={root:["root",n,r,i&&"withChildren",i&&!o&&"fitContent",i&&!a&&"heightAuto"]};return(0,u.Z)(l,v,t)})(b);return(0,g.jsx)(_,(0,i.Z)({as:c,ref:t,className:(0,a.Z)(w.root,l),ownerState:b},p,{style:(0,i.Z)({width:h,height:s},d)}))}))},76031:function(e,t,n){n.r(t),n.d(t,{capitalize:function(){return i.Z},createChainedFunction:function(){return o},createSvgIcon:function(){return a.Z},debounce:function(){return l.Z},deprecatedPropType:function(){return u},isMuiElement:function(){return c.Z},ownerDocument:function(){return s.Z},ownerWindow:function(){return d.Z},requirePropFactory:function(){return f},setRef:function(){return m},unstable_ClassNameGenerator:function(){return x},unstable_useEnhancedEffect:function(){return h.Z},unstable_useId:function(){return p.Z},unsupportedProp:function(){return v},useControlled:function(){return g.Z},useEventCallback:function(){return y.Z},useForkRef:function(){return b.Z},useIsFocusVisible:function(){return w.Z}});var r=n(37078),i=n(98216),o=n(49064).Z,a=n(88169),l=n(57144);var u=function(e,t){return()=>null},c=n(71579),s=n(8038),d=n(5340);n(87462);var f=function(e,t){return()=>null},m=n(7960).Z,h=n(58974),p=n(27909);var v=function(e,t,n,r,i){return null},g=n(49299),y=n(2068),b=n(51705),w=n(18791);const x={configure:e=>{r.Z.configure(e)}}},92779:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(85893),i=n(86886),o=n(57905),a=n(81503),l=n(27484),u=n.n(l),c=n(67294);function s(e){var t=e.oncallName,n=void 0===t?"%":t,l=e.workflowName,s=e.thresholdInSecond,d=e.classname,f=void 0===d?"%":d,m=(0,c.useState)(u()().subtract(2,"day")),h=m[0],p=(m[1],[{name:"oncall",type:"string",value:n},{name:"queryDate",type:"string",value:h},{name:"workflow_name",type:"string",value:l},{name:"thresholdInSecond",type:"int",value:s},{name:"classname",type:"string",value:f}]);return(0,r.jsx)(i.ZP,{item:!0,xs:12,height:500,children:(0,r.jsx)(o.Z,{title:"Longest Tests: ".concat(l," on ").concat(h.format("YYYY-MM-DD")),queryCollection:"commons",queryName:"individual_test_times_per_oncall_per_workflow",queryParams:p,columns:[{field:"oncall",headerName:"Oncall",flex:1,renderCell:function(e){var t=e.value;return(0,r.jsx)("a",{href:"/testing_overhead/oncall_insights?oncall=".concat(t),children:t})}},{field:"test_name",headerName:"Test Name",flex:1,filterable:!1},{field:"test_class",headerName:"Test Class",flex:1,renderCell:function(e){var t=e.row.test_file,n=e.value;return(0,r.jsx)("a",{href:"/testing_overhead/insights?testFile=".concat(t,"&testClass=").concat(n),children:n})}},{field:"test_file",headerName:"Test File",flex:1,filterable:!1},{field:"avg_time_in_seconds",headerName:"Avg Duration per Runner",flex:1,valueFormatter:function(e){return(0,a.gH)(e.value)},filterable:!1},{field:"time_per_wokflow_in_seconds",headerName:"Total Duration per Workflow",flex:1,valueFormatter:function(e){return(0,a.gH)(e.value)},filterable:!1}],dataGridProps:{getRowId:function(e){return e.oncall+e.workflow_name+e.test_file+e.test_class+e.test_name},initialState:{}}})})}},57905:function(e,t,n){n.d(t,{T:function(){return m},Z:function(){return f}});var r=n(85893),i=n(9944),o=n(15861),a=n(88078),l=n(93946),u=n(3153),c=n(8100);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=function(e){return fetch(e).then((function(e){return e.json()}))};function f(e){var t=e.title,n=e.queryCollection,i=void 0===n?"metrics":n,o=e.queryName,a=e.queryParams,l=e.columns,u=e.dataGridProps,s=e.helpLink,f=e.showFooter,h=e.useClickHouse,p=void 0!==h&&h?"/api/clickhouse/".concat(o,"?parameters=").concat(encodeURIComponent(JSON.stringify(a))):"/api/query/".concat(i,"/").concat(o,"?parameters=").concat(encodeURIComponent(JSON.stringify(a))),v=(0,c.ZP)(p,d,{refreshInterval:3e5}).data;return(0,r.jsx)(m,{title:t,data:v,columns:l,dataGridProps:u,helpLink:s,showFooter:f})}function m(e){var t=e.title,n=e.data,c=e.columns,d=e.dataGridProps,f=e.helpLink,m=e.showFooter,h=function(){window.open(f,"_blank")};return void 0===n?(0,r.jsx)(a.Z,{variant:"rectangular",height:"100%"}):(0,r.jsx)(u._,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){s(e,t,n[t])}))}return e}({},d,{density:"compact",rows:n,columns:c,hideFooter:!m,autoPageSize:m,components:{Toolbar:function(){return(0,r.jsxs)(o.Z,{fontSize:"16px",fontWeight:"700",sx:{p:1},children:[t," ",void 0!==f&&(0,r.jsx)(l.Z,{size:"small",onClick:h,children:(0,r.jsx)(i.Z,{fontSize:"inherit",color:"info"})})]})}}}))}},24120:function(e,t,n){n.d(t,{A0:function(){return b},MF:function(){return w},ZP:function(){return k},_p:function(){return x}});var r=n(85893),i=n(90629),o=n(88078),a=n(27484),l=n.n(a),u=n(70178),c=n.n(u),s=n(32578),d=n(35470),f=n(96486),m=n.n(f),h=n(8100);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){v(e,t,n[t])}))}return e}function y(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e){return'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+e+';"></span>'}function w(e,t,n,r,i,o,a){var u=!(arguments.length>7&&void 0!==arguments[7])||arguments[7],c=new Set;e.forEach((function(e){return c.add(e[o])}));for(var s,d=Array.from(c).sort(),f=[],h=t,p=0;h.isBefore(n)&&p<d.length;p++){s=h;var v=(h=l().utc(d[p])).diff(s,r);v>1.15&&(h=s.add(1,r),p--),f.push(h.toISOString())}var g=m().groupBy(e,(function(e){return""}));void 0!==i&&(g=m().groupBy(e,(function(e){return e[i]})));var y=m().map(g,(function(e,t){var n=m().keyBy(e,o),i=m().mapKeys(n,(function(e,t){return l().utc(t).toISOString()}));return{name:t,type:"line",symbol:"circle",symbolSize:4,data:f.map((function(e){var t=i[e];return void 0===t&&"minute"!==r?u?[e,0]:void 0:void 0===t?void 0:[e,t[a]]})).filter((function(e){return void 0!==e})),emphasis:{focus:"series"},smooth:!0}}));return m().sortBy(y,(function(e){return e.name}))}function x(e){var t=e.data,n=e.series,o=e.title,a=e.groupByFieldName,u=e.timeFieldDisplayFormat,c=void 0===u?"M/D h:mm:ss A":u,d=e.yAxisRenderer,f=e.yAxisLabel,h=e.additionalOptions,p=void 0!==a?200:48,v=f?65:48,y=m().merge({title:{text:o},grid:{top:v,right:p,bottom:24,left:48},dataset:{source:t},xAxis:{type:"time"},yAxis:{name:f,type:"value",axisLabel:{formatter:d}},series:n,legend:g({orient:"vertical",right:10,top:"center",type:"scroll"},void 0!==a&&{selector:[{type:"all",title:"All"},{type:"inverse",title:"Inv"}]}),tooltip:{trigger:"item",formatter:function(e){return"".concat(e.seriesName)+"<br/>".concat(l().utc(e.value[0]).local().format(c),"<br/>")+"".concat(b(e.color))+"<b>".concat(d(e.value[1]),"</b>")}}},h);return(0,r.jsx)(i.Z,{sx:{p:2,height:"100%"},elevation:3,children:(0,r.jsx)(s.Z,{style:{height:"100%",width:"100%"},option:y})})}function k(e){var t,n,i,a,u=e.title,c=e.queryCollection,s=void 0===c?"metrics":c,f=e.queryName,m=e.queryParams,p=e.granularity,v=e.groupByFieldName,b=e.timeFieldName,k=e.timeFieldDisplayFormat,Z=void 0===k?"M/D h:mm:ss A":k,S=e.yAxisFieldName,C=e.yAxisRenderer,_=e.yAxisLabel,j=e.additionalOptions,O=e.useClickHouse,F=void 0!==O&&O,N=F?"/api/clickhouse/".concat(f,"?parameters=").concat(encodeURIComponent(JSON.stringify(g({},m,{granularity:p})))):"/api/query/".concat(s,"/").concat(f,"?parameters=").concat(encodeURIComponent(JSON.stringify(y(m).concat([{name:"granularity",type:"string",value:p}])))),A=(0,h.ZP)(N,d._i,{refreshInterval:3e5}).data;if(void 0===A)return(0,r.jsx)(o.Z,{variant:"rectangular",height:"100%"});F?(t=m.startTime,n=m.stopTime):(t=null===(i=m.find((function(e){return"startTime"===e.name})))||void 0===i?void 0:i.value,n=null===(a=m.find((function(e){return"stopTime"===e.name})))||void 0===a?void 0:a.value);var P=w(A,t=l().utc(t).startOf(p),n=l().utc(n).endOf(p),p,v,b,S);return(0,r.jsx)(x,{data:A,series:P,title:u,groupByFieldName:v,yAxisRenderer:C,yAxisLabel:_,timeFieldDisplayFormat:Z,additionalOptions:j})}l().extend(c())},12327:function(e,t,n){n.d(t,{Z:function(){return c},z:function(){return u}});var r=n(85893),i=n(94054),o=n(33841),a=n(85945),l=n(23599),u={pull:"pull",trunk:"trunk",periodic:"periodic"};function c(e){var t=e.workflow,n=e.setWorkFlow;return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(o.Z,{id:"workflow-picker-input-label",children:"Workflow"}),(0,r.jsx)(a.Z,{value:t,label:"Workflow",labelId:"workflow-picker-select-label",onChange:function(e){n(e.target.value)},id:"workflow-picker-select",children:Object.keys(u).map((function(e){return(0,r.jsx)(l.Z,{value:e,children:u[e]},e)}))})]})})}}}]);