Speedsters
A simple way of tracking your javascript app speed.
SETUP
In your main/root js file import @speedsters/react
and initiate the connection.
import sperformance from '@speedsters/performance';
const connectionOptions = {
name: 'My Application name',
};
sperformance.connect(connectionOptions);
Start/Stop a performance
Once you've connected you're ready to go.
import sperformance from '@speedsters/performance';
const track_a = sperformance.start('initial-loading');
track_a.stop();
const homePageGroupKeyName = 'home-page';
sperformance.start('loop-data', homePageGroupKeyName);
sperformance.stop('loop-data-2', homePageGroupKeyName);
const track_c = sperformance.start('page-transition', homePageGroupKeyName, {
milliseconds: 1000,
});
track_c.stop();
const track_d = sperformance.start('image-load', null, {
milliseconds: 2000,
});
track_d.stop();