Socket
Socket
Sign inDemoInstall

@speedsters/performance

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@speedsters/performance

A simple way of testing your application performance


Version published
Maintainers
1
Created
Source

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';

/*
 * sperformance.start(@key, @group, @options);
 * @key: The performance name.
 * @group: You can group multiple @keys.
 * @options: { milliseconds } // how long this performance should tale.
 */

/*
 * The start method returns a object and on that
 * object return a stop() method that you can use
 * to stop the performance
*/
const track_a = sperformance.start('initial-loading');
track_a.stop();


// You can just call start/stop as well
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();

FAQs

Package last updated on 17 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc