WebAssembly Profiling with pprof and wzprof
11th December 2024
Rajiv Ranjan Singh
Naman Lakhwani
Rajiv Ranjan Singh
Naman Lakhwani
package main
import "fmt"
func main() {
fmt.Println("Hello wzprof!")
}
GOOS=wasip1 GOARCH=wasm go build -o main.wasm main.go
wzprof -sample 1 -memprofile /Users/rajiv.singh/Desktop/hello-wasm/memprofile.out ./main.wasm
wzprof -sample 1 -cpuprofile /Users/rajiv.singh/Desktop/hello-wasm/cpuprofile.out ./main.wasm
12
go tool pprof -http :4001 memprofile.out
go tool pprof -http :6002 cpuprofile.out
Rajiv Ranjan Singh
Naman Lakhwani