Skip to content

Commit 5f73d6b

Browse files
committed
Performance wip
1 parent d639a76 commit 5f73d6b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

site/src/contexts/ProxyContext.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { getWorkspaceProxies } from "api/api"
33
import { Region } from "api/typesGenerated"
44
import axios from "axios"
55
import { useDashboard } from "components/Dashboard/DashboardProvider"
6+
import { PerformanceObserver } from "perf_hooks"
67
import {
78
createContext,
89
FC,
@@ -85,6 +86,15 @@ export const ProxyProvider: FC<PropsWithChildren> = ({ children }) => {
8586
if (!proxiesResp) {
8687
return
8788
}
89+
90+
window.performance.getEntries().forEach((entry) => {
91+
console.log(entry)
92+
})
93+
const observer = new PerformanceObserver((list, observer) => {
94+
console.log("performance observer", list, observer)
95+
})
96+
97+
observer.observe({ entryTypes: ["http2", "http"] })
8898
}, [proxiesResp])
8999

90100
const setAndSaveProxy = (

0 commit comments

Comments
 (0)