SignalFx Developers Guide

pow()

Calculates the power of the input.

Syntax

pow(inputstream, exponent)

Table 1. Parameter definitions
Parameter Type Description

inputstream

stream

An input stream

exponent

Number

The exponent to apply to each value in the input

Returns a new stream object with the inputs raised to exponent.

Examples

1
2
3
4
5
6
#Find the square of the number of requests
num_requests = data('num.requests')
value = pow(num_requests, 2).publish()

#Find the cube of the median across data centers
value = data('num.requests').median(by='datacenter').map(lambda x: pow(x,3)).publish()

© Copyright 2019 SignalFx.

Third-party license information