v8mem-bench

1.0.0 • Public • Published

Mem benchTools

Small and usefull benching function with memory information to bench structures/class on the fly

Allow to test destuctors & find mem leaks.

Rem : the webkit gc() method is requiered to get memory deltas;
It need be activated from the command line using the following switchs :

%chrome path/exec% --enable-precise-memory-info --js-flags="--expose-gc"

or for older chrome version :

%chrome path/exec% --enable-memory-info --js-flags="--expose-gc"




Sample Example :
Samples 4 : 267ms: mem delta : 7.01Mo;
After collect : 2.67Mo
61.911554921540656 % cleaned

How to use ?

Create & destroy the tested object in the bench function, in the right context; Then see if garbage collect clean them well.

Readme

Keywords

none

Package Sidebar

Install

npm i v8mem-bench

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • caipilabs