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

cubed

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cubed - npm Package Compare versions

Comparing version 0.1.0 to 1.1.0

test.js

25

index.js

@@ -7,2 +7,15 @@ /*jshint node:true, laxcomma:true */

function _clean (str) {
str = str.toLowerCase();
// convert all periods and spaces into underscore
// related: https://github.com/square/cube/issues/95
str = str.replace(/[\.\s]/g, '_');
// remove all remaining non-alpha, non-numeric, non-underscore chars
str = str.replace(/[^_a-zA-Z\d:]/g, '');
return str;
}
function CubeBackend (startupTime, config, emitter){

@@ -34,3 +47,3 @@ var self = this;

this.cube.send({
type: counterEvent,
type: _clean(counterEvent),
data: {c: metrics.counters[counterEvent]}

@@ -45,3 +58,3 @@ });

this.cube.send({
type: guageEvent,
type: _clean(guageEvent),
data: {g: metrics.gauges[guageEvent]}

@@ -56,3 +69,3 @@ });

this.cube.send({
type: timerEvent,
type: _clean(timerEvent),
data: {ms: metrics.timer_data[timerEvent]}

@@ -77,3 +90,3 @@ });

this.cube.send({
type: setEvent,
type: _clean(setEvent),
data: {s: _sets[setEvent]}

@@ -91,2 +104,6 @@ });

exports.__test = {
_clean: _clean
};
exports.init = function (startupTime, config, emitter) {

@@ -93,0 +110,0 @@ var instance = new CubeBackend(startupTime, config, emitter);

6

package.json
{
"name": "cubed",
"version": "0.1.0",
"description": "a super-simple backend for statsd; relays statsd events to a cube instance via udp",
"version": "1.1.0",
"description": "a super simple backend for statsd; relays statsd events to a cube instance via udp",
"main": "index.js",
"scripts": {
"test": ""
"test": "node test"
},

@@ -9,0 +9,0 @@ "dependencies": {

@@ -73,3 +73,3 @@ cubed

cube automatically manages the `keiju_metrics` colleciton. the following evaluator request would sum the received counts at 1 minute intervals (remember: cube's evaluator uses [fixed resolution times](https://github.com/square/cube/wiki/Evaluator)).
cube automatically manages the related `keiju_metrics` colleciton. the following evaluator request would sum the received counts at 1 minute intervals (remember: cube's evaluator uses [fixed resolution times](https://github.com/square/cube/wiki/Evaluator)).

@@ -101,7 +101,18 @@ ```

## namespacing statsd -> cube
in statsd, periods are used to namespace events. unfortunately, cube [does not (yet) support periods](https://github.com/square/cube/issues/95) in event names though they are [valid collection names](http://docs.mongodb.org/manual/faq/developers/). (hopefully this is patched soon...)
for now, all periods (and spaces) are converted to underscores. then, all non-alphanumeric or non-underscore characters are removed.
## tests
coming soon? use with caution.
work in progress. use with caution.
```
npm test
```
## no tcp?

@@ -114,4 +125,6 @@

the future of cube and statsd is uncertain. indeed, that is the fate of all software. however, at present, our team has found the cube evaluator to be one of the more robust options available--after you master the slightly unusual [metric expression syntax](https://github.com/square/cube/wiki/Queries#wiki-metric). in addition, statsd is both fast and robust for bursted statistical analysis. they are both also rediculously easy to integrate into node applications or any udp-enabled service.
the future of cube and statsd is uncertain. indeed, that is the fate of all software. however, at present, our team has found the cube evaluator to be one of the more robust options available--after you master the slightly unusual [metric expression syntax](https://github.com/square/cube/wiki/Queries#wiki-metric).
graphite (which uses carbon) is an incredibly powerful solution. however, the ui and authorization strategies need some tlc. installing graphite is a bit rough-and-tumble and an adventure in python package dependencies. as an alternative, we are building rubyx (repo link coming soon) -- a stunningly simple node app and modern ui for interacting with cubed stats.
in addition, the recent [infochimps merge](https://github.com/square/cube/pull/129) into `cube/master` has only increased our appreciation for cube and its maintainers. statsd is, as advertised, both fast and robust for bursted statistical analysis. they are both also rediculously easy to integrate into node applications or any udp-enabled service.
graphite (which uses carbon) is an incredibly powerful solution. however, the ui and authorization strategies need some tlc. installing graphite is a bit rough-and-tumble and an adventure in python package dependencies.

Sorry, the diff of this file is not supported yet

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