-
Notifications
You must be signed in to change notification settings - Fork 524
Cube
greko edited this page Sep 12, 2023
·
10 revisions
Wiki ▸ API Reference ▸ Cube
A source for Cube metrics. To create a source, first create a context. Then, use context.cube to specify the URL of the Cube evaluator. For example:
var context = cubism.context(), // a default context
cube = context.cube("http://cube.example.com");
# cube.metric(expression)
Creates a new metric for the given Cube expression. For example, if you were using Cube to collect "request" events, you could query the number of request events by saying:
var requests = cube.metric("sum(request)");
For more information on metric expressions, see Cube's documentation.
# cube.toString()
Returns the URL of the Cube server; the first argument to the constructor.