Created
January 11, 2022 11:44
-
-
Save voltbit/1e1097e6400638334e11da52fefcd5d4 to your computer and use it in GitHub Desktop.
prom-client benchmark 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ node index.js | |
# Benchmark Regression | |
## Installing baseline packages | |
http fetch GET 200 https://registry.npmjs.org/prom-client 190ms | |
http fetch GET 200 https://registry.npmjs.org/prom-client/-/prom-client-14.0.1.tgz 70ms | |
+ prom-client@14.0.1 | |
added 3 packages from 3 contributors and audited 3 packages in 0.616s | |
found 0 vulnerabilities | |
## Starting benchmark suite | |
### Progress: | |
- registry ➭ getMetricsAsJSON#1 with 64 ➭ current x 2,216 ops/sec ±8.01% (73 runs sampled) | |
- registry ➭ getMetricsAsJSON#1 with 64 ➭ prom-client@latest x 2,328 ops/sec ±9.11% (77 runs sampled) | |
- registry ➭ getMetricsAsJSON#2 with 8 ➭ current x 1,942 ops/sec ±6.52% (74 runs sampled) | |
- registry ➭ getMetricsAsJSON#2 with 8 ➭ prom-client@latest x 2,017 ops/sec ±7.12% (73 runs sampled) | |
- registry ➭ getMetricsAsJSON#2 with 4 and 2 with 2 ➭ current x 1,628 ops/sec ±5.94% (75 runs sampled) | |
- registry ➭ getMetricsAsJSON#2 with 4 and 2 with 2 ➭ prom-client@latest x 1,743 ops/sec ±5.52% (78 runs sampled) | |
- registry ➭ getMetricsAsJSON#2 with 2 and 2 with 4 ➭ current x 1,656 ops/sec ±7.05% (74 runs sampled) | |
- registry ➭ getMetricsAsJSON#2 with 2 and 2 with 4 ➭ prom-client@latest x 1,679 ops/sec ±5.93% (76 runs sampled) | |
- registry ➭ getMetricsAsJSON#6 with 2 ➭ current x 1,541 ops/sec ±2.75% (76 runs sampled) | |
- registry ➭ getMetricsAsJSON#6 with 2 ➭ prom-client@latest x 1,432 ops/sec ±9.39% (75 runs sampled) | |
- registry ➭ metrics#1 with 64 ➭ current x 2,157 ops/sec ±9.11% (61 runs sampled) | |
- registry ➭ metrics#1 with 64 ➭ prom-client@latest x 2,081 ops/sec ±8.92% (72 runs sampled) | |
- registry ➭ metrics#2 with 8 ➭ current x 1,984 ops/sec ±6.70% (73 runs sampled) | |
- registry ➭ metrics#2 with 8 ➭ prom-client@latest x 2,165 ops/sec ±5.73% (77 runs sampled) | |
- registry ➭ metrics#2 with 4 and 2 with 2 ➭ current x 1,641 ops/sec ±5.75% (77 runs sampled) | |
- registry ➭ metrics#2 with 4 and 2 with 2 ➭ prom-client@latest x 1,816 ops/sec ±5.73% (77 runs sampled) | |
- registry ➭ metrics#2 with 2 and 2 with 4 ➭ current x 1,720 ops/sec ±7.13% (75 runs sampled) | |
- registry ➭ metrics#2 with 2 and 2 with 4 ➭ prom-client@latest x 1,733 ops/sec ±5.11% (77 runs sampled) | |
- registry ➭ metrics#6 with 2 ➭ current x 1,464 ops/sec ±4.92% (74 runs sampled) | |
- registry ➭ metrics#6 with 2 ➭ prom-client@latest x 1,601 ops/sec ±5.55% (77 runs sampled) | |
- histogram ➭ observe#1 with 64 ➭ current x 48,806 ops/sec ±0.95% (91 runs sampled) | |
- histogram ➭ observe#1 with 64 ➭ prom-client@latest x 47,186 ops/sec ±0.87% (89 runs sampled) | |
- histogram ➭ observe#2 with 8 ➭ current x 17,633 ops/sec ±0.76% (91 runs sampled) | |
- histogram ➭ observe#2 with 8 ➭ prom-client@latest x 17,506 ops/sec ±0.61% (94 runs sampled) | |
- histogram ➭ observe#2 with 4 and 2 with 2 ➭ current x 11,567 ops/sec ±0.91% (86 runs sampled) | |
- histogram ➭ observe#2 with 4 and 2 with 2 ➭ prom-client@latest x 11,262 ops/sec ±1.01% (88 runs sampled) | |
- histogram ➭ observe#2 with 2 and 2 with 4 ➭ current x 11,704 ops/sec ±1.14% (89 runs sampled) | |
- histogram ➭ observe#2 with 2 and 2 with 4 ➭ prom-client@latest x 11,193 ops/sec ±1.39% (83 runs sampled) | |
- histogram ➭ observe#6 with 2 ➭ current x 8,585 ops/sec ±0.93% (88 runs sampled) | |
- histogram ➭ observe#6 with 2 ➭ prom-client@latest x 8,509 ops/sec ±0.83% (85 runs sampled) | |
- gauge ➭ inc ➭ current x 9,773,334 ops/sec ±1.34% (87 runs sampled) | |
- gauge ➭ inc ➭ prom-client@latest x 10,154,287 ops/sec ±1.33% (87 runs sampled) | |
- gauge ➭ inc with labels ➭ current x 12,677 ops/sec ±0.95% (88 runs sampled) | |
- gauge ➭ inc with labels ➭ prom-client@latest x 12,415 ops/sec ±0.88% (86 runs sampled) | |
- summary ➭ observe#1 with 64 ➭ current x 44,050 ops/sec ±0.68% (93 runs sampled) | |
- summary ➭ observe#1 with 64 ➭ prom-client@latest x 40,665 ops/sec ±1.91% (87 runs sampled) | |
- summary ➭ observe#2 with 8 ➭ current x 17,539 ops/sec ±0.88% (89 runs sampled) | |
- summary ➭ observe#2 with 8 ➭ prom-client@latest x 16,814 ops/sec ±1.10% (86 runs sampled) | |
- summary ➭ observe#2 with 4 and 2 with 2 ➭ current x 11,834 ops/sec ±0.78% (91 runs sampled) | |
- summary ➭ observe#2 with 4 and 2 with 2 ➭ prom-client@latest x 10,619 ops/sec ±1.16% (88 runs sampled) | |
- summary ➭ observe#2 with 2 and 2 with 4 ➭ current x 11,381 ops/sec ±1.69% (84 runs sampled) | |
- summary ➭ observe#2 with 2 and 2 with 4 ➭ prom-client@latest x 11,090 ops/sec ±1.25% (90 runs sampled) | |
- summary ➭ observe#6 with 2 ➭ current x 8,401 ops/sec ±1.66% (89 runs sampled) | |
- summary ➭ observe#6 with 2 ➭ prom-client@latest x 8,783 ops/sec ±0.56% (91 runs sampled) | |
### Results: | |
┌────────────────────────────────────────┬────────────────────┬────────────────────┐ | |
│ registry │ current │ prom-client@latest │ | |
├────────────────────────────────────────┼────────────────────┼────────────────────┤ | |
│ getMetricsAsJSON#1 with 64 │ 2215.92426068531 │ 2327.560199851435 │ | |
├────────────────────────────────────────┼────────────────────┼────────────────────┤ | |
│ getMetricsAsJSON#2 with 8 │ 1941.9239940276684 │ 2016.50527377381 │ | |
├────────────────────────────────────────┼────────────────────┼────────────────────┤ | |
│ getMetricsAsJSON#2 with 4 and 2 with 2 │ 1627.9027582937854 │ 1743.1761244851548 │ | |
├────────────────────────────────────────┼────────────────────┼────────────────────┤ | |
│ getMetricsAsJSON#2 with 2 and 2 with 4 │ 1656.2384526846006 │ 1678.9524860575232 │ | |
├────────────────────────────────────────┼────────────────────┼────────────────────┤ | |
│ getMetricsAsJSON#6 with 2 │ 1540.9226436133786 │ 1431.7850809314575 │ | |
├────────────────────────────────────────┼────────────────────┼────────────────────┤ | |
│ metrics#1 with 64 │ 2157.0325422809788 │ 2080.882510190774 │ | |
├────────────────────────────────────────┼────────────────────┼────────────────────┤ | |
│ metrics#2 with 8 │ 1984.049281566069 │ 2164.963511457186 │ | |
├────────────────────────────────────────┼────────────────────┼────────────────────┤ | |
│ metrics#2 with 4 and 2 with 2 │ 1641.429528445338 │ 1815.5857678065322 │ | |
├────────────────────────────────────────┼────────────────────┼────────────────────┤ | |
│ metrics#2 with 2 and 2 with 4 │ 1719.8267871112487 │ 1732.9015902529732 │ | |
├────────────────────────────────────────┼────────────────────┼────────────────────┤ | |
│ metrics#6 with 2 │ 1464.2231850769576 │ 1601.32240366241 │ | |
└────────────────────────────────────────┴────────────────────┴────────────────────┘ | |
┌───────────────────────────────┬────────────────────┬────────────────────┐ | |
│ histogram │ current │ prom-client@latest │ | |
├───────────────────────────────┼────────────────────┼────────────────────┤ | |
│ observe#1 with 64 │ 48806.427273198016 │ 47186.006989744674 │ | |
├───────────────────────────────┼────────────────────┼────────────────────┤ | |
│ observe#2 with 8 │ 17633.133960218358 │ 17506.316772437207 │ | |
├───────────────────────────────┼────────────────────┼────────────────────┤ | |
│ observe#2 with 4 and 2 with 2 │ 11567.27783632107 │ 11261.642721772647 │ | |
├───────────────────────────────┼────────────────────┼────────────────────┤ | |
│ observe#2 with 2 and 2 with 4 │ 11704.325019448524 │ 11193.28209772498 │ | |
├───────────────────────────────┼────────────────────┼────────────────────┤ | |
│ observe#6 with 2 │ 8585.33130165035 │ 8509.377720729944 │ | |
└───────────────────────────────┴────────────────────┴────────────────────┘ | |
┌─────────────────┬────────────────────┬────────────────────┐ | |
│ gauge │ current │ prom-client@latest │ | |
├─────────────────┼────────────────────┼────────────────────┤ | |
│ inc │ 9773334.16582749 │ 10154286.564594084 │ | |
├─────────────────┼────────────────────┼────────────────────┤ | |
│ inc with labels │ 12677.394076461534 │ 12414.547504093343 │ | |
└─────────────────┴────────────────────┴────────────────────┘ | |
┌───────────────────────────────┬────────────────────┬────────────────────┐ | |
│ summary │ current │ prom-client@latest │ | |
├───────────────────────────────┼────────────────────┼────────────────────┤ | |
│ observe#1 with 64 │ 44049.59413435299 │ 40665.06166107419 │ | |
├───────────────────────────────┼────────────────────┼────────────────────┤ | |
│ observe#2 with 8 │ 17538.642150023326 │ 16814.303384673673 │ | |
├───────────────────────────────┼────────────────────┼────────────────────┤ | |
│ observe#2 with 4 and 2 with 2 │ 11833.587014168508 │ 10619.142416450402 │ | |
├───────────────────────────────┼────────────────────┼────────────────────┤ | |
│ observe#2 with 2 and 2 with 4 │ 11380.71661849992 │ 11090.46300560582 │ | |
├───────────────────────────────┼────────────────────┼────────────────────┤ | |
│ observe#6 with 2 │ 8400.704646803346 │ 8783.049320941855 │ | |
└───────────────────────────────┴────────────────────┴────────────────────┘ | |
### Summary: | |
⚠ registry ➭ getMetricsAsJSON#1 with 64 is 5.038% acceptably slower. | |
⚠ registry ➭ getMetricsAsJSON#2 with 8 is 3.841% acceptably slower. | |
⚠ registry ➭ getMetricsAsJSON#2 with 4 and 2 with 2 is 7.081% acceptably slower. | |
⚠ registry ➭ getMetricsAsJSON#2 with 2 and 2 with 4 is 1.371% acceptably slower. | |
✓ registry ➭ getMetricsAsJSON#6 with 2 is 7.622% faster. | |
✓ registry ➭ metrics#1 with 64 is 3.660% faster. | |
⚠ registry ➭ metrics#2 with 8 is 9.118% acceptably slower. | |
✗ registry ➭ metrics#2 with 4 and 2 with 2 is 10.61% slower. | |
⚠ registry ➭ metrics#2 with 2 and 2 with 4 is 0.7602% acceptably slower. | |
⚠ registry ➭ metrics#6 with 2 is 9.363% acceptably slower. | |
✓ histogram ➭ observe#1 with 64 is 3.434% faster. | |
✓ histogram ➭ observe#2 with 8 is 0.7244% faster. | |
✓ histogram ➭ observe#2 with 4 and 2 with 2 is 2.714% faster. | |
✓ histogram ➭ observe#2 with 2 and 2 with 4 is 4.566% faster. | |
✓ histogram ➭ observe#6 with 2 is 0.8926% faster. | |
⚠ gauge ➭ inc is 3.898% acceptably slower. | |
✓ gauge ➭ inc with labels is 2.117% faster. | |
✓ summary ➭ observe#1 with 64 is 8.323% faster. | |
✓ summary ➭ observe#2 with 8 is 4.308% faster. | |
✓ summary ➭ observe#2 with 4 and 2 with 2 is 11.44% faster. | |
✓ summary ➭ observe#2 with 2 and 2 with 4 is 2.617% faster. | |
⚠ summary ➭ observe#6 with 2 is 4.551% acceptably slower. | |
⚠ Benchmarks failed to perform better than the currently published version. | |
- Please determine if the performance changes are expected and acceptable. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment