You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello ,
I am trying to measure the application memory usage when running some OpenCV functions. I tried to use the new API performance.measureUserAgentSpecificMemory() but I get undefined error.
this is how I tried to use it:
if (!window.crossOriginIsolated) {
console.log("performance.measureUserAgentSpecificMemory() is only available in cross-origin-isolated pages");
} else if (!performance.measureUserAgentSpecificMemory) {
console.log("performance.measureUserAgentSpecificMemory() is not available in this browser");
} else {
let result;
try {
result = await performance.measureUserAgentSpecificMemory();
} catch (error) {
if (error instanceof DOMException && error.name === "SecurityError") {
console.log("The context is not secure.");
} else {
throw error;
}
}
console.log(result);
}
if (this._isVisualizable(imageMat)) {
cv.imshow(canvasSource, imageMat.Mat);
return;
}
This code gives me some build time errors and I also have problem with typescript when using this API.
I use webpack and React. Please ask me if you need any further information.
I appreciate some guidance or a better solution.
The text was updated successfully, but these errors were encountered:
Hello ,
I am trying to measure the application memory usage when running some OpenCV functions. I tried to use the new API performance.measureUserAgentSpecificMemory() but I get undefined error.
this is how I tried to use it:
This code gives me some build time errors and I also have problem with typescript when using this API.
I use webpack and React. Please ask me if you need any further information.
I appreciate some guidance or a better solution.
The text was updated successfully, but these errors were encountered: