Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@probe.gl/stats

Package Overview
Dependencies
Maintainers
3
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@probe.gl/stats

Stats object for reporting performance statistics

  • 4.0.7
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created

What is @probe.gl/stats?

@probe.gl/stats is a JavaScript library designed for performance monitoring and statistics collection. It provides tools to track and analyze various metrics, making it useful for performance optimization and debugging in web applications.

What are @probe.gl/stats's main functionalities?

Stat Tracking

This feature allows you to track various statistics, such as frame rates, memory usage, or any custom metrics. The code sample demonstrates how to create a Stats object, increment a frame rate counter, and log the count.

const { Stats } = require('@probe.gl/stats');
const stats = new Stats({id: 'app-stats'});
stats.get('frameRate').incrementCount();
console.log(stats.get('frameRate').count);

Timer

This feature allows you to measure the time taken for specific operations. The code sample shows how to start and end a timer for a 'loadTime' metric and log the last timing.

const { Stats } = require('@probe.gl/stats');
const stats = new Stats({id: 'app-stats'});
stats.get('loadTime').timeStart();
// Perform some operations
stats.get('loadTime').timeEnd();
console.log(stats.get('loadTime').lastTiming);

Aggregated Stats

This feature allows you to aggregate statistics over time. The code sample demonstrates how to add counts to a 'requests' metric and log the total count.

const { Stats } = require('@probe.gl/stats');
const stats = new Stats({id: 'app-stats'});
stats.get('requests').addCount(5);
stats.get('requests').addCount(3);
console.log(stats.get('requests').count);

Other packages similar to @probe.gl/stats

Keywords

FAQs

Package last updated on 02 Mar 2024

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