22 lines
54 KiB
HTML
22 lines
54 KiB
HTML
|
|
<!DOCTYPE html>
|
||
|
|
<html>
|
||
|
|
<head>
|
||
|
|
<meta charset="utf-8">
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<div id="app"></div>
|
||
|
|
|
||
|
|
<script>var pyinstrumentHTMLRenderer=function(){"use strict";var ct=Object.defineProperty;var dt=(R,C,H)=>C in R?ct(R,C,{enumerable:!0,configurable:!0,writable:!0,value:H}):R[C]=H;var k=(R,C,H)=>(dt(R,typeof C!="symbol"?C+"":C,H),H);const R="";function C(){}function H(t){return t()}function we(){return Object.create(null)}function O(t){t.forEach(H)}function be(t){return typeof t=="function"}function K(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function Ie(t){return Object.keys(t).length===0}function Re(t,...e){if(t==null)return C;const i=t.subscribe(...e);return i.unsubscribe?()=>i.unsubscribe():i}function se(t,e,i){t.$$.on_destroy.push(Re(e,i))}function f(t,e){t.appendChild(e)}function X(t,e,i){t.insertBefore(e,i||null)}function N(t){t.parentNode&&t.parentNode.removeChild(t)}function _(t){return document.createElement(t)}function ke(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function L(t){return document.createTextNode(t)}function w(){return L(" ")}function ye(){return L("")}function W(t,e,i,n){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i,n)}function Ce(t){return function(e){return e.preventDefault(),t.call(this,e)}}function Ee(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function m(t,e,i){i==null?t.removeAttribute(e):t.getAttribute(e)!==i&&t.setAttribute(e,i)}function Oe(t){return Array.from(t.childNodes)}function q(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function T(t,e,i,n){i===null?t.style.removeProperty(e):t.style.setProperty(e,i,n?"important":"")}function Q(t,e,i){t.classList[i?"add":"remove"](e)}let V;function Z(t){V=t}function Te(){if(!V)throw new Error("Function called outside component initialization");return V}function qe(t){Te().$$.on_mount.push(t)}function Ue(t){Te().$$.on_destroy.push(t)}const Y=[],Fe=[],j=[],Se=[],Ve=Promise.resolve();let ae=!1;function Ze(){ae||(ae=!0,Ve.then($e))}function ue(t){j.push(t)}const fe=new Set;let x=0;function $e(){const t=V;do{for(;x<Y.length;){const e=Y[x];x++,Z(e),Ye(e.$$)}for(Z(null),Y.length=0,x=0;Fe.length;)Fe.pop()();for(let e=0;e<j.length;e+=1){const i=j[e];fe.has(i)||(fe.add(i),i())}j.length=0}while(Y.length);for(;Se.length;)Se.pop()();ae=!1,fe.clear(),Z(t)}function Ye(t){if(t.fragment!==null){t.update(),O(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(ue)}}const ee=new Set;let G;function ce(){G={r:0,c:[],p:G}}function de(){G.r||O(G.c),G=G.p}function D(t,e){t&&t.i&&(ee.delete(t),t.i(e))}function z(t,e,i,n){if(t&&t.o){if(ee.has(t))return;ee.add(t),G.c.push(()=>{ee.delete(t),n&&(i&&t.d(1),n())}),t.o(e)}else n&&n()}function Je(t,e){z(t,1,1,()=>{e.delete(t.key)})}function Ke(t,e,i,n,s,u,r,o,a,l,h,p){let d=t.length,g=u.length,A=d;const b={};for(;A--;)b[t[A].key]=A;const F=[],c=new Map,v=new Map;for(A=g;A--;){const y=p(s,u,A),S=i(y);let P=r.get(S);P?n&&P.p(y,e):(P=l(S,y),P.c()),c.set(S,F[A]=P),S in b&&v.set(S,Math.abs(A-b[S]))}const $=new Set,M=new Set;function E(y){D(y,1),y.m(o,h),r.set(y.key,y),h=y.first,g--}for(;d&&g;){const y=F[g-1],S=t[d-1],P=y.key,B=S.key;y===S?(h=y.first,d--,g--):c.has(B)?!r.has(P)||$.has(P)?E(y):M.has(B)?d--:v.get(P)>v.get(B)?(M.add(P),E(y)):($.add(B),d--):(a(S,r),d--)}for(;d--;){const y=t[d];c.has(y.key)||a(y,r)}for(;g;)E(F[g-1]);return F}function pe(t){t&&t.c()}function te(t,e,i,n){const{fragment:s,after_update:u}=t.$$;s&&s.m(e,i),n||ue(()=>{const r=t.$$.on_mount.map(H).filter(be);t.$$.on_destroy?t.$$.on_destroy.push(...r):O(r),t.$$.on_mount=[]}),u.forEach(ue)}function ie(t,e){const i=t.$$;i.fragment!==null&&(O(i.on_destroy),i.fragment&&i.fragment.d(e),i.on_destroy=i.fragment=null,i.ctx=[])}function We(t,e){t.$$.dirty[0]===-1&&(Y.push(t),Ze(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function me(t,e,i,n,s,u,r,o=[-1]){const a=V;Z(t);const l=t.$$={fragment:null,ctx:[],props:u,update:C,not_equal:s,bound:we(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(a?a.$$.context:[])),callbacks:we(),dirty:o,skip_bound:!1,root:e.target||a
|
||
|
|
(`),a=L(t[6]),l=L(")"),m(n,"class","group-triangle svelte-1aphj50"),Q(n,"rotate",t[8]),m(i,"class","group-header-button svelte-1aphj50"),m(e,"class","group-header svelte-1aphj50"),T(e,"padding-left",`${t[1]*35}px`)},m(d,g){X(d,e,g),f(e,i),f(i,n),f(i,s),f(i,r),f(i,o),f(i,a),f(i,l),h||(p=W(e,"click",Ee(Ce(t[11]))),h=!0)},p(d,g){g&256&&Q(n,"rotate",d[8]),g&1&&u!==(u=d[0].group.frames.length+"")&&q(r,u),g&64&&q(a,d[6]),g&2&&T(e,"padding-left",`${d[1]*35}px`)},d(d){d&&N(e),h=!1,p()}}}function ze(t){let e=[],i=new Map,n,s,u=t[0].children;const r=o=>o[14].identifier;for(let o=0;o<u.length;o+=1){let a=Me(t,u,o),l=r(a);i.set(l,e[o]=Be(l,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=ye()},m(o,a){for(let l=0;l<e.length;l+=1)e[l].m(o,a);X(o,n,a),s=!0},p(o,a){a&11&&(u=o[0].children,ce(),e=Ke(e,a,r,1,o,u,i,n.parentNode,Je,Be,n,Me),de())},i(o){if(!s){for(let a=0;a<u.length;a+=1)D(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)z(e[a]);s=!1},d(o){for(let a=0;a<e.length;a+=1)e[a].d(o);o&&N(n)}}}function Be(t,e){let i,n,s;return n=new He({props:{frame:e[14],indent:e[1]+(e[3]?1:0)}}),{key:t,first:null,c(){i=ye(),pe(n.$$.fragment),this.first=i},m(u,r){X(u,i,r),te(n,u,r),s=!0},p(u,r){e=u;const o={};r&1&&(o.frame=e[14]),r&10&&(o.indent=e[1]+(e[3]?1:0)),n.$set(o)},i(u){s||(D(n.$$.fragment,u),s=!0)},o(u){z(n.$$.fragment,u),s=!1},d(u){u&&N(i),ie(n,u)}}}function tt(t){let e,i,n,s,u,r,o=t[3]&&Le(t),a=t[0].group&&t[0].group.rootFrame==t[0]&&t[2]&&Ne(t),l=t[2]&&ze(t);return{c(){e=_("div"),o&&o.c(),i=w(),a&&a.c(),n=w(),l&&l.c(),s=w(),u=_("div"),m(u,"class","visual-guide"),T(u,"left",`${t[1]*35+21}px`),T(u,"backgroundColor",t[7]),m(e,"class","frame svelte-1aphj50")},m(h,p){X(h,e,p),o&&o.m(e,null),f(e,i),a&&a.m(e,null),f(e,n),l&&l.m(e,null),f(e,s),f(e,u),r=!0},p(h,[p]){h[3]?o?o.p(h,p):(o=Le(h),o.c(),o.m(e,i)):o&&(o.d(1),o=null),h[0].group&&h[0].group.rootFrame==h[0]&&h[2]?a?a.p(h,p):(a=Ne(h),a.c(),a.m(e,n)):a&&(a.d(1),a=null),h[2]?l?(l.p(h,p),p&4&&D(l,1)):(l=ze(h),l.c(),D(l,1),l.m(e,s)):l&&(ce(),z(l,1,1,()=>{l=null}),de()),p&2&&T(u,"left",`${h[1]*35+21}px`),p&128&&T(u,"backgroundColor",h[7])},i(h){r||(D(l),r=!0)},o(h){z(l),r=!1},d(h){h&&N(e),o&&o.d(),a&&a.d(),l&&l.d()}}}function it(t,e,i){let n,s,u;se(t,De,c=>i(12,s=c)),se(t,ne,c=>i(13,u=c));let{frame:r}=e,{indent:o=0}=e,a=!0,l,h;r.className?h=`${r.className}.${r.function}`:h=r.function;const p=`${r.filePathShort}:${r.lineNo.toString().padEnd(4,"\xA0")}`;let d,g=null;if(r.group){const c=r.group.libraries;c.length<4?g=c.join(", "):g=`${c[0]}, ${c[1]}, ${c[2]}...`}let A;r.proportionOfTotal>.6?A="#FF4159":r.proportionOfTotal>.3?A="#F5A623":r.proportionOfTotal>.2?A="#D8CB2A":A="#7ED321";function b(){i(2,a=!a)}function F(){De.update(c=>{var v;return{...c,[(v=r.groupId)!=null?v:""]:!n}})}return t.$$set=c=>{"frame"in c&&i(0,r=c.frame),"indent"in c&&i(1,o=c.indent)},t.$$.update=()=>{var c,v,$;if(t.$$.dirty&4097&&(r.group?s[(c=r.groupId)!=null?c:""]||((v=r.group)==null?void 0:v.rootFrame)===r||r.children.filter(M=>!M.group).length>1?i(3,l=!0):i(3,l=!1):i(3,l=!0)),t.$$.dirty&8193)if(u==="absolute")i(5,d=r.time.toLocaleString(void 0,{minimumFractionDigits:3,maximumFractionDigits:3}));else if(u==="proportion")i(5,d=`${(r.proportionOfTotal*100).toLocaleString(void 0,{minimumFractionDigits:1,maximumFractionDigits:1})}%`);else throw new Error("unknown timeFormat");t.$$.dirty&4097&&i(8,n=s[($=r.groupId)!=null?$:""]===!0)},[r,o,a,l,h,d,g,A,n,p,b,F,s,u]}class He extends he{constructor(e){super(),me(this,e,it,tt,K,{frame:0,indent:1})}}const nt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACPTkDJAAAFPklEQVRYCdWXu4skVRSHb3VXP2bcXUVMBkRMTVww2XQDExEEH4iKiUYGhuJEPgJhUSMzQQSDRVzETNDMTTfUwL/ARUwM1t3pV1WX33eqbnfP9MxOu5kHTt9T93F+v3vOubeqi7QhT1+58vhiVn1G19WiaQ6KIqVQOmyT+h9kuUxp2bAAtQkpij9pbw5G5fu/3br1x8ql4NW0+rVJzaN29nop9VUeCtoerXpMTj53g+AGcINR1YB3RIJMN6dIxd/luLxcZoftzltwAct+SiNGh2jJ84BnSQWJTeBNW2C0ZrvufrZA5y2JmuemWkfCjYq5IsC6q2iE2V0LuDdMaYxKZDxo+yS3JZkEY+5SsAU7P5q1qZNEAxnXGo0NubomQM4dWPnCMA
|
||
|
|
</script>
|
||
|
|
<style>@import"https://fonts.googleapis.com/css?family=Source+Code+Pro:400,600|Source+Sans+Pro:400,600";html,body{background-color:#303538;color:#fff;padding:0;margin:0}.margins{padding:0 30px}.header.svelte-tewt95{background:#292f32}.row.svelte-tewt95{display:flex;align-items:center}.title.svelte-tewt95{font-size:34px;padding-top:20px;padding-bottom:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:10px;flex:1}.metrics.svelte-tewt95{display:grid;grid-template-columns:auto auto auto auto auto auto;font-size:14px;text-transform:uppercase;grid-gap:1px 8px}.metric-label.svelte-tewt95{font-weight:600;color:#a9abad}.metric-value.svelte-tewt95{color:#737779;margin-right:.5em}.frame.svelte-1aphj50.svelte-1aphj50{font-family:Source Code Pro,Roboto Mono,Consolas,Monaco,monospace;font-size:15px;z-index:0;position:relative;user-select:none}.group-header.svelte-1aphj50.svelte-1aphj50{margin-left:35px}.group-header-button.svelte-1aphj50.svelte-1aphj50{display:inline-block;color:#ffffff94;user-select:none;cursor:default;position:relative}.group-header-button.svelte-1aphj50.svelte-1aphj50:before{position:absolute;left:-3px;right:-3px;top:0px;bottom:-1px;content:"";z-index:-1;background-color:#3b4043}.group-header-button.svelte-1aphj50.svelte-1aphj50:hover:before{background-color:#4a4f54}.group-triangle.svelte-1aphj50.svelte-1aphj50,.frame-triangle.svelte-1aphj50.svelte-1aphj50{width:6px;height:10px;padding-left:6px;padding-right:5px;display:inline-block}.group-triangle.rotate.svelte-1aphj50.svelte-1aphj50,.frame-triangle.rotate.svelte-1aphj50.svelte-1aphj50{transform:translate(6px,4px) rotate(90deg)}.frame-description.svelte-1aphj50.svelte-1aphj50{display:flex}.frame-description.svelte-1aphj50.svelte-1aphj50:hover:before{position:absolute;left:-3px;right:-3px;top:-1px;height:22px;content:"";z-index:-1;background-color:#354759;opacity:.5}.frame-triangle.svelte-1aphj50.svelte-1aphj50{opacity:1}.frame-description.children-visible.svelte-1aphj50 .frame-triangle.svelte-1aphj50{opacity:0}.frame-description.children-visible.svelte-1aphj50:hover .frame-triangle.svelte-1aphj50{opacity:1}.name.svelte-1aphj50.svelte-1aphj50,.time.svelte-1aphj50.svelte-1aphj50,.code-position.svelte-1aphj50.svelte-1aphj50{user-select:text;cursor:default}.application-code.svelte-1aphj50 .name.svelte-1aphj50{color:#5db3ff}.time.svelte-1aphj50.svelte-1aphj50{margin-right:.55em;color:#b8e98685}.code-position.svelte-1aphj50.svelte-1aphj50{color:#ffffff80;text-align:right;margin-left:1em}.visual-guide{top:21px;bottom:0;left:0;width:2px;background-color:#fff;position:absolute;opacity:.08}.frame-description:hover~.visual-guide{opacity:.4}.frame-description:hover~.children .visual-guide{opacity:.1}.app.svelte-1gm5pcf.svelte-1gm5pcf{font-family:Source Sans Pro,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.program.svelte-1gm5pcf.svelte-1gm5pcf{font-size:14px;font-weight:600;margin-bottom:16px;color:#b4b4b4}.program.svelte-1gm5pcf .label.svelte-1gm5pcf{color:#eaeaea;text-transform:uppercase}
|
||
|
|
</style>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
const sessionData = {"start_time": 1701399463.495920,"duration": 1.409879,"sample_count": 428,"program": "proxy_cli.py --config config.yaml --debug","cpu_time": 0.517319,"root_frame": {"function": "_run_once","file_path_short": "asyncio/base_events.py","file_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py","line_no": 1806,"time": 1.409662,"await_time": 1.291243,"is_application_code": false,"children": [{"function": "_run","file_path_short": "asyncio/events.py","file_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/events.py","line_no": 78,"time": 1.406484,"await_time": 1.291243,"is_application_code": false,"children": [{"function": "coro","file_path_short": "starlette/middleware/base.py","file_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/starlette/middleware/base.py","line_no": 65,"time": 1.292728,"await_time": 1.267557,"is_application_code": false,"children": [{"function": "__call__","file_path_short": "starlette/middleware/cors.py","file_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/starlette/middleware/cors.py","line_no": 73,"time": 1.292728,"await_time": 1.267557,"is_application_code": false,"children": [{"function": "__call__","file_path_short": "starlette/middleware/exceptions.py","file_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/starlette/middleware/exceptions.py","line_no": 53,"time": 1.292728,"await_time": 1.267557,"is_application_code": false,"children": [{"function": "__call__","file_path_short": "fastapi/middleware/asyncexitstack.py","file_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py","line_no": 12,"time": 1.292728,"await_time": 1.267557,"is_application_code": false,"children": [{"function": "__call__","file_path_short": "starlette/routing.py","file_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/starlette/routing.py","line_no": 697,"time": 1.292728,"await_time": 1.267557,"is_application_code": false,"children": [{"function": "handle","file_path_short": "starlette/routing.py","file_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/starlette/routing.py","line_no": 265,"time": 1.292728,"await_time": 1.267557,"is_application_code": false,"children": [{"function": "app","file_path_short": "starlette/routing.py","file_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/starlette/routing.py","line_no": 63,"time": 1.292728,"await_time": 1.267557,"is_application_code": false,"children": [{"function": "app","file_path_short": "fastapi/routing.py","file_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/fastapi/routing.py","line_no": 217,"time": 1.292728,"await_time": 1.267557,"is_application_code": false,"children": [{"function": "run_endpoint_function","file_path_short": "fastapi/routing.py","file_path": "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/fastapi/routing.py","line_no": 182,"time": 1.290719,"await_time": 1.267557,"is_application_code": false,"children": [{"function": "embeddings","file_path_short": "proxy_server.py","file_path": "/Users/ishaanjaffer/Github/litellm/litellm/proxy/proxy_server.py","line_no": 797,"time": 1.290719,"await_time": 1.267557,"is_application_code": true,"children": [{"function": "aembedding","file_path_short": "litellm/router.py","file_path": "/Users/ishaanjaffer/Github/litellm/litellm/router.py","line_no": 310,"time": 1.288674,"await_time": 1.267557,"is_application_code": true,"children": [{"function": "aembedding","file_path_short": "litellm/main.py","file_path": "/Users/ishaanjaffer/Github/litellm/litellm/main.py","line_no": 1680,"time": 1.285234,"await_time": 1.267557,"is_application_code": true,"children": [{"function": "aembedding","file_path_short": "litellm/llms/openai.py","file_path": "/
|
||
|
|
;
|
||
|
|
pyinstrumentHTMLRenderer.render(document.getElementById('app'), sessionData);
|
||
|
|
</script>
|
||
|
|
</body>
|
||
|
|
</html>
|
||
|
|
|