🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

call-timer

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

call-timer

Function execution timer for checking timing info like min, max, mean or so.

0.1.0
latest
Source
npm
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

⏲️ Call-timer

Small utility library to check function execution time info on browser.

Supports IE9+

Quick Start

function appendChild(index) {
  const div = document.createElement('div');
  div.innerHTML = index.toString();
  document.body.appendChild(div);
}

for (var i = 0; i < 1000; i++) {
  CallTimer.call(appendChild, i);
}

CallTimer.printAll();

Functions

  • CallTimer.call(function, args): Call a function to check its execution time.
  • CallTimer.reset(): Reset all execution time records.
  • CallTimer.printAll(): Print all called function's performance info.
  • CallTimer.print(function | name of function): Print single function's performance info.
  • CallTimer.min(function | name of function): Get minimum execution time of a function.
  • CallTimer.max(function | name of function): Get maximum execution time of a function.
  • CallTimer.median(function | name of function): Get median of execution time of a function.
  • CallTimer.mean(function | name of function): Get mean of execution time of a function.
  • CallTimer.count(function | name of function): Get count of how many times a function called.

FAQs

Package last updated on 12 Jul 2019

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