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
`examples()` shows how to instantiate and execute various versions of Optimizely Clients
11
-
12
-
`stressTest()` is used to stress test our optimizely app and run cpu and memory profiling
13
-
14
-
15
3
### Profiling
16
4
Prerequisite: `go get github.com/pkg/profile`
17
5
18
-
* CPU profile. Execute: `go build -ldflags "-X main.RunCPUProfile=true" main.go && ./main`. It will create cpu.pprof file in your current directory. Then run: `go tool pprof -http=:8080 cpu.pprof` and profile cpu usage using web browser.
19
-
* Memory profile. Execute: `go build -ldflags "-X main.RunMemProfile=true" main.go && ./main`. It will create mem.pprof file in your current directory. Then run: `go tool pprof -http=:8080 mem.pprof` and profile memory using browser.
6
+
* CPU profile. Execute: `go build -ldflags "-X main.RunCPUProfile=true" main_profile_feature.go && ./main_profile_feature`. It will create cpu.pprof file in your current directory. Then run: `go tool pprof -http=:8080 cpu.pprof` and profile cpu usage using web browser.
7
+
* Memory profile. Execute: `go build -ldflags "-X main.RunMemProfile=true" main_profile_feature.go.go && ./main_profile_feature`. It will create mem.pprof file in your current directory. Then run: `go tool pprof -http=:8080 mem.pprof` and profile memory using browser.
0 commit comments