Closed stfp closed 12 years ago
This adds support for regular expression in aggregations keys.
Use it by specifying a (name, regex) tuple as the key in an aggregator definition, ie:
agg = aggregation.Aggregation({ 'http_hits' : { ('ok', re.compile("[1-3][0-9][0-9]")): [aggregation.Sum(dataFormat=aggregation.DataFormats.DIRECT)], ('err', re.compile("[4-5][0-9][0-9]")): [aggregation.Sum(dataFormat = aggregation.DataFormats.DIRECT)] }})
This would sum successful and failed hits separately.
Looks good to me, but can you add this to the doc strings?
This adds support for regular expression in aggregations keys.
Use it by specifying a (name, regex) tuple as the key in an aggregator definition, ie:
This would sum successful and failed hits separately.