salesforce / best

:trophy: Delightful Benchmarking & Performance Testing
https://opensource.salesforce.com/best
MIT License
95 stars 10 forks source link

Memory usage tests #205

Open nolanlawson opened 4 years ago

nolanlawson commented 4 years ago

It would be convenient if Best could measure not only CPU time, but also memory usage. I can envision two types of tests here:

  1. Memory leaks – e.g. take a snapshot, repeat some action n times, take another snapshot, diff the two
  2. Absolute memory usage – e.g. take a snapshot at a point in time (maybe after a GC+delay) and report it
nolanlawson commented 4 years ago

Details:

  1. For the leak scenario, I envision taking two heapsnapshot files and comparing them, because that's the most convenient way to figure out what actually leaked
  2. Fo the absolute memory usage scenario, I envision just adding the Chrome/Puppeteer flag that allows precise memory stats and then use window.performance.memory.
nolanlawson commented 4 years ago

Just talked with @diervo, conclusions: