npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

performance-fps

v1.2.10

Published

Performance check tool for scalable quality project.

Downloads

3

Readme

Performance FPS

⭐️⁉️ New version here (fast, small and functional)

Performance check tool for scalable quality project. Use this tool to check current state of performance based on fps/ms of project during navigation.

Demo

Features

🎲 highly configurable
☮️ dependecy free
📦 only 2kB
🚀 every frame ~0.07ms
⚾ control bouncing effect (increase/decrease perf)
🧟 execute live only on rAF (no internal timing)
🙈 check reset when change tab (visibilitychange)

Getting Started

Supports UMD, AMD and CommonJS format.

With NPM or yarn or download and use script

Clone this repository to generate build or take "performance-fps.min.js" from root

npm i performance-fps
yarn add performance-fps
<script src="performance-fps.min.js" type="text/javascript"></script>

Usage

First instantiate the class

const checkFps = new PerformanceFps();

Push instance with update method on your rAF

const rAF = () => {
	checkFps.update();
	requestAnimationFrame(rAF);
};

Use onChange method to update your code with the performance when level change or check simply properties checkFps.performance in your code when deserve

checkFps.on('change', (e) => {
  this.yourPerformanceLevel = e;
});

Default configuration and Options

You can set all or one of this option with your parameters. This configuration is setting with take balanced speed/quality of checked performance.

Use samples and accuracy to increase the speed and quality of check.

const checkFps = new PerformanceFps({
    min: -2,
    max: 2,
    start: 0,
    samples: 100,
    accuracy: 64,
    delay: 2000,
    maxFps: 60,
    minFps: 30,
    checkFps: 54,
    upperCheckFps: 58,
    maxTryToUpper: 1,
    reCheckAfter: false,
});

Options | Default | Unit | Info --- | --- | --- | --- min| -2 | level | use this option to limit min level of performance returned max| 2 | level | use this option to limit max level of performance returned start| 0 | level | start value of level samples| 100 | - | used to take the average of fps, more (not much) samples make the average more accurate but increase the time to check, one sample take every ms value on accuracy option accuracy| 64 | ms | time between every samples, more time less quality of check, this depends on current performance, if you have ~16ms/60fps the sample is taken every ~64ms delay| 2000 | ms | start to check after this value maxFps| 60 | fps | change if limit is upper than 60fps minFps| 30 | fps | if current performance is lower a minimum level of performance is setted checkFps| 54 | fps | limit of check, if lower decrease the level upperCheckFps| 58 | fps | check update with this value to try upper level maxTryToUpper| 1 | times | used to try to increase value if check fail more than 1 times reCheckAfter| false | ms | after this time start recheck (and try to increase value)

Next features and improvements

An external GUI with check properties to get configuration more simply and realtime for single project.

Motivation

It allows to make the project usable on different devices, able to make scalable and more adaptive to device.

Author

William Manco @ https://twitter.com/williammanco

License

MIT