Skip to content

The only tool you need to know what is happening and how to fix it.

2.4 KB
Raw Blame
import"./DsnmJJEf.js";import"./69_IOA4Y.js";import{e as b,d as i,h as p,t as h,m as g,n as x,r as $}from"./BKFspo1J.js";import{B as k}from"./DY5VVhnr.js";import{F as _}from"./DYLqhqV2.js";function o(e){return Number(e.toFixed(2)).toString()}function S(e){return e<1e3?`${o(e)} ns`:e<1e6?`${o(e/1e3)} µs`:e<1e9?`${o(e/1e6)} ms`:`${o(e/1e9)} s`}function l(e){return e<1024?`${o(e)} B`:e<1024**2?`${o(e/1024)} KB`:e<1024**3?`${o(e/1024**2)} MB`:`${o(e/1024**3)} GB`}const n={nanoseconds:1,nanos:1,ns:1,microseconds:1e3,micros:1e3,us:1e3,µs:1e3,milliseconds:1e6,millis:1e6,ms:1e6,seconds:1e9,s:1e9},u=new Set(["bytes","byte","b"]),c=new Set(["count","samples","sample","frames","objects","goroutines","none",""]);function j(e,t){const r=(e||"").toLowerCase();return r in n?S(t*n[r]):u.has(r)?l(t):c.has(r)?Math.round(t).toLocaleString():`${t.toLocaleString()} ${e}`.trim()}const a={cpu:"CPU",inuse_space:"In-Use",alloc_space:"Alloc",inuse_objects:"In-Use Obj",alloc_objects:"Alloc Obj",goroutine:"Goroutines",mutex:"Mutex",block:"Block",samples:"Samples",wall:"Wall",lock:"Lock"};function C(e){return a[e]?a[e]:(e.includes(":")?e.split(":").pop()??e:e).replace(/[._]/g," ").split(" ").filter(Boolean).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")}function E(e){return e.includes("cpu")?"cpu":e[0]??""}function I(e){return(e||"").toLowerCase()in n}function M(e,t){const r=(e||"").toLowerCase();if(r in n){const s=t*n[r]/1e9;return`${o(s)} cores`}return u.has(r)?`${l(t)}/s`:c.has(r)?`${Math.round(t).toLocaleString()}/s`:`${t.toLocaleString()} ${e}/s`.trim()}var B=b(`<div class="flex items-center gap-3 rounded-md border border-blue-200 bg-blue-50 px-4 py-2.5 text-sm text-blue-900 dark:border-blue-900/50 dark:bg-blue-950/40 dark:text-blue-200"><!> <span class="min-w-0 flex-1">Profiles is experimental. We're actively building out continuous profiling and would love your
		feedback.</span> <!></div>`);function O(e){const t="https://github.com/tracewayapp/traceway/issues";var r=B(),s=p(r);_(s,{class:"size-4 shrink-0 text-blue-600 dark:text-blue-400"});var f=g(s,4);k(f,{href:t,target:"_blank",rel:"noopener noreferrer",variant:"ghost",size:"sm",class:"shrink-0 bg-blue-100 text-blue-800 hover:bg-blue-200 hover:text-blue-900 dark:bg-blue-900/50 dark:text-blue-200 dark:hover:bg-blue-900/70",children:(m,L)=>{x();var d=h("Give Feedback");i(m,d)},$$slots:{default:!0}}),$(r),i(e,r)}export{O as E,M as a,E as d,j as f,C as h,I as i};