File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -36,4 +36,19 @@ assume the availability of JavaScript to make debugging easier.
36
36
## [ wasm-memprof] ( https://github.com/kateinoigakukun/wasm-memprof )
37
37
38
38
If you are debugging memory leaks, [ wasm-memprof] ( https://github.com/kateinoigakukun/wasm-memprof ) can help you.
39
- It is a tool to profile memory usage of WebAssembly applications with minimal setup. Check the repository for more details.
39
+ It is a tool to profile memory usage of WebAssembly applications with a few lines of setup code:
40
+
41
+ ``` javascript
42
+ import { WMProf } from " wasm-memprof" ;
43
+ import { SwiftDemangler } from " wasm-memprof/plugins/swift-demangler.js" ;
44
+
45
+ const swiftDemangler = SwiftDemangler .create ();
46
+ const WebAssembly = WMProf .wrap (globalThis .WebAssembly , {
47
+ demangler: swiftDemangler .demangle .bind (swiftDemangler),
48
+ });
49
+ ```
50
+
51
+ Check the repository for more details.
52
+
53
+ <img width =" 1000 " alt =" swift-wmprof " src =" https://github.com/user-attachments/assets/c1da4582-e721-45b9-9bca-ce320711f72d " >
54
+
You can’t perform that action at this time.
0 commit comments