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

cube-evaluator

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cube-evaluator

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

URL Formatter Build Status

Cube Evaluator

Obtain data from cube evaluators in a nice format

Installation

Add this to your Gemfile

gem 'cube-evaluator'

and then run

$ bundle

Usage

Configure the cube evaluator client

# use default hostname and port of localhost:1081
$cube_evaluator = Cube::Evaluator.new

# use custom hostname and port
$cube_evaluator = Cube::Evaluator.new 'cube.example.com', 2280

Ask for some metrics

$cube_evaluator.metric(
  :expression => 'sum(request)',
  :start => Time.now - 2592000,
  :stop => Time.now,
  :limit => 10,
  :step => '1minute'
)

The result will be a json encoded Hash with an array of 'times' and the corresponding 'values' like

{ 
  "times" => [
    "2012-07-16T11:40:00.000Z",
    "2012-07-16T11:41:00.000Z",
    "2012-07-16T11:42:00.000Z",
    "2012-07-16T11:43:00.000Z",
    "2012-07-16T11:44:00.000Z",
    "2012-07-16T11:45:00.000Z",
    "2012-07-16T11:46:00.000Z"
  ],
  "values" => [1, 2, 3, 4, 5, 6, 7]}
}

The supported steps are:

  • 10seconds
  • 1minute
  • 5minutes
  • 1hour
  • 1day

For a complete guide on how to use the cube evaluator take a loot at:

https://github.com/square/cube/wiki/Evaluator

TODO

  • Add support for evaluator events and types

FAQs

Package last updated on 23 Jul 2012

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

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