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

@applitools/monitoring-commons

Package Overview
Dependencies
Maintainers
19
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/monitoring-commons - npm Package Compare versions

Comparing version 1.0.15 to 1.0.17

7

package.json
{
"name": "@applitools/monitoring-commons",
"version": "1.0.15",
"version": "1.0.17",
"description": "",

@@ -37,2 +37,3 @@ "main": "src/monitoring-commons.js",

"devDependencies": {
"@applitools/build-commons": "^1.1.13",
"chai": "^4.2.0",

@@ -42,6 +43,6 @@ "eslint": "^5.16.0",

"eslint-plugin-node": "^8.0.1",
"eslint-plugin-prettier": "^3.1.0",
"eslint-plugin-prettier": "^3.1.2",
"mocha": "^4.0.1",
"prettier": "^1.18.2"
"prettier": "^1.19.1"
}
}
'use strict'
function makeTiming({parentPerformance = undefined} = {}) {
function makeTiming({parentPerformance = undefined, nowService = Date.now} = {}) {
const performance = parentPerformance || {}

@@ -14,7 +14,9 @@

function timeItAsync(name, f) {
const start = Date.now()
const start = nowService()
return f().then(
v => ((performance[name] = (performance[name] || 0) + Date.now() - start), v),
v => ((performance[name] = (performance[name] || 0) + Date.now() - start), Promise.reject(v)),
v => ((performance[name] = (performance[name] || 0) + nowService() - start), v),
v => (
(performance[name] = (performance[name] || 0) + nowService() - start), Promise.reject(v)
),
)

@@ -28,14 +30,14 @@ }

* @param {()=>T} f
* @returns
* @returns {T}
*/
function timeIt(name, f) {
const start = Date.now()
const start = nowService()
try {
const ret = f()
performance[name] = (performance[name] || 0) + Date.now() - start
performance[name] = (performance[name] || 0) + nowService() - start
return ret
} catch (err) {
performance[name] = (performance[name] || 0) + Date.now() - start
performance[name] = (performance[name] || 0) + nowService() - start
throw err

@@ -42,0 +44,0 @@ }

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