[Commotion-admin] [mlab-observatory] Adding sample checking module, Telescope data parser (#29)
Peter Boothe
notifications at github.com
Tue Dec 9 17:54:54 EST 2014
> + 'download_throughput' as the value of the 'metric' key.
> + """
> + if metadata['metric_name'] != 'download_throughput':
> + raise ValueError('Results must be for download_throughput metric.')
> +
> + counts_key = self._hash_key_from_metadata(metadata)
> +
> + try:
> + sample_counts_for_key = self.sample_counts[counts_key]
> + except KeyError:
> + self.sample_counts[counts_key] = {}
> + sample_counts_for_key = self.sample_counts[counts_key]
> +
> + aggregated_by_day = aggregate.aggregate_by_day(results)
> + for day, values in aggregated_by_day.iteritems():
> + try:
no try/except, instead:
sample_counts_for_key[day] = sample_counts_for_key.get(day, 0) + len(values)
---
Reply to this email directly or view it on GitHub:
https://github.com/opentechinstitute/mlab-observatory/pull/29/files#r21570328
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chambana.net/pipermail/commotion-admin/attachments/20141209/9094cbab/attachment-0001.html>
More information about the Commotion-admin
mailing list