| OLD | NEW |
| 1 # Copyright 2013 The LUCI Authors. All rights reserved. | 1 # Copyright 2013 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed by the Apache v2.0 license that can be | 2 # Use of this source code is governed under the Apache License, Version 2.0 |
| 3 # found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
| 4 | 4 |
| 5 """Framework to handle bookkeeping of statistics generation at the minute level. | 5 """Framework to handle bookkeeping of statistics generation at the minute level. |
| 6 | 6 |
| 7 It implements all the code to update and store results coherently despise | 7 It implements all the code to update and store results coherently despise |
| 8 potential datastore inconsistencies, in a transaction-less and efficient manner. | 8 potential datastore inconsistencies, in a transaction-less and efficient manner. |
| 9 | 9 |
| 10 This framework doesn't gather data by itself. Data harvesting, the actual | 10 This framework doesn't gather data by itself. Data harvesting, the actual |
| 11 measurements saved and presentations must be supplied by the user. | 11 measurements saved and presentations must be supplied by the user. |
| 12 """ | 12 """ |
| 13 | 13 |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 'hours': _get_hours_keys, | 698 'hours': _get_hours_keys, |
| 699 'minutes': _get_minutes_keys, | 699 'minutes': _get_minutes_keys, |
| 700 } | 700 } |
| 701 keys = mapping[resolution](handler, now, num_items) | 701 keys = mapping[resolution](handler, now, num_items) |
| 702 if as_dict: | 702 if as_dict: |
| 703 return [ | 703 return [ |
| 704 i.get_result() for i in _get_snapshot_as_dict_future(keys) | 704 i.get_result() for i in _get_snapshot_as_dict_future(keys) |
| 705 if i.get_result() | 705 if i.get_result() |
| 706 ] | 706 ] |
| 707 return [i for i in ndb.get_multi(keys) if i] | 707 return [i for i in ndb.get_multi(keys) if i] |
| OLD | NEW |