New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bttostatsv

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bttostatsv - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

22

lib/pickMetrics.js

@@ -13,7 +13,7 @@ 'use strict';

/**
* Get the metrics we want from Browsertime.
* @param {Object} browsertimeJSON The raw Browsertime JSON.
* @param {String} namespace The graphite namespace pre-pend to all keys.
* @return {Array} An array of Strings with the complete metric and value in statsv format.
*/
* Get the metrics we want from Browsertime.
* @param {Object} browsertimeJSON The raw Browsertime JSON.
* @param {String} namespace The graphite namespace pre-pend to all keys.
* @return {Array} An array of Strings with the complete metric and value in statsv format.
*/
get: function( browsertimeJSON, namespace ) {

@@ -29,3 +29,7 @@ const myMetrics = [];

'visualMetrics.LastVisualChange',
'visualMetrics.PerceptualSpeedIndex'
'visualMetrics.PerceptualSpeedIndex',
'cpu.category.rendering',
'cpu.category.scripting',
'cpu.category.loading',
'cpu.category.painting'
];

@@ -35,3 +39,7 @@ for ( const metric of metricsToCollect ) {

const value = get( browsertimeJSON, `statistics.${metric}.${type}` );
myMetrics.push( `${namespace}.${metric}.${type}=${value.toFixed( 0 )}ms` );
if ( value ) {
myMetrics.push(
`${namespace}.${metric}.${type}=${value.toFixed( 0 )}ms`
);
}
}

@@ -38,0 +46,0 @@ }

{
"name": "bttostatsv",
"version": "0.0.1",
"version": "0.0.2",
"bin": "./bin/index.js",
"description": "Send Browsertime metrics to statsv",
"keywords": ["browsertime", "performance", "statsv"],
"keywords": [
"browsertime",
"performance",
"statsv"
],
"homepage": "https://github.com/soulgalore/bttostatsv",

@@ -13,3 +17,6 @@ "license": "Apache-2.0",

},
"files": ["bin", "lib"],
"files": [
"bin",
"lib"
],
"scripts": {

@@ -16,0 +23,0 @@ "test": "eslint . && ava"

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