.conf25 registration is now open!Register today

 size()

On this page

Counts the number of metrics in each MTS in the input stream

 Syntax

 Aggregation

size([by=grp])

 Parameter definitions

ParameterTypeDescription
allow_missingbooleanOptional. False by default. See Handling missing metadata for more details.
by=<grp>a string or list of stringsOptional. None by default. Names of properties to group by.

 Transformation

size([over=duration])

 Parameter definitions

ParameterTypeDescription
overDuration (number and duration units)
Durations are specified as a number followed by a single character:
s: seconds
m: minutes
h: hours
d: days
The default is None.
Optional: Duration over which to get the number of input metrics

Both forms return a data stream.

 Examples

#Aggregation - size by env
data('cpu.utilization').size(by='env')

#Aggregation - size by env and datacenter
data('cpu.utilization').size(by=['env', 'datacenter'])

#Transformation - count all(reporting or not) cpu.utilization timeseries
#in the system
data('cpu.utilization').size(over='1h')