
Product
Socket Now Protects the Chrome Extension Ecosystem
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
This class provides a simple info box that will help you monitor your code performance.
var stats = new Stats();
stats.setMode(1); // 0: fps, 1: ms
// Align top-left
stats.domElement.style.position = 'absolute';
stats.domElement.style.left = '0px';
stats.domElement.style.top = '0px';
document.body.appendChild( stats.domElement );
setInterval( function () {
stats.begin();
// your code goes here
stats.end();
}, 1000 / 60 );
Albeit theorically not as accurate the widget can also be easily inserted to any site using a bookmarklet. Follow the instructions.
2014 08 11 - r12 (2,310 KB, gzip: 1,087 B)
2012 09 01 - r11 (2,243 KB, gzip: 903 B)
build/Stats.js
to build/stats.min.js
.2012 05 10 - r10 (2,243 KB, gzip: 903 B)
.getDomElement()
to .domElement
back..getFps()
, .getFpsMin()
, .getFpsMax()
, .getMs()
, .getMsMin()
, .getMsMax()
..begin()
and .end()
..setMode()
.2012 01 18 - r9 (2,872 KB, gzip: 1,038 KB)
.domElement
to .getDomElement()
.getFps()
, .getFpsMin()
, .getFpsMax()
, .getMs()
, .getMsMin()
, .getMsMax()
.2011 10 16 - r8 (2.670 KB, gzip: 987 B)
2011 10 13 - r7 (4.083 KB, gzip: 1.377 KB)
new Date().getTime()
with Date.now()
.2011 05 28 - r6 (4.103 KB, gzip: 1.384 KB)
2010 09 21 - r5 (3.800 KB)
2010 06 11 - r4 (2.235 KB)
2010 05 12 - r3 (1.241 KB)
position = 'absolute'
.2010 03 01 - r2 (2.177 KB)
2010 02 21 - r1
2009 08 09 - r0
FAQs
JavaScript Performance Monitor
The npm package stats-js receives a total of 3,762 weekly downloads. As such, stats-js popularity was classified as popular.
We found that stats-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.