D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
usr
/
share
/
grafana
/
public
/
build
/
Filename :
testDataDSPlugin.6765cb4f18db25b60345.js
back
Copy
"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[319],{86045:(fe,H,m)=>{m.d(H,{UV:()=>$});var $=(h=>(h.Annotations="annotations",h.Arrow="arrow",h.CSVContent="csv_content",h.CSVFile="csv_file",h.CSVMetricValues="csv_metric_values",h.DataPointsOutsideRange="datapoints_outside_range",h.ExponentialHeatmapBucketData="exponential_heatmap_bucket_data",h.FlameGraph="flame_graph",h.GrafanaAPI="grafana_api",h.LinearHeatmapBucketData="linear_heatmap_bucket_data",h.Live="live",h.Logs="logs",h.ManualEntry="manual_entry",h.NoDataPoints="no_data_points",h.NodeGraph="node_graph",h.PredictableCSVWave="predictable_csv_wave",h.PredictablePulse="predictable_pulse",h.RandomWalk="random_walk",h.RandomWalkTable="random_walk_table",h.RandomWalkWithError="random_walk_with_error",h.RawFrame="raw_frame",h.ServerError500="server_error_500",h.Simulation="simulation",h.SlowQuery="slow_query",h.StreamingClient="streaming_client",h.TableStatic="table_static",h.Trace="trace",h.USA="usa",h.VariablesQuery="variables-query",h))($||{});const a={fields:[],states:[]},_={csvWave:[],points:[],scenarioId:"random_walk"}},34750:(fe,H,m)=>{m.r(H),m.d(H,{plugin:()=>xt});var $=m(68246),a=m(27702);class _ extends a.PureComponent{render(){return a.createElement("div",null)}}var h=m(25111),q=m(74639),T=m(71107),f=m(48024),W=m(28580),k=m(1128),ge=m(73453),B=m(42074),ee=m(60105);const he=[{label:"Speed (ms)",id:"speed",placeholder:"value",min:10,step:10},{label:"Spread",id:"spread",placeholder:"value",min:.5,step:.1},{label:"Noise",id:"noise",placeholder:"value",min:0,step:.1},{label:"Bands",id:"bands",placeholder:"bands",min:0,step:1}],te=[{value:"signal",label:"Signal"},{value:"logs",label:"Logs"},{value:"fetch",label:"Fetch"}],ve=({onChange:t,query:e})=>{const r=({value:o})=>{t({target:{name:"type",value:o}})},n=o=>{const{name:i,value:s}=o.target;t({target:{name:i,value:Number(s)}})};return a.createElement(T.Z,null,a.createElement(f._,{label:"Type",labelWidth:14},a.createElement(W.Ph,{width:32,onChange:r,defaultValue:te[0],options:te})),e?.stream?.type==="signal"&&he.map(({label:o,id:i,min:s,step:c,placeholder:l})=>a.createElement(f._,{label:o,labelWidth:14,key:i},a.createElement(k.I,{width:32,type:"number",id:`stream.${i}-${e.refId}`,name:i,min:s,step:c,value:e.stream?.[i],placeholder:l,onChange:n}))),e?.stream?.type==="fetch"&&a.createElement(f._,{label:"URL",labelWidth:14,grow:!0},a.createElement(k.I,{type:"text",name:"url",id:`stream.url-${e.refId}`,value:e?.stream?.url,placeholder:"Fetch URL",onChange:t})))},be=[{label:"Series count",id:"seriesCount",placeholder:"1",min:1,step:1},{label:"Start value",id:"startValue",placeholder:"auto",step:1},{label:"Min",id:"min",placeholder:"none",step:.1},{label:"Max",id:"max",placeholder:"none",step:.1},{label:"Spread",id:"spread",placeholder:"1",min:.5,step:.1},{label:"Noise",id:"noise",placeholder:"0",min:0,step:.1},{label:"Drop (%)",id:"drop",placeholder:"0",min:0,max:100,step:1,tooltip:"Exclude some percent (chance) points"}],Se=q.wl.components.DataSource.TestData.QueryTab,we=({onChange:t,query:e})=>a.createElement(T.Z,null,be.map(({label:r,id:n,min:o,step:i,placeholder:s,tooltip:c})=>{const l=Se?.[n];return a.createElement(f._,{label:r,labelWidth:14,key:n,"aria-label":l,tooltip:c},a.createElement(k.I,{width:32,name:n,type:"number",id:`randomWalk-${n}-${e.refId}`,min:o,step:i,value:e[n]||s,placeholder:s,onChange:t}))}));var ae=m(11649);const Ce=({onChange:t,query:e})=>{const r=n=>{t({...e,csvContent:n})};return a.createElement(ae.p,{height:300,language:"csv",value:e.csvContent??"",onBlur:r,onSave:r,showMiniMap:!1,showLineNumbers:!0})},Ee=({onChange:t,query:e})=>{const r=({value:o})=>{t({...e,csvFileName:o})},n=["flight_info_by_state.csv","population_by_state.csv","gdp_per_capita.csv","js_libraries.csv","ohlc_dogecoin.csv","weight_height.csv","browser_marketshare.csv"].map(o=>({label:o,value:o}));return a.createElement(T.Z,null,a.createElement(f._,{label:"File",labelWidth:14},a.createElement(W.Ph,{width:32,onChange:r,placeholder:"Select csv file",options:n,value:n.find(o=>o.value===e.csvFileName)})))};var ne=m(66670),p=m(86045);const ye={timeStep:60,onCount:3,onValue:2,offCount:3,offValue:1},U=[{timeStep:60,valuesCSV:"0,0,2,2,1,1"}],ke={scenarioId:p.UV.RandomWalk,refId:""},Ie=t=>{const{wave:e,last:r,index:n,onAdd:o,onChange:i}=t,[s,c]=(0,a.useState)(e.valuesCSV||""),[l,C]=(0,a.useState)(e.labels||""),[u,v]=(0,a.useState)(e.name||""),y=()=>{r?o():i(n,void 0)},I=(x,N)=>{i(n,{...e,[x]:N})},R=x=>{x.key==="Enter"&&I("valuesCSV",s)};return a.createElement(T.Z,null,a.createElement(f._,{label:"Values",grow:!0,tooltip:"Comma separated values. Each value may be an int, float, or null and must not be empty. Whitespace and trailing commas are removed"},a.createElement(k.I,{value:s,placeholder:"CSV values",onChange:x=>c(x.currentTarget.value),autoFocus:!0,onBlur:()=>I("valuesCSV",s),onKeyDown:R})),a.createElement(f._,{label:"Step",tooltip:"The number of seconds between datapoints."},a.createElement(k.I,{value:e.timeStep,type:"number",placeholder:"60",width:10,onChange:x=>I("timeStep",x.currentTarget.valueAsNumber)})),a.createElement(f._,{label:"Name"},a.createElement(k.I,{value:u,placeholder:"name",width:10,onChange:x=>v(x.currentTarget.value),onBlur:()=>I("name",u)})),a.createElement(f._,{label:"Labels"},a.createElement(k.I,{value:l,placeholder:"labels",width:12,onChange:x=>C(x.currentTarget.value),onBlur:()=>I("labels",l)})),a.createElement(ne.zx,{icon:r?"plus":"minus",variant:"secondary",onClick:y}))};class xe extends a.PureComponent{constructor(){super(...arguments),this.onChange=(e,r)=>{let n=[...this.props.waves??U];r?n[e]={...r}:n.splice(e,1),this.props.onChange(n)},this.onAdd=()=>{const e=[...this.props.waves??U];e.push({...U[0]}),this.props.onChange(e)}}render(){let e=this.props.waves??U;return e.length||(e=U),a.createElement(a.Fragment,null,e.map((r,n)=>a.createElement(Ie,{key:`${n}/${r.valuesCSV}`,wave:r,index:n,onAdd:this.onAdd,onChange:this.onChange,last:n===e.length-1})))}}const Te=[{label:"Server panic",value:"server_panic"},{label:"Frontend exception",value:"frontend_exception"},{label:"Frontend observable",value:"frontend_observable"}],Fe=({query:t,onChange:e})=>a.createElement(T.Z,null,a.createElement(f._,{labelWidth:14,label:"Error type"},a.createElement(W.Ph,{options:Te,value:t.errorType,onChange:r=>{e({...t,errorType:r.value})}}))),re=[{label:"random-2s-stream",value:"random-2s-stream",description:"Random stream with points every 2s"},{label:"random-flakey-stream",value:"random-flakey-stream",description:"Stream that returns data in random intervals"},{label:"random-labeled-stream",value:"random-labeled-stream",description:"Value with moving labels"},{label:"random-20Hz-stream",value:"random-20Hz-stream",description:"Random stream with points in 20Hz"}],We=({onChange:t,query:e})=>{const r=({value:n})=>{t({...e,channel:n})};return a.createElement(T.Z,null,a.createElement(f._,{label:"Channel",labelWidth:14},a.createElement(W.Ph,{width:32,onChange:r,placeholder:"Select channel",options:re,value:re.find(n=>n.value===e.channel)})))};function Ve({query:t,onChange:e}){const r=t.nodes?.type||"random";return a.createElement(T.Z,null,a.createElement(f._,{label:"Data type",labelWidth:14},a.createElement(W.Ph,{options:oe.map(n=>({label:n,value:n})),value:oe.find(n=>n===r),onChange:n=>e({...t.nodes,type:n.value}),width:32})),(r==="random"||r==="random edges")&&a.createElement(f._,{label:"Count",labelWidth:14},a.createElement(k.I,{type:"number",name:"count",value:t.nodes?.count,width:32,onChange:n=>e({...t.nodes,count:n.currentTarget.value?parseInt(n.currentTarget.value,10):0}),placeholder:"10"})))}const oe=["random","response","random edges"],Pe=[{label:"Step",id:"timeStep",placeholder:"60",tooltip:"The number of seconds between datapoints."},{label:"On Count",id:"onCount",placeholder:"3",tooltip:"The number of values within a cycle, at the start of the cycle, that should have the onValue."},{label:"Off Count",id:"offCount",placeholder:"6",tooltip:"The number of offValues within the cycle."},{label:"On Value",id:"onValue",placeholder:"1",tooltip:'The value for "on values", may be an int, float, or null.'},{label:"Off Value",id:"offValue",placeholder:"1",tooltip:'The value for "off values", may be a int, float, or null.'}],Re=({onChange:t,query:e})=>{const r=n=>{const{name:o,value:i}=n.target;t({target:{name:o,value:Number(i)}})};return a.createElement(T.Z,null,Pe.map(({label:n,id:o,placeholder:i,tooltip:s})=>a.createElement(f._,{label:n,labelWidth:14,key:o,tooltip:s},a.createElement(k.I,{width:32,type:"number",name:o,id:`pulseWave.${o}-${e.refId}`,value:e.pulseWave?.[o],placeholder:i,onChange:r}))))};var O=m(89949),Z=m(32053),Ne=m(66784),Me=m(35306),se=m(63439);const Ae=({onChange:t,query:e})=>{const[r,n]=(0,a.useState)(),[o,i]=(0,a.useState)(),s=c=>{try{const l=JSON.parse(c);if((0,O.isArray)(l)){n(void 0),i(void 0),t({...e,rawFrameContent:c});return}let C;if((0,O.isArray)(l.series)&&l.state)C=l.series.map(u=>(0,Z.og)((0,Z.g0)(u)));else{const u=(0,Me.z1)({data:l});u.data?.length&&!u.error&&(C=u.data.map(v=>(0,Ne.Y)(v)))}if(C){console.log("Original",l),console.log("Save",C),n(void 0),i("Converted to direct frame result"),t({...e,rawFrameContent:JSON.stringify(C,null,2)});return}n("Unable to read dataframes in text")}catch(l){console.log("Error parsing json",l),n("Enter JSON array of data frames (or raw query results body)"),i(void 0)}};return a.createElement(a.Fragment,null,r&&a.createElement(se.b,{title:r,severity:"error"}),o&&a.createElement(se.b,{title:o,severity:"warning"}),a.createElement(ae.p,{height:300,language:"json",value:e.rawFrameContent??"[]",onBlur:s,onSave:s,showMiniMap:!0,showLineNumbers:!0}))};var Ue=m(79978),Le=m(42844),Be=m(66310),ze=m(5229);const De=(t,e,r)=>{switch(t.type){case"number":return a.createElement(k.I,{type:"number",defaultValue:r?.[t.name],onChange:n=>{const o=n.currentTarget.valueAsNumber;e({...r,[t.name]:o})}});case"boolean":return a.createElement(B.x,{value:r?.[t.name]??!0,onChange:()=>{e({...r,[t.name]:!r[t.name]})}});default:return a.createElement(k.I,{type:"string",value:r?.[t.name],onChange:n=>{const o=n.target.value;e({...r,[t.name]:o})}})}},He=t=>({jsonView:(0,Le.css)` margin-bottom: ${t.spacing(1)}; `}),$e=({config:t,schema:e,onChange:r})=>{const[n,o]=(0,a.useState)(!1),i=(0,Be.wW)(He),s=c=>{const l=c.currentTarget;r(JSON.parse(l.value))};return a.createElement(ze.C,{label:"Config"},a.createElement(B.x,{className:i.jsonView,label:"JSON View",showLabel:!0,value:n,onChange:()=>o(!n)}),n?a.createElement(ee.K,{defaultValue:JSON.stringify(t,null,2),rows:7,onChange:s}):a.createElement(a.Fragment,null,e.fields.map(c=>a.createElement(f._,{label:c.name,key:c.name,labelWidth:14},De(c,r,t)))))},Ge=({onChange:t,query:e,ds:r})=>{const n=e.sim??{},o=n.key??{},[i,s]=(0,a.useState)({}),c=(0,h.Z)(async()=>{const S=await r.getResource("sims");return{sims:S,options:S.map(w=>({label:w.name,value:w.type,description:w.description}))}},[r]),l=(0,a.useMemo)(()=>{const S=o.type;return!S||!c.value?{}:{details:c.value.sims.find(w=>w.type===S),option:c.value.options.find(w=>w.value===S)}},[c.value,o?.type]);let C=(0,h.Z)(async()=>{let S=o.type+"/"+o.tick+"hz";o.uid&&(S+="/"+o.uid);let w=(await r.getResource("sim/"+S))?.config;return s(w.value),w},[o.type,o.tick,o.uid]);const u=S=>{t({...e,sim:{...n,key:S}})},v=S=>{const{value:w}=S.currentTarget;u({...o,uid:w??void 0})},y=S=>{const w=S.currentTarget.valueAsNumber;u({...o,tick:w})},I=S=>{u({...o,type:S.value})},R=()=>{t({...e,sim:{...n,stream:!n.stream}})},x=()=>{t({...e,sim:{...n,last:!n.last}})},N=S=>{let w=o.type+"/"+o.tick+"hz";o.uid&&(w+="/"+o.uid),r.postResource("sim/"+w,S).then(M=>{s(M.config)})};return a.createElement(a.Fragment,null,a.createElement(T.Z,null,a.createElement(f._,{labelWidth:14,label:"Simulation",tooltip:""},a.createElement(W.Ph,{isLoading:c.loading,options:c.value?.options??[],value:l.option,onChange:I,width:32}))),a.createElement(T.Z,null,a.createElement(f._,{labelWidth:14,label:"Stream",tooltip:"connect to the live channel"},a.createElement(B.x,{value:!!n.stream,onChange:R})),a.createElement(f._,{label:"Interval",tooltip:"the rate a simulation will spit out events"},a.createElement(k.I,{width:10,type:"number",value:o.tick,onChange:y,min:1/10,max:50,suffix:"hz"})),a.createElement(f._,{label:"Last",tooltip:"Only return the last value"},a.createElement(Ue._,null,a.createElement(B.x,{value:!!n.last,onChange:x}))),a.createElement(f._,{label:"UID",tooltip:"A UID will allow multiple simulations to run at the same time"},a.createElement(k.I,{type:"text",placeholder:"optional",value:n.key.uid,onChange:v}))),a.createElement($e,{onChange:N,config:i??C.value,schema:l.details?.config.schema??{fields:[]}}))};function Oe({query:t,onChange:e}){return a.createElement(a.Fragment,null,a.createElement(T.Z,null,a.createElement(f._,{labelWidth:14,label:"Mode"},a.createElement(W.Ph,{options:j,onChange:r=>{e({...t,mode:r.value})},width:32,value:j.find(r=>r.value===t.mode)})),a.createElement(f._,{label:"Period"},a.createElement(k.I,{value:t.period,placeholder:"30m",onChange:r=>{e({...t,period:r.currentTarget.value})}}))),a.createElement(T.Z,null,a.createElement(f._,{labelWidth:14,label:"Fields"},a.createElement(W.NU,{options:Ze,onChange:r=>{e({...t,fields:r.map(n=>n.value)})},width:32,placeholder:"all",value:t.fields})),a.createElement(f._,{label:"States",grow:!0},a.createElement(W.NU,{options:je,onChange:r=>{e({...t,states:r.map(n=>n.value)})},placeholder:"all",value:t.states}))))}const j=["values-as-rows","values-as-fields","values-as-labeled-fields","timeseries","timeseries-wide"].map(t=>({label:t,value:t})),Ze=["foo","bar","baz"].map(t=>({label:t,value:t})),je=["AL","AK","AZ","AR","CA","CO","CT","DE","DC","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","MD","MA","MI","MN","MS","MO","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY"].map(t=>({label:t,value:t}));var Q=m(48592),g=m(29241),Qe=m(47838),z=m(53933),J=m(52141),Je=m(92827);let K=0;function Ft(){const t=Math.random();return t>.9?LogLevel.critical:t>.8?LogLevel.error:t>.7?LogLevel.warning:t>.4?LogLevel.info:t>.3?LogLevel.debug:t>.1?LogLevel.trace:LogLevel.unknown}function ie(){return K=(K+Math.floor(Math.random()*5))%le.length,le[K]}function Ke(t=60){let e=ie();for(;e.length<t;)e+=" "+ie();return e}const le=["At","vero","eos","et","accusamus","et","iusto","odio","dignissimos","ducimus","qui","blanditiis","praesentium","voluptatum","deleniti","atque","corrupti","quos","dolores","et","quas","molestias","excepturi","sint","occaecati","cupiditate","non","provident","similique","sunt","in","culpa","qui","officia","deserunt","mollitia","animi","id","est","laborum","et","dolorum","fuga","Et","harum","quidem","rerum","facilis","est","et","expedita","distinctio","Nam","libero","tempore","cum","soluta","nobis","est","eligendi","optio","cumque","nihil","impedit","quo","minus","id","quod","maxime","placeat","facere","possimus","omnis","voluptas","assumenda","est","omnis","dolor","repellendus","Temporibus","autem","quibusdam","et","aut","officiis","debitis","aut","rerum","necessitatibus","saepe","eveniet","ut","et","voluptates","repudiandae","sint","et","molestiae","non","recusandae","Itaque","earum","rerum","hic","tenetur","a","sapiente","delectus","ut","aut","reiciendis","voluptatibus","maiores","alias","consequatur","aut","perferendis","doloribus","asperiores","repellat"],ce={type:"signal",speed:250,spread:3.5,noise:2.2,bands:1};function Ye(t,e){const r=(0,O.defaults)(t.stream,ce);if(r.type==="signal")return Xe(t,r,e);if(r.type==="logs")return _e(t,r,e);if(r.type==="fetch")return qe(t,r,e);throw new Error(`Unknown Stream Type: ${r.type}`)}function Xe(t,e,r){return new Q.y(n=>{const o=`signal-${r.panelId}-${t.refId}`,i=r.maxDataPoints||1e3,s={refId:t.refId,fields:[{name:"time",type:g.fS.time},{name:t.alias??"value",type:g.fS.number}]},{spread:c,speed:l,bands:C=0,noise:u}=e;for(let S=0;S<C;S++){const w=C>1?` ${S+1}`:"";s.fields.push({name:"Min"+w,type:g.fS.number}),s.fields.push({name:"Max"+w,type:g.fS.number})}const v=Qe.Av.fromDataFrameJSON({schema:s},{maxLength:i});let y=Math.random()*100,I,R=-1;const x=S=>{y+=(Math.random()-.5)*c;const w={values:[[S],[y]]};let M=y,d=y;for(let E=0;E<C;E++)M=M-Math.random()*u,d=d+Math.random()*u,w.values.push([M]),w.values.push([d]);const F={data:w};return v.push(F)};{let S=Date.now()-i*l;for(let w=0;w<i;w++)x(S),S+=l}const N=()=>{R=Date.now(),x(R),n.next({data:[v],key:o,state:z.Gu.Streaming}),I=setTimeout(N,l)};return setTimeout(N,5),()=>{console.log("unsubscribing to stream "+o),clearTimeout(I)}})}function _e(t,e,r){return new Q.y(n=>{const o=`logs-${r.panelId}-${t.refId}`,i=r.maxDataPoints||1e3,s=new J.a({append:"tail",capacity:i});s.refId=t.refId,s.name=t.alias||"Logs "+t.refId,s.addField({name:"line",type:g.fS.string}),s.addField({name:"time",type:g.fS.time}),s.meta={preferredVisualisationType:"logs"};const{speed:c}=e;let l;const C=()=>{s.fields[0].values.push(Ke()),s.fields[1].values.push(Date.now()),n.next({data:[s],key:o}),l=setTimeout(C,c)};return setTimeout(C,5),()=>{console.log("unsubscribing to stream "+o),clearTimeout(l)}})}function qe(t,e,r){return new Q.y(n=>{const o=`fetch-${r.panelId}-${t.refId}`,i=r.maxDataPoints||1e3;let s=new J.a({append:"tail",capacity:i});s.refId=t.refId,s.name=t.alias||"Fetch "+t.refId;let c;const l=new Je.QM({callback:{onHeader:u=>{s.fields.length&&(s=new J.a({append:"tail",capacity:i}),s.refId=t.refId,s.name="Fetch "+t.refId);for(const v of u)s.addField(v)},onRow:u=>{s.add(u)}}}),C=u=>{if(u.value){const v=new TextDecoder().decode(u.value);l.readCSV(v)}if(n.next({data:[s],key:o,state:u.done?z.Gu.Done:z.Gu.Streaming}),u.done){console.log("Finished stream"),n.complete();return}return c.read().then(C)};if(!e.url)throw new Error("query.url is not defined");return fetch(new Request(e.url)).then(u=>{u.body&&(c=u.body.getReader(),c.read().then(C))}),()=>{console.log("unsubscribing to stream "+o)}})}const ue=[{value:"datasources",label:"Data Sources"},{value:"search",label:"Search"},{value:"annotations",label:"Annotations"}],et=q.wl.components.DataSource.TestData.QueryTab,tt=({query:t,datasource:e,onChange:r,onRunQuery:n})=>{t={...ke,...t};const{loading:o,value:i}=(0,h.Z)(async()=>{if(t.scenarioId===p.UV.ManualEntry&&t.points){let E=`Time,Value `;for(const V of t.points)E+=`${V[1]},${V[0]} `;r({refId:t.refId,datasource:t.datasource,scenarioId:p.UV.CSVContent,csvContent:E})}const d=await e.getScenarios(),F=[p.UV.Simulation,p.UV.Annotations];return d.map(E=>({...E,hideAliasField:F.includes(E.id)}))},[]),s=d=>{r(d),n()},c=(0,a.useMemo)(()=>i?.find(d=>d.id===t.scenarioId),[i,t]),l=c?.id,C=c?.description,u=d=>{const F=i?.find(V=>V.id===d.value);if(!F)return;const E={scenarioId:d.value,refId:t.refId,alias:t.alias,datasource:t.datasource};switch(F.stringInput&&(E.stringInput=F.stringInput),F.id){case p.UV.GrafanaAPI:E.stringInput="datasources";break;case p.UV.StreamingClient:E.stream=ce;break;case p.UV.Live:E.channel="random-2s-stream";break;case p.UV.Simulation:E.sim={key:{type:"flight",tick:10}};break;case p.UV.PredictablePulse:E.pulseWave=ye;break;case p.UV.PredictableCSVWave:E.csvWave=U;break;case p.UV.Annotations:E.lines=10;break;case p.UV.USA:E.usa={mode:j[0].value}}s(E)},v=d=>{const{name:F,value:E,type:V}=d.currentTarget;let D=E;V==="number"&&(D=Number(E)),F==="levelColumn"&&d.currentTarget instanceof HTMLInputElement&&(D=d.currentTarget.checked),s({...t,[F]:D})},y=d=>F=>{const{name:E,value:V,type:D}=F.target;let pe=V;D==="number"&&(pe=Number(V)),s({...t,[d]:{...t[d],[E]:pe}})},I=({value:d})=>{s({...t,stringInput:d})},R=y("stream"),x=y("pulseWave"),N=d=>{s({...t,usa:d})},S=d=>{s({...t,csvWave:d})},w=(0,a.useMemo)(()=>(i||[]).map(d=>({label:d.name,value:d.id})).sort((d,F)=>d.label.localeCompare(F.label)),[i]),M=(0,a.useMemo)(()=>{const d=t.scenarioId??"";return{labels:["random_walk","predictable_pulse"].includes(d),dropPercent:["csv_content","csv_file"].includes(d)}},[t?.scenarioId]);return o?null:a.createElement(a.Fragment,null,a.createElement(T.Z,{"aria-label":et.scenarioSelectContainer},a.createElement(f._,{labelWidth:14,label:"Scenario"},a.createElement(W.Ph,{inputId:`test-data-scenario-select-${t.refId}`,options:w,value:w.find(d=>d.value===t.scenarioId),onChange:u,width:32})),c?.stringInput&&a.createElement(f._,{label:"String Input"},a.createElement(k.I,{width:32,id:`stringInput-${t.refId}`,name:"stringInput",placeholder:t.stringInput,value:t.stringInput,onChange:v})),!c?.hideAliasField&&a.createElement(f._,{label:"Alias",labelWidth:14},a.createElement(k.I,{width:32,id:`alias-${t.refId}`,type:"text",placeholder:"optional",pattern:'[^<>&\\\\"]+',name:"alias",value:t.alias,onChange:v})),M.dropPercent&&a.createElement(f._,{label:"Drop",tooltip:"Drop a random set of points"},a.createElement(k.I,{type:"number",min:0,max:100,step:5,width:8,onChange:v,name:"dropPercent",placeholder:"0",value:t.dropPercent,suffix:a.createElement(ge.J,{name:"percentage"})})),M.labels&&a.createElement(f._,{label:"Labels",labelWidth:14,tooltip:a.createElement(a.Fragment,null,"Set labels using a key=value syntax:",a.createElement("br",null),'{ key = "value", key2 = "value" }',a.createElement("br",null),'key="value", key2="value"',a.createElement("br",null),"key=value, key2=value",a.createElement("br",null),"Value can contain templates:",a.createElement("br",null),"$seriesIndex - replaced with index of the series")},a.createElement(k.I,{width:32,id:`labels-${t.refId}`,name:"labels",onChange:v,value:t?.labels,placeholder:"key=value, key2=value2"}))),l===p.UV.RandomWalk&&a.createElement(we,{onChange:v,query:t,ds:e}),l===p.UV.StreamingClient&&a.createElement(ve,{onChange:R,query:t,ds:e}),l===p.UV.Live&&a.createElement(We,{onChange:s,query:t,ds:e}),l===p.UV.Simulation&&a.createElement(Ge,{onChange:s,query:t,ds:e}),l===p.UV.RawFrame&&a.createElement(Ae,{onChange:s,query:t,ds:e}),l===p.UV.CSVFile&&a.createElement(Ee,{onChange:s,query:t,ds:e}),l===p.UV.CSVContent&&a.createElement(Ce,{onChange:s,query:t,ds:e}),l===p.UV.Logs&&a.createElement(T.Z,null,a.createElement(f._,{label:"Lines",labelWidth:14},a.createElement(k.I,{type:"number",name:"lines",value:t.lines,width:32,onChange:v,placeholder:"10"})),a.createElement(f._,{label:"Level",labelWidth:14},a.createElement(B.x,{onChange:v,name:"levelColumn",value:!!t.levelColumn}))),l===p.UV.Annotations&&a.createElement(T.Z,null,a.createElement(f._,{label:"Count",labelWidth:14},a.createElement(k.I,{type:"number",name:"lines",value:t.lines,width:32,onChange:v,placeholder:"10"}))),l===p.UV.USA&&a.createElement(Oe,{onChange:N,query:t.usa??{}}),l===p.UV.GrafanaAPI&&a.createElement(f._,{labelWidth:14,label:"Endpoint"},a.createElement(W.Ph,{options:ue,onChange:I,width:32,value:ue.find(d=>d.value===t.stringInput)})),l===p.UV.Arrow&&a.createElement(f._,{grow:!0},a.createElement(ee.K,{name:"stringInput",value:t.stringInput,rows:10,placeholder:"Copy base64 text data from query result",onChange:v})),l===p.UV.PredictablePulse&&a.createElement(Re,{onChange:x,query:t,ds:e}),l===p.UV.PredictableCSVWave&&a.createElement(xe,{onChange:S,waves:t.csvWave}),l===p.UV.NodeGraph&&a.createElement(Ve,{onChange:d=>r({...t,nodes:d}),query:t}),l===p.UV.ServerError500&&a.createElement(Fe,{onChange:s,query:t,ds:e}),l===p.UV.Trace&&a.createElement(f._,{labelWidth:14,label:"Span count"},a.createElement(k.I,{type:"number",name:"spanCount",value:t.spanCount,width:32,onChange:v,placeholder:"10"})),C&&a.createElement("p",null,C))};class at extends a.PureComponent{constructor(e){super(e)}render(){return a.createElement("div",null,"See github for more information about setting up a reproducible test environment.",a.createElement("br",null),a.createElement("br",null),a.createElement(ne.Qj,{variant:"secondary",href:"https://github.com/grafana/grafana/tree/main/devenv",target:"_blank",rel:"noopener noreferrer"},"GitHub"),a.createElement("br",null))}}var P=m(45383),nt=m(6857),rt=m(91826),ot=m(91053),A=m(19385),Y=m(46580),st=m(69376),it=m(83505),G=m(72164),lt=m(81087),ct=m(42751),ut=m(39317),mt=m(73289),dt=m(43685);function me(t,e){const r=["A","B","C","D","E","F","G","H"],n=[];if(e>5)return[];for(const o of r){const i=`${t}${o}`;n.push({name:i,children:me(i,e+1)})}return n}function X(t,e,r){if(r>=e.length||e[r]==="*")return t;const n=e[r];let o=[],i=[n];n.startsWith("{")&&(i=n.replace(/\{|\}/g,"").split(","));for(const s of t)for(const c of i)if(c.indexOf("*")!==-1){const l=c.replace("*","");new RegExp(`^${l}.*`,"gi").test(s.name)&&(o=o.concat(X([s],e,r+1)))}else s.name===c&&(o=o.concat(X(s.children,e,r+1)));return o}function pt(t){if(t.indexOf("value")===0)return[{name:t,children:[]}];const e=me("",0);return X(e,t.split("."),0)}var b=m(12503),L=m(93666);const ft={fields:[{name:b.z.id,type:g.fS.string,config:{links:[{title:"Traces/All",url:"",internal:{query:{queryType:"getTraceSummaries",query:'service(id(name: "${__data.fields.name}", type: "${__data.fields.type}"))'},datasourceUid:"Ax4erxHGz",datasourceName:"Trace data source"}},{title:"Traces/OK",url:"",internal:{query:{queryType:"getTraceSummaries",query:'service(id(name: "${__data.fields.name}", type: "${__data.fields.type}")) { ok = true }'},datasourceUid:"Ax4erxHGz",datasourceName:"Trace data source"}},{title:"Traces/Errors",url:"",internal:{query:{queryType:"getTraceSummaries",query:'service(id(name: "${__data.fields.name}", type: "${__data.fields.type}")) { error = true }'},datasourceUid:"Ax4erxHGz",datasourceName:"Trace data source"}},{title:"Traces/Faults",url:"",internal:{query:{queryType:"getTraceSummaries",query:'service(id(name: "${__data.fields.name}", type: "${__data.fields.type}")) { fault = true }'},datasourceUid:"Ax4erxHGz",datasourceName:"Trace data source"}}]},values:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]},{name:b.z.title,type:g.fS.string,config:{displayName:"Name"},values:["auth","products","customers","orders","products","orders","api","shipping","orders","execute-api","shipping","www","api","www","products"]},{name:b.z.subTitle,type:g.fS.string,config:{displayName:"Type"},values:["Compute","SQL","SQL","SQL","remote","Function","Compute","Function","Function","remote","Function","Compute","client","client","Compute"]},{name:b.z.mainStat,type:g.fS.number,config:{unit:"ms/t",displayName:"Average response time"},values:[3.5394042646735553,15.906441318223264,4.913011921591567,7.4163203042094095,1092,22.85961441405067,56.135855729084696,4.45946191601527,12.818300278280843,4.25,12.565442646791492,77.63447512700567,40.387096774193544,77.63447512700567,27.648950187374872]},{name:b.z.secondaryStat,type:g.fS.number,config:{unit:"t/min",displayName:"Transactions per minute"},values:[50.56317154501667,682.4,512.8416666666667,125.64444444444445,.005585812037424941,137.59722222222223,300.0527777777778,30.582348853370394,125.77222222222223,.028706417080318163,30.582348853370394,165.675,.100021510002151,165.675,162.33055555555555]},{name:b.z.arc+"success",type:g.fS.number,config:{color:{mode:L.S.Fixed,fixedColor:"green"},displayName:"Sucesss"},values:[.9338865684765882,1,1,1,.5,1,.9901128505170387,.9069260134520997,1,0,.9069260134520997,.9624432037288534,0,.9624432037288534,.9824945669843769]},{name:b.z.arc+"faults",type:g.fS.number,config:{color:{mode:L.S.Fixed,fixedColor:"red"},displayName:"Faults"},values:[0,0,0,0,.5,0,.009479813736472288,0,0,0,0,.017168821152524185,0,.017168821152524185,.01750543301562313]},{name:b.z.arc+"errors",type:g.fS.number,config:{color:{mode:L.S.Fixed,fixedColor:"semi-dark-yellow"},displayName:"Errors"},values:[.06611343152341174,0,0,0,0,0,.0004073357464890436,.09307398654790038,0,1,.09307398654790038,.02038797511862247,1,.02038797511862247,0]},{name:b.z.arc+"throttled",type:g.fS.number,config:{color:{mode:L.S.Fixed,fixedColor:"purple"},displayName:"Throttled"},values:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}],meta:{preferredVisualisationType:"nodeGraph"},name:"nodes"},gt={fields:[{name:b.z.id,type:g.fS.string,config:{links:[{title:"Traces/All",url:"",internal:{query:{queryType:"getTraceSummaries",query:'edge("${__data.fields.sourceName}", "${__data.fields.targetName}")'},datasourceUid:"Ax4erxHGz",datasourceName:"Trace data source"}},{title:"Traces/OK",url:"",internal:{query:{queryType:"getTraceSummaries",query:'edge("${__data.fields.sourceName}", "${__data.fields.targetName}") { ok = true }'},datasourceUid:"Ax4erxHGz",datasourceName:"Trace data source"}},{title:"Traces/Errors",url:"",internal:{query:{queryType:"getTraceSummaries",query:'edge("${__data.fields.sourceName}", "${__data.fields.targetName}") { error = true }'},datasourceUid:"Ax4erxHGz",datasourceName:"Trace data source"}},{title:"Traces/Faults",url:"",internal:{query:{queryType:"getTraceSummaries",query:'edge("${__data.fields.sourceName}", "${__data.fields.targetName}") { fault = true }'},datasourceUid:"Ax4erxHGz",datasourceName:"Trace data source"}}]},values:["0__2","5__8","6__0","6__5","6__9","6__2","6__14","6__4","8__3","10__7","11__0","11__6","12__6","13__11","14__1","14__2","14__10"]},{name:b.z.source,type:g.fS.string,config:{},values:[0,5,6,6,6,6,6,6,8,10,11,11,12,13,14,14,14]},{name:"sourceName",type:g.fS.string,config:{},values:["auth","orders","api","api","api","api","api","api","orders","shipping","www","www","api","www","products","products","products"]},{name:b.z.target,type:g.fS.string,config:{},values:[2,8,0,5,9,2,14,4,3,7,0,6,6,11,1,2,10]},{name:"targetName",type:g.fS.string,config:{},values:["customers","orders","auth","orders","execute-api","customers","products","products","orders","shipping","auth","api","api","www","products","customers","shipping"]},{name:b.z.mainStat,type:g.fS.string,config:{displayName:"Response percentage"},values:["Success 100.00%","Success 100.00%","Success 100.00%","Success 100.00%","Errors 100.00%","Success 100.00%","Faults 1.75%","Faults 50.00%","Success 100.00%","Errors 9.31%","Errors 6.62%","Faults 1.13%","Errors 100.00%","Faults 1.72%","Success 100.00%","Success 100.00%","Faults 9.30%"]},{name:b.z.secondaryStat,type:g.fS.number,config:{unit:"t/min",displayName:"Transactions per minute"},values:[50.56317154501667,125.77222222222223,.03333333333333333,137.59722222222223,.022222222222222223,299.96666666666664,162.33055555555555,.005555555555555556,125.64444444444445,30.582348853370394,50.51111111111111,299.9166666666667,.100021510002151,165.675,682.4,162.33055555555555,30.558333333333334]}],meta:{preferredVisualisationType:"nodeGraph"},name:"edges"};function de(t=10){const e=[],r={id:"root",title:"root",subTitle:"client",success:1,error:0,stat1:Math.random(),stat2:Math.random(),edges:[]};e.push(r);const n=[r],o=3;for(let u=1;u<t;u++){const v=ht(u);e.push(v);const y=Math.floor(Math.random()*Math.floor(n.length-1)),I=n[y];I.edges.push(v.id),I.edges.length>=o&&n.splice(y,1),n.push(v)}const i=Math.floor(t/2);for(let u=0;u<=i;u++){const v=Math.floor(Math.random()*Math.floor(e.length-1)),y=Math.floor(Math.random()*Math.floor(e.length-1));v===y||e[v].id==="0"||e[y].id==="0"||e[v].edges.push(e[y].id)}const s={[b.z.id]:{values:[],type:g.fS.string,config:{links:[{title:"test data link",url:"",internal:{query:{scenarioId:"logs",alias:"from service graph",stringInput:"tes"},datasourceUid:"gdev-testdata",datasourceName:"gdev-testdata"}}]}},[b.z.title]:{values:[],type:g.fS.string},[b.z.subTitle]:{values:[],type:g.fS.string},[b.z.mainStat]:{values:[],type:g.fS.number,config:{displayName:"Transactions per second"}},[b.z.secondaryStat]:{values:[],type:g.fS.number,config:{displayName:"Average duration"}},[b.z.arc+"success"]:{values:[],type:g.fS.number,config:{color:{fixedColor:"green",mode:L.S.Fixed},displayName:"Success"}},[b.z.arc+"errors"]:{values:[],type:g.fS.number,config:{color:{fixedColor:"red",mode:L.S.Fixed},displayName:"Errors"}},[b.z.icon]:{values:[],type:g.fS.string}},c=new G.v({name:"nodes",fields:Object.keys(s).map(u=>({...s[u],name:u})),meta:{preferredVisualisationType:"nodeGraph"}}),l={name:"edges",fields:[{name:b.z.id,values:[],type:g.fS.string,config:{}},{name:b.z.source,values:[],type:g.fS.string,config:{}},{name:b.z.target,values:[],type:g.fS.string,config:{}},{name:b.z.mainStat,values:[],type:g.fS.number,config:{}}],meta:{preferredVisualisationType:"nodeGraph"},length:0},C=new Set;for(const u of e){s.id.values.push(u.id),s.title.values.push(u.title),s[b.z.subTitle].values.push(u.subTitle),s[b.z.mainStat].values.push(u.stat1),s[b.z.secondaryStat].values.push(u.stat2),s.arc__success.values.push(u.success),s.arc__errors.values.push(u.error);const v=Math.random();s[b.z.icon].values.push(v>.9?"database":v<.1?"cloud":"");for(const y of u.edges){const I=`${u.id}--${y}`;C.has(I)||(C.add(I),l.fields[0].values.push(`${u.id}--${y}`),l.fields[1].values.push(u.id),l.fields[2].values.push(y),l.fields[3].values.push(Math.random()*100))}}return l.length=l.fields[0].values.length,[c,l]}function ht(t){const e=Math.random(),r=1-e;return{id:`service:${t}`,title:`service:${t}`,subTitle:"service",success:e,error:r,stat1:Math.random(),stat2:Math.random(),edges:[]}}function vt(){return[new G.v(ft),new G.v(gt)]}function bt(t=10){return de(t)[1]}const St={name:"response",meta:{preferredVisualisationType:"flamegraph"},fields:[{name:"level",values:[0,1,2,3,4,5,6,7,8,9,10,11,12,11,12,13,14,15,16,10,11,12,13,9,10,9,9,7,7,6,5,6,7,8,8,9,10,11,12,13,8,9,10,6,7,8,9,10,11,12,13,14,15,4,5,6,7,8,9,9,10,11,12,11,12,13,8,8,7,8,8,7,6,7,8,9,9,10,11,12,13,14,15,16,17,18,9,8,8,7,8,6,7,8,8,7,6,7,8,8,8,9,10,11,12,4,5,6,7,8,9,9,10,11,9,10,7,4,5,6,7,8,8,7,8,9,10,11,12,13,10,10,11,9,10,10,11,12,13,14,15,16,17,8,9,5,6,7,6,7,6,5,6,6,6,6,5,6,7,6,5,6,7,8,4,5,6,5,6,5,4,5,5,3,4,5,6,7,7,8,7,8,9,8,9,8,7,8,9,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,24,24,25,26,24,25,22,23,23,24,25,26,27,28,29,30,31,32,21,22,23,24,25,26,27,26,24,25,26,25,24,24,25,26,27,28,29,30,31,32,33,34,35,25,26,27,25,26,24,23,24,24,25,23,23,22,23,24,24,23,24,25,26,24,25,23,24,24,25,23,23,24,24,23,23,23,23,23,24,25,22,23,24,25,22,23,24,25,26,27,28,25,26,27,28,29,24,22,23,24,25,26,27,28,29,30,31,32,33,21,22,23,23,24,24,24,22,23,24,25,24,23,24,24,23,22,23,24,25,25,26,27,24,22,23,24,25,26,27,28,29,30,31,32,24,21,22,23,24,25,26,27,28,21,22,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,24,25,26,27,28,23,24,25,26,27,28,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,31,30,28,29,30,31,32,33,34,35,36,37,29,30,31,26,27,28,28,28,29,27,26,27,26,25,26,27,28,29,30,31,32,32,33,34,30,31,32,33,34,33,34,35,36,37,38,39,29,30,31,32,32,27,28,28,27,28,29,30,31,32,33,34,35,36,37,38,39,40,27,28,27,28,29,30,31,32,33,34,35,36,28,27,28,28,29,27,27,28,27,27,26,27,28,28,29,29,29,26,27,27,28,29,30,29,30,30,29,30,31,28,29,30,28,28,28,28,29,30,29,30,27,28,28,26,27,26,27,27,28,29,26,27,28,29,28,27,28,29,30,30,28,29,30,31,32,32,27,28,26,25,25,26,27,28,29,30,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,31,30,31,32,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,29,26,27,28,29,30,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,31,30,29,29,29,25,26,27,28,26,26,27,28,27,28,28,26,27,28,28,27,28,25,26,27,28,29,30,31,32,33,34,25,25,26,27,28,25,26,24,25,22,23,24,25,26,27,28,29,30,31,32,33,33,34,34,32,33,34,34,32,28,29,30,31,27,28,29,26,27,28,29,30,31,32,33,34,26,27,28,29,24,25,26,27,28,29,30,27,28,26,27,25,26,27,28,29,26,25,26,27,26,27,27,28,29,30,31,32,33,34,35,36,37,38,38,39,30,31,32,26,27,28,27,28,29,25,26,27,28,29,30,31,32,28,29,28,29,28,29,27,28,29,30,31,29,30,31,32,33,34,35,27,28,29,30,31,32,33,34,35,36,37,38,28,29,30,31,28,29,30,31,26,25,26,27,28,29,27,28,29,30,25,26,15,14,15,16,17,13,14,15,16,15,16,17,18,19,20,12,13,14,15,16,17,10,11,12,13,14,12,13,10,11,12,13,14,15,2,3,4,5,6,7,8,4,5,6,7,8,9,2,3,1,2,3,4,5,6,6,6,6,7,8,8,9,6,7,6,6,6,6,5,5,6,5,5,5,5,5,6,7,4,2,3,4,5,6,4,5,6,7,8,9,1,2,3,4,5,6,7,8,2,3,4,5,6,7,8,9,2,3,4,5,6,1,2,3,3,4,3,2,1,2,3,4,5,6,5,6,7,8,5,5,6,7,4,5,6,4,2,3,4,3,4,5,6,5,5,6,4,1,2,3,4,5,6,2,3,4,5,6,7,8,9,10,11,12,13,2,3,4,5,6,7,8,9,10,11,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,16,17,18,19,16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4]},{name:"value",values:[1646e7,41e8,41e8,367e7,113e7,106e7,102e7,15e7,15e7,5e7,3e7,2e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,8e7,4e7,1e7,1e7,53e7,8e7,4e7,7e7,5e7,5e7,3e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,2e7,2e7,2e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7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7,1e7],config:{unit:"short"}},{name:"self",values:[16460,4100,4100,3670,1130,1060,1020,150,150,50,30,20,10,10,10,10,10,10,10,10,10,10,10,80,40,10,10,530,80,40,70,50,50,30,10,10,10,10,10,10,10,10,10,20,20,20,20,20,20,20,20,20,10,390,390,180,70,50,10,20,20,10,10,10,10,10,10,10,20,10,10,10,110,80,60,10,20,20,20,10,10,10,10,10,10,10,20,10,10,30,20,40,30,20,10,10,40,40,10,10,10,10,10,10,10,210,210,210,130,130,10,50,40,40,70,10,40,1840,240,240,50,10,10,190,130,50,20,10,10,10,10,10,10,80,20,10,10,10,10,10,10,10,10,60,10,1330,1290,320,10,10,10,130,10,10,60,30,100,40,10,10,40,30,10,10,70,10,10,50,40,10,30,20,10,430,430,430,430,10,40,20,370,20,10,180,10,30,10,10,10,5630,5580,5580,5580,5580,5580,5580,5580,5580,5540,5540,5530,5510,5500,5490,5490,1610,1610,1540,1540,190,170,170,10,20,120,10,10,20,20,20,10,10,10,10,10,10,10,10,10,10,10,850,350,300,120,110,80,20,10,80,40,20,10,10,50,10,10,10,10,10,10,10,10,10,10,10,10,10,10,20,20,20,20,10,10,10,10,10,370,40,20,10,100,10,10,10,30,30,80,20,10,10,10,40,10,10,10,20,10,20,10,10,10,10,10,10,10,110,110,60,20,20,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,480,150,10,130,10,10,50,140,80,40,10,10,20,10,10,20,120,60,40,10,10,10,10,20,30,30,20,20,20,20,20,20,20,20,20,10,10,10,10,10,10,10,10,10,10,10,60,60,60,60,30,10,10,10,10,10,10,10,10,10,10,10,10,20,20,20,20,20,30,30,30,30,30,30,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,3880,3880,3880,3880,3870,3230,3230,3210,320,70,70,40,40,20,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,20,30,10,10,10,10,10,10,10,10,10,20,20,20,70,60,20,30,10,10,10,100,20,50,1850,410,110,110,90,60,60,40,20,20,20,30,30,30,10,10,20,20,20,20,20,20,10,20,20,20,10,10,30,20,10,40,10,10,10,10,10,10,10,10,10,10,10,10,10,40,10,80,30,30,10,10,10,10,10,10,10,20,60,30,30,10,10,10,10,10,10,160,120,20,100,50,10,10,640,10,550,410,80,60,260,20,170,60,30,20,20,20,10,10,10,20,50,40,10,10,10,70,30,40,290,90,30,10,10,10,10,210,20,10,10,10,120,90,90,60,10,30,30,30,30,10,20,50,10,10,10,280,150,150,150,60,30,80,50,20,20,20,20,20,20,20,20,20,20,20,20,10,10,10,10,10,10,10,20,20,20,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,130,130,130,70,30,30,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,40,10,590,20,20,10,40,150,30,30,120,10,80,370,260,40,150,110,90,10,10,10,10,10,10,10,10,10,10,20,20,20,20,20,70,60,20,20,640,640,250,250,230,180,170,170,170,170,50,10,40,10,10,60,60,10,30,10,10,10,10,10,50,50,20,10,10,10,10,10,10,10,10,10,10,10,10,10,390,60,40,30,20,20,10,10,10,10,10,30,10,10,10,10,10,90,10,10,60,10,40,40,40,30,30,30,30,30,30,30,30,10,10,10,10,10,10,20,10,10,10,10,10,180,170,50,20,20,20,20,10,10,10,10,10,10,10,30,30,20,20,20,10,10,10,10,10,10,10,90,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,70,70,70,70,10,20,20,10,10,10,10,10,10,10,10,10,10,10,10,10,10,20,20,10,10,10,10,10,10,10,10,10,10,10,10,10,10,20,20,10,10,10,10,10,20,20,20,20,20,10,40,40,10,10,10,10,10,30,30,30,30,30,30,10,10,6190,6170,6170,6070,4460,10,50,440,540,20,10,10,10,980,10,50,480,540,50,210,30,30,60,180,10,210,20,20,20,100,20,20,10,10,10,10,10,10,10,10,10,40,10,10,10,10,10,10,10,20,20,20,20,20,20,20,20,10,10,10,10,10,170,160,70,30,10,40,10,170,90,90,70,20,10,30,30,30,30,10,10,10,10,10,10,10,10,80,10,10,70,60,10,10,20,20,20,10,80,10,10,10,10,10,20,20,20,20,20,20,20,20,20,20,20,20,50,50,50,50,50,50,50,10,10,10,60,60,60,60,60,60,60,40,40,30,30,30,30,30,30,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10],config:{unit:"short"}},{name:"label",type:g.fS.enum,values:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,15,15,16,17,14,15,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,28,30,31,32,33,34,35,41,42,43,44,40,28,29,45,46,47,48,49,50,51,52,53,27,53,28,54,55,27,28,56,45,46,49,50,51,31,57,58,59,60,36,53,52,54,28,54,28,36,29,12,27,28,36,29,45,46,47,48,61,62,63,6,7,8,21,9,10,11,19,20,23,64,14,15,18,65,66,15,15,15,15,15,16,65,18,16,66,18,65,66,67,68,69,31,70,71,72,18,65,73,74,75,54,12,12,76,77,78,79,80,81,82,83,84,74,85,74,86,87,88,89,90,91,92,90,93,91,94,95,96,97,12,98,12,99,100,12,101,102,103,104,99,103,105,106,107,108,109,107,110,107,111,107,112,107,113,114,115,116,117,118,119,120,95,121,122,123,124,125,126,12,127,125,54,12,28,128,51,31,57,58,129,130,131,132,133,134,135,136,137,82,83,138,139,79,12,77,82,140,141,142,143,28,144,145,146,31,147,148,149,150,54,151,152,153,154,27,155,28,36,156,157,135,158,159,160,140,150,54,53,152,153,161,160,162,159,163,164,78,79,165,166,154,138,167,137,82,168,169,170,171,172,173,140,152,153,174,175,141,142,143,28,36,82,176,28,45,46,49,50,51,31,57,58,59,60,43,27,53,28,177,56,36,55,54,28,36,53,27,52,28,178,44,40,28,29,45,46,49,155,54,28,144,145,146,31,147,148,179,180,181,29,182,183,184,185,186,187,180,188,189,190,191,192,193,194,195,62,4,26,27,28,30,31,32,33,34,35,196,197,198,199,200,29,201,197,198,199,200,29,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,107,219,220,221,222,223,224,225,226,4,5,227,228,19,20,229,230,231,232,233,234,235,236,237,235,236,238,239,240,241,242,217,243,244,26,245,40,28,30,31,32,33,34,35,27,28,29,246,247,158,248,249,12,250,251,12,252,253,254,226,4,26,27,28,29,36,37,38,245,40,28,255,29,30,31,32,33,34,35,41,5,227,228,19,9,54,28,155,256,141,142,143,28,144,145,146,31,147,148,179,180,181,257,159,140,152,153,258,175,69,31,70,71,196,83,259,248,249,12,260,249,12,261,248,262,27,53,28,36,29,56,263,260,186,187,264,265,180,188,181,266,267,268,269,267,268,149,261,270,271,180,181,264,265,27,53,28,82,83,272,149,271,264,265,273,54,28,36,12,256,274,275,159,276,141,142,143,28,29,36,158,159,277,278,279,4,5,227,244,280,228,19,20,229,230,231,232,233,234,235,236,237,235,236,238,239,240,241,242,217,281,9,10,11,282,20,229,230,231,232,233,234,235,236,237,235,236,238,239,240,241,242,217,283,62,63,227,228,9,19,281,229,230,231,232,233,234,235,236,237,284,285,286,287,288,20,289,283,244,290,291,27,28,36,149,271,264,265,180,188,181,187,180,188,181,264,265,292,293,294,54,28,30,31,32,33,34,260,295,269,267,268,296,297,298,260,299,300,301,302,303,304,31,305,306,148,179,264,180,181,188,307,180,188,181,149,308,309,269,267,310,308,309,311,31,312,313,314,315,316,317,318,31,319,306,148,320,321,284,285,286,287,288,322,12,323,53,256,141,142,143,53,159,253,273,324,254,259,226,4,26,245,40,28,30,31,32,33,34,325,35,326,27,28,29,263,27,53,186,187,180,292,293,327,328,329,330,331,332,333,334,323,53,335,54,336,329,330,331,332,337,338,339,31,340,341,342,294,54,28,45,46,49,50,51,31,57,58,343,344,345,346,217,347,215,216,217,27,14,15,18,348,349,15,16,348,257,225,251,27,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,182,183,184,185,146,365,366,367,352,353,27,53,368,355,358,359,360,361,369,236,237,370,371,372,373,238,239,240,241,242,217,374,375,376,31,377,378,35,379,380,41,326,381,382,383,384,72,196,385,196,386,387,56,388,389,390,391,392,325,393,394,382,395,396,397,398,399,400,31,401,402,403,404,405,406,407,408,409,31,410,411,412,413,414,415,213,214,215,216,217,416,417,27,28,29,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,318,434,435,436,437,438,439,440,441,442,443,439,444,427,445,446,435,428,435,446,447,448,449,450,352,353,451,452,408,409,31,410,411,314,315,316,317,318,236,453,239,240,241,242,217,454,455,456,457,458,459,460,461,462,463,464,203,465,205,466,467,468,469,470,40,28,45,46,49,50,471,472,473,474,148,475,476,473,474,148,307,180,181,191,477,193,478,479,480,481,482,483,67,68,69,31,70,71,72,484,485,486,487,27,28,36,488,489,490,40,28,30,31,32,33,34,35,41,491,213,214,492],config:{type:{enum:{text:["total","test/pkg/agent.(*Target).start.func1","test/pkg/agent.(*Target).scrape","test/pkg/distributor.(*Distributor).Push","compress/gzip.(*Writer).Write","compress/flate.(*compressor).write","compress/flate.(*compressor).deflate","compress/flate.(*compressor).writeBlock","compress/flate.(*huffmanBitWriter).writeBlock","compress/flate.(*huffmanBitWriter).indexTokens","compress/flate.(*huffmanEncoder).generate","compress/flate.(*huffmanEncoder).bitCounts","runtime.memmove","compress/flate.(*huffmanEncoder).assignEncodingAndSize","sort.Sort","sort.quickSort","sort.insertionSort","compress/flate.(*byFreq).sort","sort.doPivot","compress/flate.(*huffmanBitWriter).writeTokens","compress/flate.(*huffmanBitWriter).writeCode","compress/flate.offsetCode","compress/flate.(*huffmanBitWriter).dynamicSize","compress/flate.(*compressor).findMatch","compress/flate.matchLen","compress/flate.hash4","compress/flate.NewWriter","runtime.newobject","runtime.mallocgc","runtime.memclrNoHeapPointers","runtime.gcAssistAlloc","runtime.systemstack","runtime.gcAssistAlloc.func1","runtime.gcAssistAlloc1","runtime.gcDrainN","runtime.scanobject","runtime.heapBitsSetType","runtime.heapBitsSetTypeGCProg","runtime.runGCProg","compress/flate.(*compressor).initDeflate","runtime.makeslice","runtime.pageIndexOf","test/pkg/pprof.OpenRaw","test/pkg/gen/google/v1.(*Profile).UnmarshalVT","test/pkg/gen/google/v1.(*Sample).UnmarshalVT","runtime.(*mcache).nextFree","runtime.(*mcache).refill","runtime.(*mcentral).uncacheSpan","runtime.(*spanSet).push","runtime.(*mcentral).cacheSpan","runtime.(*mcentral).grow","runtime.(*mheap).alloc","runtime.getMCache","runtime.nextFreeFast","runtime.growslice","test/pkg/gen/google/v1.(*Location).UnmarshalVT","runtime.heapBitsForAddr","runtime.(*mheap).alloc.func1","runtime.(*mheap).allocSpan","runtime.(*mheap).allocMSpanLocked","runtime.(*fixalloc).alloc","runtime.(*headTailIndex).incTail","compress/gzip.(*Writer).Close","compress/flate.(*compressor).close","test/pkg/pprof.(*Profile).Normalize","test/pkg/pprof.(*sortedSample).Less","test/pkg/pprof.(*sortedSample).Swap","runtime.gcWriteBarrierR8","runtime.gcWriteBarrier","runtime.wbBufFlush","runtime.wbBufFlush.func1","runtime.wbBufFlush1","runtime.findObject","test/pkg/pprof.(*Profile).clearSampleReferences","test/pkg/slices.RemoveInPlace[...]","test/pkg/pprof.(*Profile).clearSampleReferences.func1","test/pkg/pprof.StacktracesHasher.Hashes","github.com/cespare/xxhash/v2.round","github.com/cespare/xxhash/v2.(*Digest).Sum64","github.com/cespare/xxhash/v2.(*Digest).Write","github.com/cespare/xxhash/v2.u64","github.com/samber/lo.Uniq[...]","runtime.mapaccess2_fast64","runtime.memhash64","runtime.bucketMask","test/pkg/pprof.(*Profile).Normalize.func1","test/pkg/pprof.(*Profile).Normalize.func1.1","test/pkg/gen/google/v1.(*Profile).MarshalToVT","test/pkg/gen/google/v1.(*Profile).MarshalToSizedBufferVT","test/pkg/gen/google/v1.(*Sample).MarshalToSizedBufferVT","test/pkg/gen/google/v1.(*Profile).SizeVT","test/pkg/gen/google/v1.(*Sample).SizeVT","test/pkg/gen/google/v1.encodeVarint","test/pkg/gen/google/v1.(*Location).SizeVT","io/ioutil.ReadAll","io.ReadAll","compress/gzip.(*Reader).Read","compress/flate.(*decompressor).Read","compress/flate.(*dictDecoder).tryWriteCopy","compress/flate.(*decompressor).huffmanBlock","compress/flate.(*dictDecoder).writeCopy","compress/flate.(*decompressor).huffSym","bytes.(*Reader).ReadByte","compress/flate.(*decompressor).moreBits","compress/flate.(*decompressor).nextBlock","net/http.(*conn).serve","net/http.serverHandler.ServeHTTP","net/http.HandlerFunc.ServeHTTP","test/pkg/util.glob..func1.1","golang.org/x/net/http2/h2c.h2cHandler.ServeHTTP","test/pkg/create.(*create).initServer.func2.1","github.com/opentracing-contrib/go-stdlib/nethttp.MiddlewareFunc.func5","github.com/weaveworks/common/middleware.Log.Wrap.func1","github.com/weaveworks/common/middleware.Instrument.Wrap.func1","github.com/felixge/httpsnoop.(*Metrics).CaptureMetrics","github.com/weaveworks/common/middleware.Instrument.Wrap.func1.2","github.com/gorilla/mux.(*Router).ServeHTTP","github.com/bufbuild/connect-go.(*Handler).ServeHTTP","github.com/bufbuild/connect-go.NewUnaryHandler[...].func1","github.com/bufbuild/connect-go.NewUnaryHandler[...].func1.1","test/pkg/ingester.(*Ingester).Push","github.com/klauspost/compress/gzip.(*Reader).Read","github.com/klauspost/compress/flate.(*decompressor).Read","github.com/klauspost/compress/flate.(*dictDecoder).tryWriteCopy","github.com/klauspost/compress/flate.(*dictDecoder).writeByte","github.com/klauspost/compress/flate.(*decompressor).huffmanBytesReader","github.com/klauspost/compress/flate.(*dictDecoder).writeCopy","github.com/klauspost/compress/flate.(*decompressor).nextBlock","runtime.(*mcache).allocLarge","runtime.(*pageAlloc).alloc","runtime.(*pageAlloc).allocRange","runtime.(*pageAlloc).update","runtime.(*pallocBits).summarize","test/pkg/create.(*Head).Ingest","test/pkg/create.(*Head).convertSamples","test/pkg/create.(*deduplicatingSlice[...]).ingest","test/pkg/create.(*stacktracesHelper).rewrite","test/pkg/create.idConversionTable.rewriteUint64","runtime.add","test/pkg/create.(*stacktracesHelper).key","runtime.mapassign_fast64","runtime.hashGrow","runtime.makeBucketArray","runtime.newarray","runtime.profilealloc","runtime.mProf_Malloc","runtime.callers","runtime.callers.func1","runtime.gentraceback","runtime.findfunc","runtime.(*hmap).newoverflow","runtime.releasem","runtime.growWork_fast64","runtime.evacuate_fast64","encoding/binary.littleEndian.PutUint64","runtime.acquirem","test/pkg/create.(*labelCache).rewriteLabels","runtime.mapaccess1_fast64","runtime.mapaccess2_faststr","aeshashbody","memeqbody","runtime.mapaccess2","runtime.memhash_varlen","runtime.evacuated","test/pkg/create.(*locationsHelper).key","runtime.bucketShift","test/pkg/create.(*stringsHelper).addToRewriter","test/pkg/create.(*locationsHelper).rewrite","github.com/prometheus/client_golang/prometheus.(*CounterVec).WithLabelValues","github.com/prometheus/client_golang/prometheus.(*MetricVec).GetMetricWithLabelValues","github.com/prometheus/client_golang/prometheus.(*MetricVec).hashLabelValues","github.com/prometheus/client_golang/prometheus.hashAdd","test/pkg/create.(*deltaProfiles).computeDelta","test/pkg/create.deltaSamples","runtime.typedmemmove","runtime.bulkBarrierPreWrite","test/pkg/create.copySlice[...]","runtime.add1","runtime.roundupsize","runtime.pcdatavalue","runtime.pcvalue","runtime.step","github.com/go-kit/log.(*context).Log","github.com/go-kit/log.bindValues","github.com/go-kit/log.Caller.func1","runtime.Caller","runtime.(*Frames).Next","runtime.funcline1","runtime.readvarint","test/pkg/gen/google/v1.(*Profile).ReturnToVTPool","test/pkg/gen/google/v1.(*Profile).ResetVT","github.com/bufbuild/connect-go.(*errorTranslatingSender).Send","github.com/bufbuild/connect-go.(*connectUnaryHandlerSender).Send","github.com/bufbuild/connect-go.(*connectUnaryMarshaler).Marshal","github.com/bufbuild/connect-go.(*compressionPool).Compress","github.com/bufbuild/connect-go.(*compressionPool).putCompressor","runtime.spanOf","compress/gzip.(*Writer).Reset","compress/gzip.(*Writer).init","compress/flate.(*Writer).Reset","compress/flate.(*compressor).reset","github.com/bufbuild/connect-go.(*compressionPool).getCompressor","github.com/bufbuild/connect-go.receiveUnaryRequest[...]","github.com/bufbuild/connect-go.(*errorTranslatingReceiver).Receive","github.com/bufbuild/connect-go.(*connectUnaryHandlerReceiver).Receive","github.com/bufbuild/connect-go.(*connectUnaryUnmarshaler).UnmarshalFunc","bytes.(*Buffer).ReadFrom","github.com/weaveworks/common/middleware.(*reqBody).Read","net/http.(*body).Read","net/http.(*body).readLocked","net/http/internal.(*chunkedReader).Read","bufio.(*Reader).Read","net/http.(*connReader).Read","net.(*conn).Read","net.(*netFD).Read","syscall.Read","syscall.read","syscall.Syscall","net/http.(*ServeMux).ServeHTTP","net/http/pprof.Index","net/http/pprof.handler.ServeHTTP","runtime/pprof.(*Profile).WriteTo","runtime/pprof.writeAlloc","runtime/pprof.writeHeapInternal","runtime/pprof.writeHeapProto","runtime/pprof.(*profileBuilder).pbSample","runtime/pprof.(*profileBuilder).flush","compress/flate.(*compressor).encSpeed","compress/flate.(*huffmanBitWriter).writeBlockDynamic","github.com/felixge/httpsnoop.(*rw).Write","github.com/felixge/httpsnoop.(*Metrics).CaptureMetrics.func2.1","github.com/weaveworks/common/middleware.(*badResponseLoggingWriter).Write","github.com/opentracing-contrib/go-stdlib/nethttp.(*statusCodeTracker).Write","net/http.(*response).Write","net/http.(*response).write","bufio.(*Writer).Write","bufio.(*Writer).Flush","net/http.(*chunkWriter).Write","net/http.checkConnErrorWriter.Write","net.(*conn).Write","net.(*netFD).Write","internal/poll.(*FD).Write","syscall.write","compress/flate.token.length","compress/flate.(*deflateFast).encode","compress/flate.(*compressor).init","runtime/pprof.writeHeapProto.func1","runtime/pprof.(*profileBuilder).pbLabel","runtime/pprof.(*protobuf).int64Opt","runtime/pprof.(*protobuf).endMessage","runtime/pprof.(*protobuf).startMessage","runtime/pprof.(*protobuf).uint64s","runtime/pprof.(*protobuf).int64s","runtime/pprof.(*profileBuilder).appendLocsForStack","runtime/pprof.(*profileBuilder).emitLocation","runtime.memclrNoHeapPointersChunked","runtime.mapassign_faststr","runtime.mapaccess1_faststr","runtime.memclrHasPointers","runtime/pprof.(*profileBuilder).pbLine","runtime.duffcopy","runtime.duffzero","runtime.CallersFrames","runtime/pprof.allFrames","runtime.funcInfo.entry","runtime.(*moduledata).textAddr","runtime.funcfile","runtime.findnull","indexbytebody","runtime.funcname","runtime.(*Func).Entry","runtime.pcdatavalue1","runtime/pprof.runtime_expandFinalInlineFrame","runtime/pprof.(*profileBuilder).stringIndex","runtime.growWork_faststr","runtime.evacuate_faststr","runtime.advanceEvacuationMark","runtime/pprof.(*protobuf).uint64Opt","runtime.funcdata","runtime/pprof.(*profileBuilder).build","compress/flate.(*deflateFast).matchLen","compress/flate.(*huffmanBitWriter).writeBits","compress/flate.(*huffmanBitWriter).writeDynamicHeader","compress/flate.hash","fmt.Fprintf","fmt.(*pp).doPrintf","fmt.(*pp).printArg","fmt.(*pp).fmtInteger","fmt.(*fmt).fmtInteger","compress/flate.token.offset","compress/flate.load64","runtime.FuncForPC","runtime/pprof.newProfileBuilder","runtime/pprof.(*profileBuilder).readMapping","os.ReadFile","runtime.(*Func).Name","runtime/pprof.scaleHeapSample","math.archExp","runtime.(*MemProfileRecord).Stack","runtime/pprof.writeGoroutine","runtime/pprof.writeRuntimeProfile","runtime/pprof.runtime_goroutineProfileWithLabels","runtime.goroutineProfileWithLabels","runtime.forEachGRace","runtime.goroutineProfileWithLabels.func4","runtime.goroutineProfileWithLabels.func4.1","runtime.saveg","runtime.funcspdelta","runtime.goroutineProfileWithLabels.func1","runtime.isSystemGoroutine","runtime.goroutineProfileWithLabels.func2","runtime.startTheWorld","runtime.startTheWorld.func1","runtime.startTheWorldWithSema","runtime.wakep","runtime.startm","runtime.notewakeup","runtime.futexwakeup","runtime.futex","runtime.goroutineProfileWithLabels.func3","runtime/pprof.printCountProfile","runtime/pprof.printCountProfile.func1","bytes.(*Buffer).Write","runtime.slicebytetostring","runtime.overLoadFactor","runtime.heapBits.bits","runtime.greyobject","runtime/pprof.parseProcSelfMaps","runtime/pprof.elfBuildID","os.OpenFile","syscall.Open","syscall.openat","syscall.Syscall6","runtime/pprof.parseProcSelfMaps.func1","bytes.Cut","runtime/pprof.(*profileBuilder).addMapping","os.Open","os.openFileNolog","os.newFile","runtime.SetFinalizer","runtime.SetFinalizer.func2","runtime.addfinalizer","runtime.addspecial","runtime.(*pageAlloc).allocToCache","os.(*File).Stat","internal/poll.(*FD).Fstat","syscall.Fstat","os.(*File).Read","runtime/pprof.(*keysByCount).Less","cmpbody","github.com/prometheus/client_golang/prometheus.(*GaugeVec).WithLabelValues","runtime.assertI2I","runtime.getitab","runtime.(*itabTableType).find","github.com/weaveworks/common/middleware.Instrument.getRouteName","github.com/weaveworks/common/middleware.getRouteName","github.com/weaveworks/common/middleware.MakeLabelValue","strings.Trim","github.com/gorilla/mux.(*Router).Match","github.com/gorilla/mux.(*Route).Match","github.com/gorilla/mux.(*routeRegexp).Match","regexp.(*Regexp).doExecute","regexp.(*Regexp).backtrack","regexp.(*Regexp).tryBacktrack","github.com/weaveworks/common/logging.gokit.Debugf","github.com/uber/jaeger-client-go.(*Tracer).Extract","github.com/uber/jaeger-client-go.(*TextMapPropagator).Extract","runtime.assertE2I2","github.com/weaveworks/common/middleware.Tracer.Wrap.func1","net/http.(*response).finishRequest","net/http.(*chunkWriter).writeHeader","net/http.Header.writeSubset","net/http.Header.sortedKeyValues","sync.(*Pool).Get","net/http.(*conn).readRequest","runtime.mapiterinit","runtime.gcBgMarkWorker","runtime.gcBgMarkWorker.func2","runtime.gcDrain","runtime.(*gcBits).bytep","runtime.(*mspan).objIndex","runtime.(*gcWork).put","runtime.getempty","runtime.putfull","runtime.(*lfstack).push","runtime.(*mspan).markBitsForIndex","runtime.markBits.isMarked","runtime.arenaIndex","runtime.(*gcWork).tryGet","runtime.trygetfull","runtime.spanOfUnchecked","runtime.heapBits.next","runtime.gcFlushBgCredit","runtime.(*gcWork).balance","runtime.handoff","runtime.(*gcWork).tryGetFast","runtime.gcMarkDone","runtime.gcMarkTermination","runtime.mProf_Flush","runtime.mProf_FlushLocked","runtime.(*bucket).mp","runtime.gcMarkTermination.func4","runtime.forEachP","runtime.gcMarkTermination.func4.1","runtime.(*mcache).prepareForSweep","runtime.(*mcache).releaseAll","net/http.(*persistConn).readLoop","runtime.selectgo","runtime.send","runtime.goready","runtime.goready.func1","runtime.ready","runtime.runqput","bufio.(*Reader).Peek","bufio.(*Reader).fill","net/http.(*persistConn).Read","net/http.(*persistConn).readResponse","github.com/opentracing-contrib/go-stdlib/nethttp.(*Tracer).gotFirstResponseByte","runtime.bgsweep","runtime.sweepone","runtime.(*sweepLocker).tryAcquire","runtime.(*sweepLocked).sweep","runtime.(*gcBitsArena).tryAlloc","runtime.spanClass.sizeclass","runtime/internal/atomic.(*Uint32).CompareAndSwap","runtime.mcall","runtime.park_m","runtime.schedule","runtime.findrunnable","runtime.netpoll","runtime.epollwait","runtime.stopm","runtime.notesleep","runtime.futexsleep","runtime.(*randomOrder).start","runtime.checkTimers","runtime.runtimer","runtime.dodeltimer0","runtime.gcstopm","runtime.lock2","runtime.procyield","runtime.(*lfstack).pop","runtime.gosched_m","runtime.lock","runtime.goschedImpl","runtime.execute","runtime.casgstatus","net/http.(*persistConn).writeLoop","net/http.(*Request).write","net/http.newTransferWriter","runtime.convI2I","runtime.chansend1","runtime.chansend","net/http.persistConnWriter.Write","runtime.exitsyscall","runtime.exitsyscallfast","runtime.exitsyscallfast_reacquired","test/pkg/distributor.(*Distributor).Push.func1","test/pkg/distributor.(*Distributor).sendProfiles","test/pkg/distributor.(*Distributor).sendProfilesErr","test/pkg/gen/ingester/v1/ingesterv1connect.(*ingesterServiceClient).Push","github.com/bufbuild/connect-go.(*Client[...]).CallUnary","github.com/bufbuild/connect-go.NewClient[...].func2","github.com/bufbuild/connect-go.NewClient[...].func1","github.com/bufbuild/connect-go.receiveUnaryResponse[...]","github.com/bufbuild/connect-go.(*connectUnaryClientReceiver).Receive","github.com/bufbuild/connect-go.(*compressionPool).Decompress","github.com/bufbuild/connect-go.(*compressionPool).getDecompressor","compress/gzip.(*Reader).Reset","compress/gzip.(*Reader).readHeader","compress/flate.(*dictDecoder).init","runtime.heapBits.initSpan","compress/flate.(*decompressor).Reset","runtime.newstack","runtime.copystack","compress/flate.NewReader","compress/flate.fixedHuffmanDecoderInit","github.com/bufbuild/connect-go.(*connectClientSender).Send","github.com/bufbuild/connect-go.(*connectUnaryMarshaler).write","github.com/bufbuild/connect-go.(*duplexHTTPCall).Write","io.(*pipe).write","runtime.chanrecv1","runtime.chanrecv","runtime.recv","github.com/bufbuild/connect-go.(*errorTranslatingReceiver).Close","github.com/bufbuild/connect-go.(*connectUnaryClientReceiver).Close","github.com/bufbuild/connect-go.(*duplexHTTPCall).CloseRead","github.com/opentracing-contrib/go-stdlib/nethttp.closeTracker.Close","runtime/pprof.profileWriter","runtime/pprof.(*profileBuilder).addCPUData","runtime/pprof.(*profMap).lookup","net/http.(*connReader).backgroundRead","internal/poll.(*FD).Read"]}}}}]};var wt=m(79726);class Ct extends wt.v6{toDataQuery(e){return{refId:"TestDataDataSource-QueryVariable",stringInput:e.query,scenarioId:p.UV.VariablesQuery,csvWave:void 0}}}class Et extends ct.CK{constructor(e,r=(0,ut.J)()){super(e),this.templateSrv=r,this.variables=new Ct,this.annotations={getDefaultQuery:()=>({scenarioId:p.UV.Annotations,lines:10}),prepareAnnotation:n=>n.target?.scenarioId?.length?n:{...n,target:{refId:"Anno",scenarioId:p.UV.Annotations,lines:10}}}}getDefaultQuery(){return{scenarioId:p.UV.RandomWalk,seriesCount:1}}query(e){const r=[],n=[];for(const o of e.targets)if(!o.hide)switch(this.resolveTemplateVariables(o,e.scopedVars),o.scenarioId){case"live":n.push(It(o,e));break;case"streaming_client":n.push(Ye(o,e));break;case"grafana_api":n.push(yt(o,e));break;case p.UV.Annotations:n.push(this.annotationDataTopicTest(o,e));break;case"variables-query":n.push(this.variablesQuery(o,e));break;case"node_graph":n.push(this.nodesQuery(o,e));break;case"flame_graph":n.push(this.flameGraphQuery(o));break;case"trace":n.push(this.trace(o,e));break;case"raw_frame":n.push(this.rawFrameQuery(o,e));break;case"server_error_500":const i=this.serverErrorQuery(o,e);i?n.push(i):r.push(o);break;case"manual_entry":{let s=`Time,Value `;if(o.points)for(const c of o.points)s+=`${c[1]},${c[0]} `;o.scenarioId=p.UV.CSVContent,o.csvContent=s}default:r.push(o)}if(r.length){const o={...e,targets:r};n.push(super.query(o))}return n.length===0?(0,P.of)({data:[]}):(0,nt.T)(...n)}resolveTemplateVariables(e,r){e.labels&&(e.labels=this.templateSrv.replace(e.labels,r)),e.alias&&(e.alias=this.templateSrv.replace(e.alias,r)),e.scenarioId&&(e.scenarioId=this.templateSrv.replace(e.scenarioId,r)),e.stringInput&&(e.stringInput=this.templateSrv.replace(e.stringInput,r)),e.csvContent&&(e.csvContent=this.templateSrv.replace(e.csvContent,r)),e.rawFrameContent&&(e.rawFrameContent=this.templateSrv.replace(e.rawFrameContent,r))}annotationDataTopicTest(e,r){const n=this.buildFakeAnnotationEvents(r.range,e.lines??10),o=new Y.i(n);return o.meta={dataTopic:st.w5.Annotations},(0,P.of)({key:e.refId,data:[o]}).pipe((0,A.g)(100))}buildFakeAnnotationEvents(e,r){let n=e.from.valueOf();const o=e.to.valueOf(),i=[],s=(o-n)/r;for(let c=0;c<r;c++)i.push({time:n,text:'This is the text, <a href="https://grafana.com">Grafana.com</a>',tags:["text","server"]}),n+=s;return i}getQueryDisplayText(e){const r=e.scenarioId??"Default scenario";return e.alias?r+" as "+e.alias:r}testDatasource(){return Promise.resolve({status:"success",message:"Data source is working"})}getScenarios(){return this.scenariosCache||(this.scenariosCache=this.getResource("scenarios")),this.scenariosCache}variablesQuery(e,r){const n=e.stringInput??"",o=this.templateSrv.replace(n,(0,it._)({query:n,wildcardChar:"*"})),s=pt(o).map(l=>({value:l.name,text:l.name})),c=new Y.i(s);return(0,P.of)({data:[c]}).pipe((0,A.g)(100))}nodesQuery(e,r){const n=e.nodes?.type||"random";let o;switch(n){case"random":o=de(e.nodes?.count);break;case"response":o=vt();break;case"random edges":o=[bt(e.nodes?.count)];break;default:throw new Error(`Unknown node_graph sub type ${n}`)}return(0,P.of)({data:o}).pipe((0,A.g)(100))}flameGraphQuery(e){return(0,P.of)({data:[{...St,refId:e.refId}]}).pipe((0,A.g)(100))}trace(e,r){const n=new G.v({meta:{preferredVisualisationType:"trace"},fields:[{name:"traceID"},{name:"spanID"},{name:"parentSpanID"},{name:"operationName"},{name:"serviceName"},{name:"serviceTags"},{name:"startTime"},{name:"duration"},{name:"logs"},{name:"references"},{name:"tags"}]}),o=r.targets[0].spanCount||10,i="75c665dfb68",s=Date.now()-1e3*60*30;for(let c=0;c<o;c++)n.add({traceID:i+"10000",spanID:i+(1e4+c),parentSpanID:c===0?"":i+1e4,operationName:`Operation ${c}`,serviceName:`Service ${c}`,startTime:s+c*100,duration:300});return(0,P.of)({data:[n]}).pipe((0,A.g)(100))}rawFrameQuery(e,r){try{const n=JSON.parse(e.rawFrameContent??"[]").map(o=>{const i=(0,Z.g0)(o);return i.refId=e.refId,i});return(0,P.of)({data:n,state:z.Gu.Done}).pipe((0,A.g)(100))}catch(n){return(0,P.of)({data:[],error:n instanceof Error?n:new Error("Unkown error")}).pipe((0,A.g)(100))}}serverErrorQuery(e,r){const{errorType:n}=e;if(n==="server_panic")return null;if((e.stringInput??"")===""){if(n==="frontend_exception")throw new Error("Scenario threw an exception in the frontend because the input was empty.");return(0,rt._)(()=>new Error("Scenario returned an error because the input was empty."))}return null}}function yt(t,e){const r=`/api/${t.stringInput}`;return(0,ot.D)((0,mt.i)().get(r).then(n=>{const o=new Y.i(n);return{state:z.Gu.Done,data:[o]}}))}let kt=1e3;function It(t,e){if(!t.channel)throw new Error("Missing channel config");return(0,dt.gj)().getDataStream({addr:{scope:lt.z.Plugin,namespace:"testdata",path:t.channel},key:`testStream.${kt++}`})}const xt=new $.hf(Et).setConfigEditor(_).setQueryEditor(tt).addConfigPage({title:"Setup",icon:"list-ul",body:at,id:"setup"})}}]); //# sourceMappingURL=testDataDSPlugin.6765cb4f18db25b60345.js.map