)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"51a4d1fb004752c22b66645af1e8debc06c5b51a","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Aggregation for SQL backend"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Implemented:"},{"line_number":10,"context_line":"* Create a special db in sql-db"},{"line_number":11,"context_line":"* Method for aggregation"},{"line_number":12,"context_line":"* Tests"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAUH%2F%2B1PU%3D","line":10,"updated":"2014-01-21 16:37:55.000000000","message":"A new Table surely?\n\n(As opposed to a new database)","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"7908515505c39a503a69eb87dd153f2e7f8c746f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Aggregation for SQL backend"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Implemented:"},{"line_number":10,"context_line":"* Create a special db in sql-db"},{"line_number":11,"context_line":"* Method for aggregation"},{"line_number":12,"context_line":"* Tests"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAUH%2F%2B1I4%3D","line":10,"in_reply_to":"AAAAUH%2F%2B1PU%3D","updated":"2014-01-21 16:49:57.000000000","message":"Yes, I\u0027ve updated this in new commit","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1c31df1ba737dd17aa59e2c1b006d4fd61112e6f","unresolved":false,"context_lines":[{"line_number":12,"context_line":"* Tests"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"TODOs:"},{"line_number":15,"context_line":"* Usage of aggregated data"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Partially implements base-aggregation"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAUH%2F%2B6uI%3D","line":15,"updated":"2014-01-20 19:36:53.000000000","message":"This commit message needs to be improved :) Per https://wiki.openstack.org/wiki/GitCommitMessages, the commit message should describe the problem that the patch solves, why the patch was implemented in a particular way, etc. Commit messages should not just be a list of the code changes -- since the reviewer can see what the patch touches by looking at the code in the patch.\n\nIn addition, you should not assume that the reviewer knows what the blueprint or bug is about.\n\nI suggest changing the commit message to something like this:\n\n Implement aggregates API resource\n\n Users need a way of ...\n \n Aggregates fill this need by ...\n \n We implement the aggregates resource by ...","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"}],"ceilometer/storage/impl_sqlalchemy.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"51a4d1fb004752c22b66645af1e8debc06c5b51a","unresolved":false,"context_lines":[{"line_number":674,"context_line":"                        groupby\u003dgroupby"},{"line_number":675,"context_line":"                    )"},{"line_number":676,"context_line":""},{"line_number":677,"context_line":"    def aggregate_meter(self, meter_name, type, timestamp):"},{"line_number":678,"context_line":"        # Timestamp is rounded day or hour or smth else depending on type"},{"line_number":679,"context_line":"        if type \u003d\u003d \u0027H\u0027:"},{"line_number":680,"context_line":"            td \u003d datetime.timedelta(hours\u003d1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B1R4%3D","line":677,"updated":"2014-01-21 16:37:55.000000000","message":"Where is aggregate_meter going to be called from?\n\n(apart from the unit test of course)","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"f481a0e649345140e2458f9ca42ed30cbffa1db0","unresolved":false,"context_lines":[{"line_number":674,"context_line":"                        groupby\u003dgroupby"},{"line_number":675,"context_line":"                    )"},{"line_number":676,"context_line":""},{"line_number":677,"context_line":"    def aggregate_meter(self, meter_name, type, timestamp):"},{"line_number":678,"context_line":"        # Timestamp is rounded day or hour or smth else depending on type"},{"line_number":679,"context_line":"        if type \u003d\u003d \u0027H\u0027:"},{"line_number":680,"context_line":"            td \u003d datetime.timedelta(hours\u003d1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BxLo%3D","line":677,"in_reply_to":"AAAAUH%2F%2B1HA%3D","updated":"2014-01-22 10:37:36.000000000","message":"Cool.","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"7908515505c39a503a69eb87dd153f2e7f8c746f","unresolved":false,"context_lines":[{"line_number":674,"context_line":"                        groupby\u003dgroupby"},{"line_number":675,"context_line":"                    )"},{"line_number":676,"context_line":""},{"line_number":677,"context_line":"    def aggregate_meter(self, meter_name, type, timestamp):"},{"line_number":678,"context_line":"        # Timestamp is rounded day or hour or smth else depending on type"},{"line_number":679,"context_line":"        if type \u003d\u003d \u0027H\u0027:"},{"line_number":680,"context_line":"            td \u003d datetime.timedelta(hours\u003d1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B1HA%3D","line":677,"in_reply_to":"AAAAUH%2F%2B1R4%3D","updated":"2014-01-21 16:49:57.000000000","message":"It should be a separate manager. I added to TODO in commit message. I thought that it should be a periodic task but Jay suggested triggering. I\u0027m thinking about this","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"51a4d1fb004752c22b66645af1e8debc06c5b51a","unresolved":false,"context_lines":[{"line_number":702,"context_line":"                            timestamp, timestamp + td, type)"},{"line_number":703,"context_line":"        else:"},{"line_number":704,"context_line":"            self.record_aggregated_statistics(statistic_obj, meter_name,"},{"line_number":705,"context_line":"                                              timestamp, timestamp + td, type)"},{"line_number":706,"context_line":""},{"line_number":707,"context_line":"    @classmethod"},{"line_number":708,"context_line":"    def record_aggregated_statistics(cls, st, meter_name, start, end, type):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B1SM%3D","line":705,"updated":"2014-01-21 16:37:55.000000000","message":"lines 697-705 seem to be a straight copy\u0027n\u0027paste from lines from record_metering_data() with s/_real_record_metering_data/record_aggregated_statistics/ and different args.\n\nCan the logic around checking pool fullness, spawning or calling directly etc. be factored out into a helper method with the function \u0026 args parameterized?","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"f481a0e649345140e2458f9ca42ed30cbffa1db0","unresolved":false,"context_lines":[{"line_number":702,"context_line":"                            timestamp, timestamp + td, type)"},{"line_number":703,"context_line":"        else:"},{"line_number":704,"context_line":"            self.record_aggregated_statistics(statistic_obj, meter_name,"},{"line_number":705,"context_line":"                                              timestamp, timestamp + td, type)"},{"line_number":706,"context_line":""},{"line_number":707,"context_line":"    @classmethod"},{"line_number":708,"context_line":"    def record_aggregated_statistics(cls, st, meter_name, start, end, type):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BxLk%3D","line":705,"in_reply_to":"AAAAUH%2F%2B1Gg%3D","updated":"2014-01-22 10:37:36.000000000","message":"Thanks!","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"7908515505c39a503a69eb87dd153f2e7f8c746f","unresolved":false,"context_lines":[{"line_number":702,"context_line":"                            timestamp, timestamp + td, type)"},{"line_number":703,"context_line":"        else:"},{"line_number":704,"context_line":"            self.record_aggregated_statistics(statistic_obj, meter_name,"},{"line_number":705,"context_line":"                                              timestamp, timestamp + td, type)"},{"line_number":706,"context_line":""},{"line_number":707,"context_line":"    @classmethod"},{"line_number":708,"context_line":"    def record_aggregated_statistics(cls, st, meter_name, start, end, type):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B1Gg%3D","line":705,"in_reply_to":"AAAAUH%2F%2B1SM%3D","updated":"2014-01-21 16:49:57.000000000","message":"ok, I will try to extract","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":9320,"name":"Dan Dyer","email":"dan.dyer00@gmail.com","username":"dandyer00"},"change_message_id":"a9bd5e12135a34b4b3a52d12fa0303215ab88a4c","unresolved":false,"context_lines":[{"line_number":676,"context_line":""},{"line_number":677,"context_line":"    def aggregate_meter(self, meter_name, type, timestamp):"},{"line_number":678,"context_line":"        # Timestamp is rounded day or hour or smth else depending on type"},{"line_number":679,"context_line":"        if type \u003d\u003d \u0027H\u0027:"},{"line_number":680,"context_line":"            td \u003d datetime.timedelta(hours\u003d1)"},{"line_number":681,"context_line":"        else:"},{"line_number":682,"context_line":"            LOG.warn(\"Skipping aggregation, type is not supported \""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BV5U%3D","line":679,"updated":"2014-01-27 21:21:37.000000000","message":"a type of H is not very clear. Should have some kind of enumeration","commit_id":"3f9527cc3102fbf849c0209638eff5bc73918337"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"e5bcedafe18f6313acc2bd9aac8f9139a7bc1114","unresolved":false,"context_lines":[{"line_number":676,"context_line":""},{"line_number":677,"context_line":"    def aggregate_meter(self, meter_name, type, timestamp):"},{"line_number":678,"context_line":"        # Timestamp is rounded day or hour or smth else depending on type"},{"line_number":679,"context_line":"        if type \u003d\u003d \u0027H\u0027:"},{"line_number":680,"context_line":"            td \u003d datetime.timedelta(hours\u003d1)"},{"line_number":681,"context_line":"        else:"},{"line_number":682,"context_line":"            LOG.warn(\"Skipping aggregation, type is not supported \""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F91gA%3D","line":679,"in_reply_to":"AAAAUH%2F%2BV5U%3D","updated":"2014-02-03 14:04:33.000000000","message":"Thanks for review, Dan. Yes, enum may be ok here. Actually now I\u0027m thinking about stop working on this patch because it will not be helpful in alarming. But I see that you see some use-cases for billing. Could you please share your thoughts?","commit_id":"3f9527cc3102fbf849c0209638eff5bc73918337"},{"author":{"_account_id":7763,"name":"Alexei Kornienko","email":"akornienko@mirantis.com","username":"akornienko"},"change_message_id":"1508ffef9ec4cc26fafc356b0b9790af56a6ad10","unresolved":false,"context_lines":[{"line_number":681,"context_line":"        else:"},{"line_number":682,"context_line":"            LOG.warn(\"Skipping aggregation, type is not supported \""},{"line_number":683,"context_line":"                     \"(only H for now)\")"},{"line_number":684,"context_line":"            return"},{"line_number":685,"context_line":"        statistics \u003d self.get_meter_statistics(storage.SampleFilter("},{"line_number":686,"context_line":"            meter\u003dmeter_name,"},{"line_number":687,"context_line":"            start\u003dtimestamp,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BZPE%3D","line":684,"updated":"2014-01-27 12:15:34.000000000","message":"Question: what types are going to be supported in the future?\nI don\u0027t see any reason to add a parameter that can only have 1 value.","commit_id":"3f9527cc3102fbf849c0209638eff5bc73918337"},{"author":{"_account_id":9320,"name":"Dan Dyer","email":"dan.dyer00@gmail.com","username":"dandyer00"},"change_message_id":"a9bd5e12135a34b4b3a52d12fa0303215ab88a4c","unresolved":false,"context_lines":[{"line_number":681,"context_line":"        else:"},{"line_number":682,"context_line":"            LOG.warn(\"Skipping aggregation, type is not supported \""},{"line_number":683,"context_line":"                     \"(only H for now)\")"},{"line_number":684,"context_line":"            return"},{"line_number":685,"context_line":"        statistics \u003d self.get_meter_statistics(storage.SampleFilter("},{"line_number":686,"context_line":"            meter\u003dmeter_name,"},{"line_number":687,"context_line":"            start\u003dtimestamp,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BV4I%3D","line":684,"in_reply_to":"AAAAUH%2F%2BZPE%3D","updated":"2014-01-27 21:21:37.000000000","message":"A mechanism to generate something like daily usage by metric would be helpful to most billing systems.","commit_id":"3f9527cc3102fbf849c0209638eff5bc73918337"}],"ceilometer/storage/sqlalchemy/migrate_repo/versions/025_add_aggregation_table.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"51a4d1fb004752c22b66645af1e8debc06c5b51a","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        Column(\u0027max\u0027, Integer),"},{"line_number":33,"context_line":"        Column(\u0027avg\u0027, Float),"},{"line_number":34,"context_line":"        Column(\u0027sum\u0027, Integer),"},{"line_number":35,"context_line":"        Column(\u0027count\u0027, Integer),"},{"line_number":36,"context_line":"        Column(\u0027period\u0027, String(255)),"},{"line_number":37,"context_line":"        Column(\u0027meter_name\u0027, String(255)),"},{"line_number":38,"context_line":"        Column(\u0027period_start\u0027, DateTime(timezone\u003dFalse)),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B1Pw%3D","line":35,"updated":"2014-01-21 16:37:55.000000000","message":"So every new aggregate added would require a migration script?\n\nI wonder is this avoidable, by flattening the aggregates (similar to how for example the resource_metadata was flattened).","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"334e1fd1c2d9f9d38ecb7a759b479ebd537bab3b","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        Column(\u0027max\u0027, Integer),"},{"line_number":33,"context_line":"        Column(\u0027avg\u0027, Float),"},{"line_number":34,"context_line":"        Column(\u0027sum\u0027, Integer),"},{"line_number":35,"context_line":"        Column(\u0027count\u0027, Integer),"},{"line_number":36,"context_line":"        Column(\u0027period\u0027, String(255)),"},{"line_number":37,"context_line":"        Column(\u0027meter_name\u0027, String(255)),"},{"line_number":38,"context_line":"        Column(\u0027period_start\u0027, DateTime(timezone\u003dFalse)),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Bxhg%3D","line":35,"in_reply_to":"AAAAUH%2F%2B1Pw%3D","updated":"2014-01-22 09:57:23.000000000","message":"Do you mean \u0027every new statistics type\u0027? Yes, that\u0027s a good idea to have one column for all statistics, will start to work on this","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"f481a0e649345140e2458f9ca42ed30cbffa1db0","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        Column(\u0027max\u0027, Integer),"},{"line_number":33,"context_line":"        Column(\u0027avg\u0027, Float),"},{"line_number":34,"context_line":"        Column(\u0027sum\u0027, Integer),"},{"line_number":35,"context_line":"        Column(\u0027count\u0027, Integer),"},{"line_number":36,"context_line":"        Column(\u0027period\u0027, String(255)),"},{"line_number":37,"context_line":"        Column(\u0027meter_name\u0027, String(255)),"},{"line_number":38,"context_line":"        Column(\u0027period_start\u0027, DateTime(timezone\u003dFalse)),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BxOU%3D","line":35,"in_reply_to":"AAAAUH%2F%2Bxhg%3D","updated":"2014-01-22 10:37:36.000000000","message":"Yeah, I meant adding a new aggregate function (e.g. stddev) to the current set of aggregates (sum, count, max, min, avg).","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"51a4d1fb004752c22b66645af1e8debc06c5b51a","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        Column(\u0027period\u0027, String(255)),"},{"line_number":37,"context_line":"        Column(\u0027meter_name\u0027, String(255)),"},{"line_number":38,"context_line":"        Column(\u0027period_start\u0027, DateTime(timezone\u003dFalse)),"},{"line_number":39,"context_line":"        Column(\u0027period_end\u0027, DateTime(timezone\u003dFalse)),"},{"line_number":40,"context_line":"        mysql_engine\u003d\u0027InnoDB\u0027,"},{"line_number":41,"context_line":"        mysql_charset\u003d\u0027utf8\u0027)"},{"line_number":42,"context_line":"    aggregation.create()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B1Qw%3D","line":39,"updated":"2014-01-21 16:37:55.000000000","message":"Wondering about resource_id, user_id, project_id ... is the issue that the samples can be aggregated across resources?","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"334e1fd1c2d9f9d38ecb7a759b479ebd537bab3b","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        Column(\u0027period\u0027, String(255)),"},{"line_number":37,"context_line":"        Column(\u0027meter_name\u0027, String(255)),"},{"line_number":38,"context_line":"        Column(\u0027period_start\u0027, DateTime(timezone\u003dFalse)),"},{"line_number":39,"context_line":"        Column(\u0027period_end\u0027, DateTime(timezone\u003dFalse)),"},{"line_number":40,"context_line":"        mysql_engine\u003d\u0027InnoDB\u0027,"},{"line_number":41,"context_line":"        mysql_charset\u003d\u0027utf8\u0027)"},{"line_number":42,"context_line":"    aggregation.create()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Bxeo%3D","line":39,"in_reply_to":"AAAAUH%2F%2B1Qw%3D","updated":"2014-01-22 09:57:23.000000000","message":"Thanks for the question! Yes, there are a lot of ways to aggregate samples: across resources, users, fields in metadata. It is called \u0027filtering\u0027 in blueprint and etherpad. It\u0027s impossible to aggregate everything across all of the stuff that\u0027s why I suggest to make this configurable. I think that all \u0027separate\u0027 fields(resource, user, project, source) may be always aggregated  . But to start aggregation across metadata the special config is needed. Anyway, this is a first version and here I don\u0027t aggregate \u0027across\u0027 anything, just base aggregation.","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"27f948c181897fca69769821de8907b9b3115b65","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        Column(\u0027period\u0027, String(255)),"},{"line_number":37,"context_line":"        Column(\u0027meter_name\u0027, String(255)),"},{"line_number":38,"context_line":"        Column(\u0027period_start\u0027, DateTime(timezone\u003dFalse)),"},{"line_number":39,"context_line":"        Column(\u0027period_end\u0027, DateTime(timezone\u003dFalse)),"},{"line_number":40,"context_line":"        mysql_engine\u003d\u0027InnoDB\u0027,"},{"line_number":41,"context_line":"        mysql_charset\u003d\u0027utf8\u0027)"},{"line_number":42,"context_line":"    aggregation.create()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Bw%2B4%3D","line":39,"in_reply_to":"AAAAUH%2F%2BxMI%3D","updated":"2014-01-22 11:18:15.000000000","message":"yes, I think it will work. It is needed to take care of equals() method for SampleFilter. The flow is the follows: user asks statistics with sample filter and we should be able to find the corresponding aggregate in db. I think it is not too difficult to implement.","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"f481a0e649345140e2458f9ca42ed30cbffa1db0","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        Column(\u0027period\u0027, String(255)),"},{"line_number":37,"context_line":"        Column(\u0027meter_name\u0027, String(255)),"},{"line_number":38,"context_line":"        Column(\u0027period_start\u0027, DateTime(timezone\u003dFalse)),"},{"line_number":39,"context_line":"        Column(\u0027period_end\u0027, DateTime(timezone\u003dFalse)),"},{"line_number":40,"context_line":"        mysql_engine\u003d\u0027InnoDB\u0027,"},{"line_number":41,"context_line":"        mysql_charset\u003d\u0027utf8\u0027)"},{"line_number":42,"context_line":"    aggregation.create()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BxMI%3D","line":39,"in_reply_to":"AAAAUH%2F%2Bxeo%3D","updated":"2014-01-22 10:37:36.000000000","message":"Yep, got it (I think).\n\nSo effectively there\u0027s no need to persist these (project, user, resource etc.) attributes with the pre-aggregated stats because if the matching query involves some constraints on those attributes (e.g. resource_id\u003d\u003dINSTANCE1 \u0026\u0026 user_id\u003d\u003djoeschmo) then that will be captured in the \"identity\" of the aggregate, right?","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"c26ffa649a394c3d8bf2c732d2f3cb8ae11241eb","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        Column(\u0027period_end\u0027, DateTime(timezone\u003dFalse)),"},{"line_number":40,"context_line":"        mysql_engine\u003d\u0027InnoDB\u0027,"},{"line_number":41,"context_line":"        mysql_charset\u003d\u0027utf8\u0027)"},{"line_number":42,"context_line":"    aggregation.create()"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"def downgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B1A8%3D","line":42,"updated":"2014-01-21 16:59:56.000000000","message":"Also I\u0027m wondering where the query constraints are persisted?\n\nSay for example two statistics queries on cpu_util for the same hour period are received, one relating to an individual instance, the other relating to *all* instance in an autoscaling group.\n\nHow do we decide which if any of these queries can be satisfied from the aggregation cache?","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"334e1fd1c2d9f9d38ecb7a759b479ebd537bab3b","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        Column(\u0027period_end\u0027, DateTime(timezone\u003dFalse)),"},{"line_number":40,"context_line":"        mysql_engine\u003d\u0027InnoDB\u0027,"},{"line_number":41,"context_line":"        mysql_charset\u003d\u0027utf8\u0027)"},{"line_number":42,"context_line":"    aggregation.create()"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"def downgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BxcY%3D","line":42,"in_reply_to":"AAAAUH%2F%2B1A8%3D","updated":"2014-01-22 09:57:23.000000000","message":"Good point. I just forget about it in sql implementation. It\u0027s done in HBase\u0027 one. I think the easiest way to associate aggregation entry with SampleFilter, what do you think?","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"27f948c181897fca69769821de8907b9b3115b65","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        Column(\u0027period_end\u0027, DateTime(timezone\u003dFalse)),"},{"line_number":40,"context_line":"        mysql_engine\u003d\u0027InnoDB\u0027,"},{"line_number":41,"context_line":"        mysql_charset\u003d\u0027utf8\u0027)"},{"line_number":42,"context_line":"    aggregation.create()"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"def downgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Bw%2Bw%3D","line":42,"in_reply_to":"AAAAUH%2F%2BxL0%3D","updated":"2014-01-22 11:18:15.000000000","message":"Yep. I think this may be related to thread above :)","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"f481a0e649345140e2458f9ca42ed30cbffa1db0","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        Column(\u0027period_end\u0027, DateTime(timezone\u003dFalse)),"},{"line_number":40,"context_line":"        mysql_engine\u003d\u0027InnoDB\u0027,"},{"line_number":41,"context_line":"        mysql_charset\u003d\u0027utf8\u0027)"},{"line_number":42,"context_line":"    aggregation.create()"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"def downgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BxL0%3D","line":42,"in_reply_to":"AAAAUH%2F%2BxcY%3D","updated":"2014-01-22 10:37:36.000000000","message":"So, flattening in the SampleFilter in some way and insert this into your new aggregate table?","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"}],"ceilometer/storage/sqlalchemy/models.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1c31df1ba737dd17aa59e2c1b006d4fd61112e6f","unresolved":false,"context_lines":[{"line_number":432,"context_line":"class Statistics(Base):"},{"line_number":433,"context_line":"    \"\"\"Aggregated statistics.\"\"\""},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"    __tablename__ \u003d \u0027aggregation\u0027"},{"line_number":436,"context_line":""},{"line_number":437,"context_line":"    id \u003d Column(Integer, primary_key\u003dTrue)"},{"line_number":438,"context_line":"    unit \u003d Column(String(255))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B6r4%3D","line":435,"updated":"2014-01-20 19:36:53.000000000","message":"I suggest calling this model \"MeterIntervalAggregate\" and the table as meter_interval_aggregate to fully describe what is stored in the table, which is simply a summary of meter values for a given termporal interval.","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"334e1fd1c2d9f9d38ecb7a759b479ebd537bab3b","unresolved":false,"context_lines":[{"line_number":432,"context_line":"class Statistics(Base):"},{"line_number":433,"context_line":"    \"\"\"Aggregated statistics.\"\"\""},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"    __tablename__ \u003d \u0027aggregation\u0027"},{"line_number":436,"context_line":""},{"line_number":437,"context_line":"    id \u003d Column(Integer, primary_key\u003dTrue)"},{"line_number":438,"context_line":"    unit \u003d Column(String(255))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BxbI%3D","line":435,"in_reply_to":"AAAAUH%2F%2B6r4%3D","updated":"2014-01-22 09:57:23.000000000","message":"I will think about the different name. Just wanted to fix your statement: in table is stored \u0027statistics for filtered samples for a given termporal interval\u0027. In current implementation \u0027filtered\u0027 means filtering by meter_name only. Will enlarge this functionality in the next patches, more filtering will be available","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1c31df1ba737dd17aa59e2c1b006d4fd61112e6f","unresolved":false,"context_lines":[{"line_number":434,"context_line":""},{"line_number":435,"context_line":"    __tablename__ \u003d \u0027aggregation\u0027"},{"line_number":436,"context_line":""},{"line_number":437,"context_line":"    id \u003d Column(Integer, primary_key\u003dTrue)"},{"line_number":438,"context_line":"    unit \u003d Column(String(255))"},{"line_number":439,"context_line":"    min \u003d Column(Integer)"},{"line_number":440,"context_line":"    max \u003d Column(Integer)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B6nA%3D","line":437,"updated":"2014-01-20 19:36:53.000000000","message":"Why make this model use a surrogate primary key? The natural multi-column primary key of (meter_name, period_start, period_end) is more appropriate and gives the added benefit of indexing fields that are used in the queries on the table, providing better performance.","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"334e1fd1c2d9f9d38ecb7a759b479ebd537bab3b","unresolved":false,"context_lines":[{"line_number":434,"context_line":""},{"line_number":435,"context_line":"    __tablename__ \u003d \u0027aggregation\u0027"},{"line_number":436,"context_line":""},{"line_number":437,"context_line":"    id \u003d Column(Integer, primary_key\u003dTrue)"},{"line_number":438,"context_line":"    unit \u003d Column(String(255))"},{"line_number":439,"context_line":"    min \u003d Column(Integer)"},{"line_number":440,"context_line":"    max \u003d Column(Integer)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Bxao%3D","line":437,"in_reply_to":"AAAAUH%2F%2B6nA%3D","updated":"2014-01-22 09:57:23.000000000","message":"hmm, will think about it. But (meter_name, period_start, period_end) is not appropriate because of further filtering. Anyway, thanks for comment, will keep it in mind","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1c31df1ba737dd17aa59e2c1b006d4fd61112e6f","unresolved":false,"context_lines":[{"line_number":442,"context_line":"    sum \u003d Column(Integer)"},{"line_number":443,"context_line":"    count \u003d Column(Integer)"},{"line_number":444,"context_line":"    meter_name \u003d Column(String(255))"},{"line_number":445,"context_line":"    period \u003d Column(String(255))"},{"line_number":446,"context_line":"    period_start \u003d Column(DateTime())"},{"line_number":447,"context_line":"    period_end \u003d Column(DateTime())"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B6mg%3D","line":445,"updated":"2014-01-20 19:36:53.000000000","message":"Remove this column from the table. It is redundant data. It is the \"length of time range covered by these stats\", however that information is entirely able to be calculated from the values of period_start and period_end.","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"334e1fd1c2d9f9d38ecb7a759b479ebd537bab3b","unresolved":false,"context_lines":[{"line_number":442,"context_line":"    sum \u003d Column(Integer)"},{"line_number":443,"context_line":"    count \u003d Column(Integer)"},{"line_number":444,"context_line":"    meter_name \u003d Column(String(255))"},{"line_number":445,"context_line":"    period \u003d Column(String(255))"},{"line_number":446,"context_line":"    period_start \u003d Column(DateTime())"},{"line_number":447,"context_line":"    period_end \u003d Column(DateTime())"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BxZU%3D","line":445,"in_reply_to":"AAAAUH%2F%2B1Mc%3D","updated":"2014-01-22 09:57:23.000000000","message":"I thought of each \u0027Aggregate\u0027 element as about \u0027Statistics\u0027 element. Each Statistics element has duration info, but I was confused about the way of merging this. Will thin about this once more, thank you for pointing on this","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"51a4d1fb004752c22b66645af1e8debc06c5b51a","unresolved":false,"context_lines":[{"line_number":442,"context_line":"    sum \u003d Column(Integer)"},{"line_number":443,"context_line":"    count \u003d Column(Integer)"},{"line_number":444,"context_line":"    meter_name \u003d Column(String(255))"},{"line_number":445,"context_line":"    period \u003d Column(String(255))"},{"line_number":446,"context_line":"    period_start \u003d Column(DateTime())"},{"line_number":447,"context_line":"    period_end \u003d Column(DateTime())"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B1Mc%3D","line":445,"in_reply_to":"AAAAUH%2F%2B6mg%3D","updated":"2014-01-21 16:37:55.000000000","message":"So I guess there are two different temporal aspects here:\n\n1. the span of time covering the period\n\n2. the span of time covering the actual range of samples within the period (i.e. the \"duration\" of the aggregated value)\n\nGenerally #1 subsumes #2, and both period [length, start, end] and duration [length, start, end] are reported by the v2 statistics API.\n\nHence I\u0027m thinking that duration start and length (or start and end)  would have be persisted also, or?","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"}],"ceilometer/tests/test_aggregation.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1c31df1ba737dd17aa59e2c1b006d4fd61112e6f","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    # def tearDown(self):"},{"line_number":29,"context_line":"    #     timeutils.utcnow.override_time \u003d None"},{"line_number":30,"context_line":"    #     super(AggregationTest, self).tearDown()"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def _generate_models(self):"},{"line_number":33,"context_line":"        dates \u003d [datetime.datetime(2013, 10, 18, 11, 45, 00),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B6rk%3D","line":30,"updated":"2014-01-20 19:36:53.000000000","message":"Remove above.","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1c31df1ba737dd17aa59e2c1b006d4fd61112e6f","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        for ad in aggr_dates:"},{"line_number":85,"context_line":"            self.assertEqual(None, self.conn.aggregate_meter(\u0027image\u0027,"},{"line_number":86,"context_line":"                                                             \u0027H\u0027, ad))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B6q4%3D","line":86,"updated":"2014-01-20 19:36:53.000000000","message":"I don\u0027t believe the above test is correct? The expected result is None for each of those dates?\n\nThere needs to be way more detailed tests added to this patch for me to be satisfied that the implementation is really being fully tested.","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"6ffbb0db21facb1cf788e87e0d2d8426abafce09","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        for ad in aggr_dates:"},{"line_number":85,"context_line":"            self.assertEqual(None, self.conn.aggregate_meter(\u0027image\u0027,"},{"line_number":86,"context_line":"                                                             \u0027H\u0027, ad))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B6jA%3D","line":86,"in_reply_to":"AAAAUH%2F%2B6q4%3D","updated":"2014-01-20 19:45:48.000000000","message":"Jay, thanks very much for your comments! I wanted to check that aggregate_meter doesn\u0027t throw exceptions here. Looks like my mind went away when I was writing this assert :) Anyway, I\u0027ve added more specific test in the next patch set that depends on this one. I will work through your other comments tomorrow","commit_id":"1741b76cd448339bb7fcc773bc79ea27bff5cfd6"}]}
