Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a test harness for benchmarking different integration examples
**Why?** Establish a baseline for how farmOS-map performs with the current 1.x build. This will make it possible to tell whether proposed future changes make farmOS-map's performance better or worse. ```sh $ npm test > [email protected] test > rm -rf **/perfData/* && jest test/index.spec.js --maxWorkers=1 PASS test/index.spec.js (424.522 s) simple-html-consumer ✓ should build (4376 ms) get metrics from 10 perf.test.js runs ✓ simple-html-consumer run #0 (42571 ms) ✓ simple-html-consumer run #1 (41699 ms) ✓ simple-html-consumer run farmOS#2 (42825 ms) ✓ simple-html-consumer run farmOS#3 (41734 ms) ✓ simple-html-consumer run farmOS#4 (41481 ms) ✓ simple-html-consumer run farmOS#5 (41468 ms) ✓ simple-html-consumer run farmOS#6 (41777 ms) ✓ simple-html-consumer run farmOS#7 (42746 ms) ✓ simple-html-consumer run farmOS#8 (42038 ms) ✓ simple-html-consumer run farmOS#9 (41514 ms) console.log { 'simple-html-consumer/DSL-cached': { 'first-contentful-paint': 140.77000000476838, 'nav-to-net-idle': 1031.2737506866456, 'js-resource-count': 7, 'js-resource-total-transfer-bytes': 0, 'js-resource-total-decoded-bytes': 579733 }, 'simple-html-consumer/SlowCPU-uncached': { 'first-contentful-paint': 726.1599999904632, 'nav-to-net-idle': 2035.0393460512162, 'js-resource-count': 7.1, 'js-resource-total-transfer-bytes': 147957, 'js-resource-total-decoded-bytes': 579733 }, 'simple-html-consumer/SlowCPU-cached': { 'first-contentful-paint': 761.460000038147, 'nav-to-net-idle': 2054.859950900078, 'js-resource-count': 7, 'js-resource-total-transfer-bytes': 0, 'js-resource-total-decoded-bytes': 579733 }, 'simple-html-consumer/Unthrottled-uncached': { 'first-contentful-paint': 393.66999995708466, 'nav-to-net-idle': 1427.9229674577714, 'js-resource-count': 7, 'js-resource-total-transfer-bytes': 147957, 'js-resource-total-decoded-bytes': 579733 }, 'simple-html-consumer/Unthrottled-cached': { 'first-contentful-paint': 158.37000000476837, 'nav-to-net-idle': 1033.3836732149125, 'js-resource-count': 7, 'js-resource-total-transfer-bytes': 0, 'js-resource-total-decoded-bytes': 579733 }, 'simple-html-consumer/Regular4G-cached': { 'first-contentful-paint': 158.9699999809265, 'nav-to-net-idle': 1004.0716405630112, 'js-resource-count': 7, 'js-resource-total-transfer-bytes': 0, 'js-resource-total-decoded-bytes': 579733 }, 'simple-html-consumer/Regular4G-uncached': { 'first-contentful-paint': 572.5700000047684, 'nav-to-net-idle': 1704.80444521904, 'js-resource-count': 7, 'js-resource-total-transfer-bytes': 147957, 'js-resource-total-decoded-bytes': 579733 }, 'simple-html-consumer/DSL-uncached': { 'first-contentful-paint': 895.1700000524521, 'nav-to-net-idle': 2440.2575431108476, 'js-resource-count': 7.1, 'js-resource-total-transfer-bytes': 147957, 'js-resource-total-decoded-bytes': 579733 }, 'simple-html-consumer/Regular2G-cached': { 'first-contentful-paint': 152.9400000333786, 'nav-to-net-idle': 1437.0032620191573, 'js-resource-count': 7, 'js-resource-total-transfer-bytes': 0, 'js-resource-total-decoded-bytes': 579733 }, 'simple-html-consumer/Regular2G-uncached': { 'first-contentful-paint': 6737.32999997139, 'nav-to-net-idle': 14372.921477985383, 'js-resource-count': 7, 'js-resource-total-transfer-bytes': 147957, 'js-resource-total-decoded-bytes': 579733 } } at Object.<anonymous> (test/index.spec.js:76:11) Test Suites: 1 passed, 1 total Tests: 11 passed, 11 total Snapshots: 0 total Time: 424.909 s, estimated 521 s Ran all test suites matching /test\/index.spec.js/i. ```
- Loading branch information