Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
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 0 weekly downloads. As such, stats-js popularity was classified as not 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.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.