-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Given that the underlining Jose package performance might fluctuate between releases it might be a good idea to add some tests to block us from doing upgrades or code changes that degrade performance.
Some additional context: cisco/node-jose#335
Proposed implementation:
A simple way of doing this is to measure the number of decrypts/encrypts the library can do for a minutes duration and a comfortable threshold for failing CI when the threshold is unmet.
- Real-world scenario: Encrypting and decrypting A 30kb object (the telemetry snapshot object)
- Basic scenario: Encrypting and decrypting A 1kb object
Node version to use for benchmarking:
Nodejs 12 will automatically adjust the old space size based on the available OS memory. Since we are using version 12 or above in Kibana (and most other users of this package) it makes sense to use nodeJS 12 for running the benchmarks similarly to what we do with running the (unit tests on CI)[https://github.com/elastic/request-crypto/blob/main/.github/workflows/prepare.yml#L17]
It might make sense however to specify the max space size for the node process