Page tree

SAYMON документация

Skip to end of metadata
Go to start of metadata

Sometimes you need a little more then just "a graph by the numeric metric from Data table". In these cases we usually offer to try mathematical operations for metrics from one or different objects, which can help you to plot graphs for:

  • the total CPU load of several hosts, e.g. the main and backup;
  • the ratio of successful transactions to their total number;
  • the revenue difference in two stores;
  • the sinusoid of temperature on the Moon;
  • and much-much more...

Creating a graph based on mathematical operations is similar to adding a new graph. You just need to select the necessary metrics from the list, use the ordinary operations, parentheses and constants like this:

Below is the list of all available operators and functions.

f(), x.yFunction call, property access
+, -, not, sqrt, etc.Unary prefix operators (see below for the full list)
*, /, %Multiplication, division, remainder
+, -, ||Addition, subtraction, concatenation
==, !=, >=, <=, >, <Equals, not equals, etc.
andLogical AND
orLogical OR
x ? y : zTernary conditional (if x then y else z)
+xUnary plus. This converts it's operand to a number, but has no other effect.
x!Factorial (x * (x-1) * (x-2) * … * 2 * 1). gamma(x + 1) for non-integers.
abs xAbsolute value (magnatude) of x
acos xArc cosine of x (in radians)
acosh xHyperbolic arc cosine of x (in radians)
asin xArc sine of x (in radians)
asinh xHyperbolic arc sine of x (in radians)
atan xArc tangent of x (in radians)
atanh xHyperbolic arc tangent of x (in radians)
ceil xCeiling of x — the smallest integer that’s >= x
cos xCosine of x (x is in radians)
cosh xHyperbolic cosine of x (x is in radians)
exp xe^x (exponential/antilogarithm function with base e)
floor xFloor of x — the largest integer that’s <= x
length xString length of x
ln xNatural logarithm of x
log xNatural logarithm of x (synonym for ln, not base-10)
log10 xBase-10 logarithm of x
not xLogical NOT operator
round xX, rounded to the nearest integer, using "gradeschool rounding"
sin xSine of x (x is in radians)
sinh xHyperbolic sine of x (x is in radians)
sqrt xSquare root of x. Result is NaN (Not a Number) if x is negative.
tan xTangent of x (x is in radians)
tanh xHyperbolic tangent of x (x is in radians)
trunc xIntegral part of a X, looks like floor(x) unless for negative number
random(n)Get a random number in the range [0, n). If n is zero, or not provided, it defaults to 1.
min(a,b,…)Get the smallest (minimum) number in the list
max(a,b,…)Get the largest (maximum) number in the list
hypot(a,b)Hypotenuse, i.e. the square root of the sum of squares of its arguments.
pyt(a, b)Alias for hypot
pow(x, y)Equivalent to x^y. For consistency with JavaScript's Math object.
atan2(y, x)Arc tangent of x/y. i.e. the angle between (0, 0) and (x, y) in radians.
if(c, a, b)Function form of c ? a : b

  • No labels