Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simpler API for allocation tracking #8

Open
samreid opened this issue Jun 24, 2014 · 0 comments
Open

Simpler API for allocation tracking #8

samreid opened this issue Jun 24, 2014 · 0 comments

Comments

@samreid
Copy link
Member

samreid commented Jun 24, 2014

The current rules for allocation tracking are:

/**
 * 1. Run the sim and set up the scenario that you wish to profile
 * 2. In the JS console, type: window.alloc={}
 * 3. Wait until you have taken enough data
 * 4. Type x = window.alloc; delete window.alloc;
 *
 * Now you can inspect the x variable which contains the allocation information.
 */

I think it would be simpler if we made the made the api more like:

/**
 * 1. Run the sim and set up the scenario that you wish to profile
 * 2. In the JS console, type: window.recordAllocations = true;
 * 3. Wait until you have taken enough data
 * 4. Type window.recordAllocations = false;
 *
 * Now you can inspect window.allocations.
 */

If we cannot add ES5 get/set onto window, then functions could be used instead.

We should also provide reports by frequency (not by count) so that different runs can easily be compared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant