AWS X-Ray Go SDK introduced benchmarks to identify performance bottlenecks of AWS X-Ray Go SDK codebase. Moreover, benchmarks can be used to identify data races and locking issues. Below are the instructions on how to run AWS X-Ray Go SDK benchmarks using Go commands and makefile.
An example of the benchmark output can be found here.
go test -benchmem -run=^$$ -bench=. ./...
Running below command will generate benchmark_sdk.md for analysis. To avoid excessive logging change the loglevel to LogLevelError.
make benchmark_sdk
Running below command will generate benchmark_xray_mem.md for analysis.
make benchmark_xray_mem
Running below command will generate benchmark_xray_cpu.md for analysis.
make benchmark_xray_cpu