purser
purser copied to clipboard
Revisit perfomance testing
I'm putting performance testing in the backlog for now since it requires digging deeper into node
's and v8
's internals. (and right now the priority is to get the wallet up and running)
The way performance testing is supposed to work is to run through wallet methods (eg: create()
) a large amount of times and average the completion time. This way we can test when adding new features that the wallet creation process remains under a certain `.
Problem is different environments have wildly different results.
Examples (all values in the array
s are in ms
, for a number of 10
runs):
Chrome:
[ 153, 115, 96, 99, 97, 94, 95, 95, 90, 97 ]
Node:
[ 309, 272, 251, 242, 246, 247, 244, 244, 244, 244 ]
Jest:
[ 699, 684, 665, 660, 649, 662, 653, 659, 649, 665 ]
This needs to be investigated further, otherwise we won't be able to rely on these values.
Initially this was attempted during the #8 PR.
I've attached a patch
with the initial code setup so when we revisit this, my work won't be lost / repeated (but since Github doesn't allow patches for some reason, I had to add it to a gist)
https://gist.github.com/rdig/f80a4ca1a4a4d3fbc1c73a6543c8bff6
Might this help: https://benchmarkjs.com/
I just had this in my timeline for some reason.
No idea, but it looks promising.
I'll give it a try at some point.
:+1: