Skip to content

Commit 6cdf29a

Browse files
authored
Added example output of benchmark results (#281)
* Create 1.0.0.md * Update README.md
1 parent 41e2dea commit 6cdf29a

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

benchmark/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Benchmark Instructions for AWS X-Ray Go SDK
22
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.
33

4+
An example of the benchmark output can be found [here](./results/1.0.0.md).
5+
46
## Run all the benchmarks using Go Command
57
```
68
go test -benchmem -run=^$$ -bench=. ./...

benchmark/results/1.0.0.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Example Benchmark Results
2+
3+
The below table contains a formatted output of the benchmarking results for v1.0.0 of the SDK. It was run on a m5.xlarge EC2 instance, with 16 GB of memory and 4 vCPUs.
4+
5+
| Operation | Iterations | Latency | Memory | Allocs |
6+
| --------------------------------------------------- | ------------- | ------------- | ------------- | ----------- |
7+
|BenchmarkGetDaemonEndpoints-4 |3846729 |293 ns/op |144 B/op |5 allocs/op |
8+
|BenchmarkGetDaemonEndpointsFromEnv_DoubleParse-4 |784056 |1544 ns/op |432 B/op |14 allocs/op|
9+
|BenchmarkGetDaemonEndpointsFromEnv_SingleParse-4 |1000000000 |0.000009 ns/op |0 B/op |0 allocs/op
10+
|BenchmarkGetDaemonEndpointsFromString-4 |1000000000 |0.000015 ns/op |0 B/op |0 allocs/op
11+
|BenchmarkFromString-4 |2442208 |492 ns/op |480 B/op |4 allocs/op
12+
|BenchmarkWildcardMatch-4 |47175990 |25.1 ns/op |0 B/op |0 allocs/op
13+
|BenchmarkDefaultFormattingStrategy_Error-4 |676300 |1574 ns/op |496 B/op |4 allocs/op
14+
|BenchmarkDefaultFormattingStrategy_ExceptionFromError-4 |638359 |1875 ns/op |408 B/op |10 allocs/op
15+
|BenchmarkDefaultFormattingStrategy_Panic-4 |269598 |4488 ns/op |1344 B/op |8 allocs/op
16+
|BenchmarkCentralizedManifest_putRule-4 |2163954 |556 ns/op |416 B/op |5 allocs/op
17+
|BenchmarkCentralizedStrategy_ShouldTrace-4 |1520000 |789 ns/op |384 B/op |11 allocs/op
18+
|BenchmarkNewCentralizedStrategy_refreshManifest-4 |2000916 |599 ns/op |112 B/op |2 allocs/op
19+
|BenchmarkCentralizedStrategy_refreshTargets-4 |8582516 |141 ns/op |56 B/op |2 allocs/op
20+
|BenchmarkCentralizedRule_Sample-4 |6970968 |172 ns/op |288 B/op |5 allocs/op
21+
|BenchmarkNewLocalizedStrategyFromJSONBytes-4 |1000000000 |0.000005 ns/op |0 B/op |0 allocs/op
22+
|BenchmarkCapture-4 |465134 |2533 ns/op |681 B/op |12 allocs/op
23+
|BenchmarkClient-4 |1000000000 |0.647 ns/op |0 B/op |0 allocs/op
24+
|BenchmarkConfigure-4 |5442780 |219 ns/op |0 B/op |0 allocs/op
25+
|BenchmarkGetRecorder-4 |100000000 |10.8 ns/op |0 B/op |0 allocs/op
26+
|BenchmarkGetSegment-4 |186037935 |6.45 ns/op |0 B/op |0 allocs/op
27+
|BenchmarkDetachContext-4 |18997809 |62.8 ns/op |48 B/op |1 allocs/op
28+
|BenchmarkAddAnnotation-4 |13307188 |82.8 ns/op |0 B/op |0 allocs/op
29+
|BenchmarkAddMetadata-4 |12797424 |93.2 ns/op |0 B/op |0 allocs/op
30+
|BenchmarkDefaultEmitter_packSegments-4 |1531 |11728896 ns/op |2721945 B/op |50582 allocs/op
31+
|BenchmarkDefaultEmitter-4 |178814 |6600 ns/op |584 B/op |17 allocs/op
32+
|BenchmarkHandler-4 |4251 |274168 ns/op |31603 B/op |247 allocs/op
33+
|BenchmarkBeginSegment-4 |64215 |20233 ns/op |3264 B/op |40 allocs/op
34+
|BenchmarkBeginSubsegment-4 |537710 |2412 ns/op |674 B/op |12 allocs/op
35+
|BenchmarkAddError-4 |481357 |2784 ns/op |931 B/op |5 allocs/op

0 commit comments

Comments
 (0)