SignalFx Developers Guide

pow()

Raise the data in the stream to an exponent or raise a base to an exponent of the stream data. In mathematical terms, pow() can perform either one of these calculations:

1
2
3
4
5
#Return metric^exponent^
result=pow(exponent)

#Return base^metric^
result=pow(base=metric)

Syntax

Invoke the pow method using one of two forms:

Exponent form

pow([exponent])

Table 1. Parameter definitions
Parameter Type Description

exponent

integer

Required: Exponent to apply to the metric timeseries in the input stream

Base form

pow([base=base])

Table 2. Parameter definitions
Parameter Type Description

base

number

Required: Specify as a keyword argument. A value that’s raised by the exponent in each metric in the input stream

Examples

1
2
3
4
5
6
7
#The square of cpu.utilization
data('cpu.utilization').pow(2).publish()

#Raise 2 to value of each metric in the input stream.
#The input metrics have only two values: 0 or 1
#Output will be either 2 or 1
data('zero_or_one_data').pow(base=2).publish()

© Copyright 2019 SignalFx.

Third-party license information