SignalFx Developers Guide

pow()

Calculates the power of the input.

Syntax

pow(input, power)

Table 1. Parameter definitions
Parameter Type Description

input

stream

An input stream

power

Number

The exponent to apply to each value in the input

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

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 datacenters
value = data('num.requests').median(by='datacenter').map(lambda x: pow(x,3)).publish()

© Copyright 2019 SignalFx.

Third-party license information