|
| 1 | +# Benchmarks |
| 2 | + |
| 3 | +## How to run |
| 4 | + |
| 5 | +To run your benchmark, just: |
| 6 | +```sh |
| 7 | +$ npm run bench |
| 8 | +``` |
| 9 | + |
| 10 | +The minimum sample size is set to 10 to perform statistical analysis on benchmark, you can re-configure that in `benchmark.js`. |
| 11 | + |
| 12 | +> NOTE: If you're interested in writing benchmark for other APIs, please write a benchmark in the `benchmark/index.js` module. Please refer to the `benchmark/tracer.js` or `benchmark/propagator.js` for more comprehensive examples. |
| 13 | +
|
| 14 | +## Results |
| 15 | + |
| 16 | +### `v0.3.3` release |
| 17 | + |
| 18 | +``` |
| 19 | +Beginning NoopTracerRegistry Benchmark... |
| 20 | + 5 tests completed. |
| 21 | +
|
| 22 | + #startSpan x 731,516,636 ops/sec ±2.57% (20 runs sampled) |
| 23 | + #startSpan:parent x 744,353,590 ops/sec ±3.03% (20 runs sampled) |
| 24 | + #startSpan with attribute x 737,451,332 ops/sec ±3.75% (20 runs sampled) |
| 25 | + #startSpan with 30 attributes x 1,658,688 ops/sec ±1.23% (20 runs sampled) |
| 26 | + #startSpan with 100 attributes x 535,082 ops/sec ±1.55% (20 runs sampled) |
| 27 | +
|
| 28 | +Beginning BasicTracerRegistry Benchmark... |
| 29 | + 5 tests completed. |
| 30 | +
|
| 31 | + #startSpan x 80,633 ops/sec ±3.57% (20 runs sampled) |
| 32 | + #startSpan:parent x 56,228 ops/sec ±2.18% (20 runs sampled) |
| 33 | + #startSpan with attribute x 86,710 ops/sec ±1.80% (20 runs sampled) |
| 34 | + #startSpan with 30 attributes x 36,331 ops/sec ±1.29% (20 runs sampled) |
| 35 | + #startSpan with 100 attributes x 3,549 ops/sec ±3.59% (20 runs sampled) |
| 36 | +
|
| 37 | +Beginning BasicTracerRegistry with SimpleSpanProcessor Benchmark... |
| 38 | + 5 tests completed. |
| 39 | +
|
| 40 | + #startSpan x 74,539 ops/sec ±4.49% (20 runs sampled) |
| 41 | + #startSpan:parent x 48,953 ops/sec ±4.98% (20 runs sampled) |
| 42 | + #startSpan with attribute x 79,686 ops/sec ±2.54% (20 runs sampled) |
| 43 | + #startSpan with 30 attributes x 26,491 ops/sec ±13.68% (20 runs sampled) |
| 44 | + #startSpan with 100 attributes x 2,464 ops/sec ±19.64% (20 runs sampled) |
| 45 | +
|
| 46 | +Beginning BasicTracerRegistry with BatchSpanProcessor Benchmark... |
| 47 | + 5 tests completed. |
| 48 | +
|
| 49 | + #startSpan x 74,974 ops/sec ±3.57% (20 runs sampled) |
| 50 | + #startSpan:parent x 42,390 ops/sec ±20.68% (20 runs sampled) |
| 51 | + #startSpan with attribute x 76,497 ops/sec ±2.93% (20 runs sampled) |
| 52 | + #startSpan with 30 attributes x 33,042 ops/sec ±2.03% (20 runs sampled) |
| 53 | + #startSpan with 100 attributes x 3,459 ops/sec ±4.56% (20 runs sampled) |
| 54 | +
|
| 55 | +
|
| 56 | +Beginning B3Format Benchmark... |
| 57 | + 2 tests completed. |
| 58 | +
|
| 59 | + #Inject x 5,086,366 ops/sec ±3.18% (100 runs sampled) |
| 60 | + #Extract x 4,859,557 ops/sec ±3.80% (100 runs sampled) |
| 61 | +
|
| 62 | +Beginning HttpTraceContext Benchmark... |
| 63 | + 2 tests completed. |
| 64 | +
|
| 65 | + #Inject x 13,660,710 ops/sec ±1.84% (100 runs sampled) |
| 66 | + #Extract x 1,692,010 ops/sec ±0.83% (100 runs sampled) |
| 67 | +``` |
0 commit comments