examples

command
v1.8.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

README

Optimizely Go SDK Examples

Examples of client instantiation, datafile management and Feature enabled are provided in main.go

Profiling

Prerequisite:

  1. go get github.com/pkg/profile
  2. DATAFILES_DIR env var has to be set to point to the path where 100_entities.json is located

To get profiles:

  • CPU profile. Execute: go build -ldflags "-X main.ProfileMode=cpu" benchmark/main.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.
  • Memory profile. Execute: go build -ldflags "-X main.ProfileMode=mem" benchmark/main.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.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL