You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The profiler should be able to profile a certain section of code.
Currently you would have to wrap it into a function and call that:
// some code
profiler.registerFN(() => {
// some complex code that should get profiled
}, 'mySection') ();
// some code
Because you can't just drop-in section profiling I suggest one of the following alternatives:
// some code
const end = profiler.start('mySection');
// some complex code that should get profiled
end(); // maybe even return profiling data for this section
// some code
or
// some code
profiler.start('mySection');
// some complex code that should get profiled
profiler.end('mySection'); // maybe even return profiling data for this section
// some code
Once this is implemented it should probably also be used internally to wrap functions.
The text was updated successfully, but these errors were encountered:
This might have some value in terms of checking specific areas of code, but I think that profiling functions is more important. It's more likely that you have an expensive function that is called in several different areas of your app.
I'm not opposed to adding this additional api, but I'd like to feel out how it would work with wrap and registerFN, also what would this look like in the reports?
The profiler should be able to profile a certain section of code.
Currently you would have to wrap it into a function and call that:
Because you can't just drop-in section profiling I suggest one of the following alternatives:
or
Once this is implemented it should probably also be used internally to wrap functions.
The text was updated successfully, but these errors were encountered: