)]}'
{"ceilometer/api/controllers/v2.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"d09453e1717d333019707c82e9f9c196044be4af","unresolved":false,"context_lines":[{"line_number":384,"context_line":"    @wsme_pecan.wsexpose([Statistics], [Query], int)"},{"line_number":385,"context_line":"    def statistics(self, q\u003d[], period\u003dNone):"},{"line_number":386,"context_line":"        \"\"\"Computes the statistics of the meter events in the time range given."},{"line_number":387,"context_line":"        \"\"\""},{"line_number":388,"context_line":"        kwargs \u003d _query_to_kwargs(q, storage.EventFilter.__init__)"},{"line_number":389,"context_line":"        kwargs[\u0027meter\u0027] \u003d self._id"},{"line_number":390,"context_line":"        f \u003d storage.EventFilter(**kwargs)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B7Cg%3D","line":387,"updated":"2013-02-14 11:12:25.000000000","message":"If you describe the parameters in the method do string, that info is copied to the auto generated docs. Use the field table format, as in the method above. You don\u0027t need to list the types, since we can get that info from WSME.","commit_id":"9e356d21b6a854c06f319936a064f8c2c4da50bb"}],"ceilometer/storage/impl_mongodb.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"dff33d62ef3b5d57f53146ba79b3f75c89ccefc7","unresolved":false,"context_lines":[{"line_number":192,"context_line":"    MAP_STATS_PERIOD \u003d bson.code.Code(\"\"\""},{"line_number":193,"context_line":"    function () {"},{"line_number":194,"context_line":"        var period \u003d %d;"},{"line_number":195,"context_line":"        var period_start \u003d Math.floor(this.timestamp / (1000*period)) * period;"},{"line_number":196,"context_line":"        emit(period_start,"},{"line_number":197,"context_line":"             { min : this.counter_volume,"},{"line_number":198,"context_line":"               max : this.counter_volume,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B%2FDw%3D","line":195,"updated":"2013-02-12 14:28:46.000000000","message":"It seems like the start time for the period needs to take the start time for the query into account, so I can ask for hourly updates starting at a given hour. Right?\n\nSomething like start_time + floor((timestamp - start_time) / period) * period","commit_id":"b23a4a58e343b0eeddd8b3518ce7b02e3f72aeac"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"c246c78079ac9bec39ae92adcf0e0fd132bcf72a","unresolved":false,"context_lines":[{"line_number":192,"context_line":"    MAP_STATS_PERIOD \u003d bson.code.Code(\"\"\""},{"line_number":193,"context_line":"    function () {"},{"line_number":194,"context_line":"        var period \u003d %d;"},{"line_number":195,"context_line":"        var period_start \u003d Math.floor(this.timestamp / (1000*period)) * period;"},{"line_number":196,"context_line":"        emit(period_start,"},{"line_number":197,"context_line":"             { min : this.counter_volume,"},{"line_number":198,"context_line":"               max : this.counter_volume,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B%2BsI%3D","line":195,"in_reply_to":"AAAAM3%2F%2B%2FDw%3D","updated":"2013-02-12 16:57:54.000000000","message":"Done","commit_id":"b23a4a58e343b0eeddd8b3518ce7b02e3f72aeac"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"f50d2a14db90aad33bbec56630929bb0ebb90f62","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        var period \u003d %d;"},{"line_number":195,"context_line":"        var period_first \u003d %d;"},{"line_number":196,"context_line":"        var period_start \u003d period_first"},{"line_number":197,"context_line":"                           + (Math.floor(new Date(this.timestamp.getTime()"},{"line_number":198,"context_line":"                                         - period_first * 1000)"},{"line_number":199,"context_line":"                              / (period * 1000))"},{"line_number":200,"context_line":"                              * period);"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2B89A%3D","line":197,"updated":"2013-02-13 13:17:07.000000000","message":"The uses of \"period\" in this formula seem to cancel out, but I could be reading it wrong. I think the formula might be clearer if the unit conversions were done for the input variables period and period_first when they are initialized above, instead of doing them in the formula.","commit_id":"87b3a1a9f1d3aad00f61ddbec62fe3b4c8dc86cd"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"31c3ead0cd922b28695ba1249e52d6e0b82531d8","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        var period \u003d %d;"},{"line_number":195,"context_line":"        var period_first \u003d %d;"},{"line_number":196,"context_line":"        var period_start \u003d period_first"},{"line_number":197,"context_line":"                           + (Math.floor(new Date(this.timestamp.getTime()"},{"line_number":198,"context_line":"                                         - period_first * 1000)"},{"line_number":199,"context_line":"                              / (period * 1000))"},{"line_number":200,"context_line":"                              * period);"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2B86Y%3D","line":197,"in_reply_to":"AAAAM3%2F%2B89A%3D","updated":"2013-02-13 13:49:10.000000000","message":"Now, they don\u0027t cancel because the inner one is used inside floor(), so that wouldn\u0027t work I think.\nBut you\u0027re right for the s-\u003ems conversion, I\u0027ve simplified in the next patch set.","commit_id":"87b3a1a9f1d3aad00f61ddbec62fe3b4c8dc86cd"}],"ceilometer/storage/impl_sqlalchemy.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"dff33d62ef3b5d57f53146ba79b3f75c89ccefc7","unresolved":false,"context_lines":[{"line_number":433,"context_line":"            return [self._stats_result_to_dict(res, res.tsmin, res.tsmax)]"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"        # HACK(jd) This is an awful method to compute stats by period, but"},{"line_number":436,"context_line":"        # since we\u0027re trying to be SQL agnostic we have to write portable"},{"line_number":437,"context_line":"        # code, so here it is, admire! We\u0027re going to do one request to get"},{"line_number":438,"context_line":"        # stats by period. We would like to use GROUP BY, but there\u0027s no"},{"line_number":439,"context_line":"        # portable way to manipulate timestamp in SQL, so we can\u0027t."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B%2FDE%3D","line":436,"updated":"2013-02-12 14:28:46.000000000","message":"In practice I think we will only support MySQL and PostgreSQL, right? We should investigate options for creating db-specific logic for those in another changeset.","commit_id":"b23a4a58e343b0eeddd8b3518ce7b02e3f72aeac"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"c246c78079ac9bec39ae92adcf0e0fd132bcf72a","unresolved":false,"context_lines":[{"line_number":433,"context_line":"            return [self._stats_result_to_dict(res, res.tsmin, res.tsmax)]"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"        # HACK(jd) This is an awful method to compute stats by period, but"},{"line_number":436,"context_line":"        # since we\u0027re trying to be SQL agnostic we have to write portable"},{"line_number":437,"context_line":"        # code, so here it is, admire! We\u0027re going to do one request to get"},{"line_number":438,"context_line":"        # stats by period. We would like to use GROUP BY, but there\u0027s no"},{"line_number":439,"context_line":"        # portable way to manipulate timestamp in SQL, so we can\u0027t."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B%2BsE%3D","line":436,"in_reply_to":"AAAAM3%2F%2B%2FDE%3D","updated":"2013-02-12 16:57:54.000000000","message":"Agreed.","commit_id":"b23a4a58e343b0eeddd8b3518ce7b02e3f72aeac"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"dff33d62ef3b5d57f53146ba79b3f75c89ccefc7","unresolved":false,"context_lines":[{"line_number":442,"context_line":"        results \u003d []"},{"line_number":443,"context_line":"        for i in range(int(math.ceil("},{"line_number":444,"context_line":"                (res.tsmax - res.tsmin).seconds / float(period)))):"},{"line_number":445,"context_line":"            query \u003d self._make_stats_query(event_filter)"},{"line_number":446,"context_line":"            period_start \u003d (timestart"},{"line_number":447,"context_line":"                            + datetime.timedelta(seconds\u003di * period))"},{"line_number":448,"context_line":"            period_end \u003d period_start + datetime.timedelta(seconds\u003dperiod)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B%2FDc%3D","line":445,"updated":"2013-02-12 14:28:46.000000000","message":"This value can be computed once outside of the loop and reused to make a local filter inside the loop.","commit_id":"b23a4a58e343b0eeddd8b3518ce7b02e3f72aeac"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"c246c78079ac9bec39ae92adcf0e0fd132bcf72a","unresolved":false,"context_lines":[{"line_number":442,"context_line":"        results \u003d []"},{"line_number":443,"context_line":"        for i in range(int(math.ceil("},{"line_number":444,"context_line":"                (res.tsmax - res.tsmin).seconds / float(period)))):"},{"line_number":445,"context_line":"            query \u003d self._make_stats_query(event_filter)"},{"line_number":446,"context_line":"            period_start \u003d (timestart"},{"line_number":447,"context_line":"                            + datetime.timedelta(seconds\u003di * period))"},{"line_number":448,"context_line":"            period_end \u003d period_start + datetime.timedelta(seconds\u003dperiod)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAM3%2F%2B%2BsA%3D","line":445,"in_reply_to":"AAAAM3%2F%2B%2FDc%3D","updated":"2013-02-12 16:57:54.000000000","message":"Actually that doesn\u0027t work because of the filter just after.","commit_id":"b23a4a58e343b0eeddd8b3518ce7b02e3f72aeac"}]}
