)]}'
{"ceilometer/storage/base.py":[{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"82e2ebc0c0ce23257bb2132be045c4fb016760c9","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    :param period: The duration of the period."},{"line_number":38,"context_line":"    \"\"\""},{"line_number":39,"context_line":"    period_start \u003d start"},{"line_number":40,"context_line":"    end +\u003d datetime.timedelta(seconds\u003d1)"},{"line_number":41,"context_line":"    increment \u003d datetime.timedelta(seconds\u003dperiod)"},{"line_number":42,"context_line":"    for i in moves.xrange(int(math.ceil("},{"line_number":43,"context_line":"            timeutils.delta_seconds(start, end)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_77713277","line":40,"updated":"2015-06-19 10:49:21.000000000","message":"that change seems to be a little bit confusing because it increase by hands end time for all backends, probably we need to find solution on sql side. WDYT?","commit_id":"9e69be3fe193836c5e501dccb629e5ba29ef98ab"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"3a18152c3397577c15a7244f5433ec8d91bec7f1","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    :param le: Used for inclusive end."},{"line_number":39,"context_line":"    \"\"\""},{"line_number":40,"context_line":"    period_start \u003d start"},{"line_number":41,"context_line":"    if le:"},{"line_number":42,"context_line":"        end +\u003d datetime.timedelta(seconds\u003d1)"},{"line_number":43,"context_line":"    increment \u003d datetime.timedelta(seconds\u003dperiod)"},{"line_number":44,"context_line":"    for i in moves.xrange(int(math.ceil("}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_2daee898","line":41,"updated":"2015-06-26 09:25:31.000000000","message":"I still prefer to increase end time on sql side, if we manually increase end time we can get samples that are not should be got. But if we are going to increase end time it seems that deltatime should be set for millisecond --- one second is seems to be too much. WDYT?","commit_id":"74ce59d67c60d7ddb8533f17b75fbd11af4484b5"},{"author":{"_account_id":14347,"name":"Aleksey Ripinen","email":"aripinen@mirantis.com","username":"aripinen"},"change_message_id":"a1bfd1af375023f1c57e466e09694a57fea8b65f","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    :param le: Used for inclusive end."},{"line_number":39,"context_line":"    \"\"\""},{"line_number":40,"context_line":"    period_start \u003d start"},{"line_number":41,"context_line":"    if le:"},{"line_number":42,"context_line":"        end +\u003d datetime.timedelta(seconds\u003d1)"},{"line_number":43,"context_line":"    increment \u003d datetime.timedelta(seconds\u003dperiod)"},{"line_number":44,"context_line":"    for i in moves.xrange(int(math.ceil("}],"source_content_type":"text/x-python","patch_set":6,"id":"fa32b979_e12007b3","line":41,"in_reply_to":"fa32b979_2daee898","updated":"2015-06-26 10:51:19.000000000","message":"I agree with you and think that changes on sql side look better. But Gordon has opposite opinion. I think the middle solution is to make possibility to use iter_period with end exclusive or end inclusive ways.\n\nIf the smallest unit of time that we use is millisecond we must set one millisecond to deltatime instead of one second, i agree.","commit_id":"74ce59d67c60d7ddb8533f17b75fbd11af4484b5"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"44d20115e0a90bf71676183ff97eacd203fde2cf","unresolved":false,"context_lines":[{"line_number":26,"context_line":"import ceilometer"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"def iter_period(start, end, period, le\u003dFalse):"},{"line_number":30,"context_line":"    \"\"\"Split a time from start to end in periods of a number of seconds."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    This function yields the (start, end) time for each period composing the"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_fe118554","line":29,"range":{"start_line":29,"start_character":36,"end_line":29,"end_character":44},"updated":"2015-06-26 11:14:08.000000000","message":"additional param is odd solution to me, we add timedelta in iter_period but use it only in sql implementation, so why don\u0027t we use it special for sql backend?","commit_id":"08a24e068a36e838dc9dc01f071f13adae9a2681"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"1323384571eee0c26557316bd603e41f230f1ab9","unresolved":false,"context_lines":[{"line_number":26,"context_line":"import ceilometer"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"def iter_period(start, end, period, le\u003dFalse):"},{"line_number":30,"context_line":"    \"\"\"Split a time from start to end in periods of a number of seconds."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    This function yields the (start, end) time for each period composing the"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba3cc151_8f117e06","line":29,"in_reply_to":"fa32b979_fe118554","updated":"2015-07-02 15:53:31.000000000","message":"to be fair, it\u0027s only because iter_period is only used in sql backend.\n\ngiven the purpose of this method, it should behave the same for all backends (if they use it) so it should be fixed here. or we move this out of common code area.","commit_id":"08a24e068a36e838dc9dc01f071f13adae9a2681"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"44d20115e0a90bf71676183ff97eacd203fde2cf","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    \"\"\""},{"line_number":40,"context_line":"    period_start \u003d start"},{"line_number":41,"context_line":"    if le:"},{"line_number":42,"context_line":"        end +\u003d datetime.timedelta(milliseconds\u003d1)"},{"line_number":43,"context_line":"    increment \u003d datetime.timedelta(seconds\u003dperiod)"},{"line_number":44,"context_line":"    for i in moves.xrange(int(math.ceil("},{"line_number":45,"context_line":"            timeutils.delta_seconds(start, end)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_1cd474bb","line":42,"updated":"2015-06-26 11:14:08.000000000","message":"afaik we store timestamps with microsecond resolution but mongodb for ex. store time only up to millisecond, so additional time less then millisecond will be round in mongodb requests. But the main case is in sql databases so we can add microsecond I think.","commit_id":"08a24e068a36e838dc9dc01f071f13adae9a2681"}],"ceilometer/storage/impl_sqlalchemy.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"4af5be56a5ecb648fecd8d395ddc3bce4bbe69b0","unresolved":false,"context_lines":[{"line_number":743,"context_line":"        for period_start, period_end in base.iter_period("},{"line_number":744,"context_line":"                start_timestamp, end_timestamp, period):"},{"line_number":745,"context_line":"            q \u003d query.filter(models.Sample.timestamp \u003e\u003d period_start)"},{"line_number":746,"context_line":"            q \u003d q.filter(models.Sample.timestamp \u003c period_end)"},{"line_number":747,"context_line":"            for r in q.all():"},{"line_number":748,"context_line":"                if r.count:"},{"line_number":749,"context_line":"                    yield self._stats_result_to_model("}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_11815dc3","line":746,"range":{"start_line":746,"start_character":51,"end_line":746,"end_character":61},"updated":"2015-06-10 06:08:09.000000000","message":"can\u0027t this just be switched to \u003c\u003d period_end\n\ntbh, i\u0027m not sure this is a bug. this is pretty much a question of whether you expect end time to be inclusive or exclusive.\n\nit seems like, for most part, end time is treated as exclusive (as we currently do)[1]. also, to reference the another cloud provider, amazon seems to treat it as exclusive as well.[2]\n\n[1] http://stackoverflow.com/questions/9795391/is-there-a-standard-for-inclusive-exclusive-ends-of-time-intervals\n\n[2] http://docs.aws.amazon.com/cli/latest/reference/cloudwatch/get-metric-statistics.html#options","commit_id":"379d0e6bb7aafb24ece1112362b9428818057d8c"},{"author":{"_account_id":14347,"name":"Aleksey Ripinen","email":"aripinen@mirantis.com","username":"aripinen"},"change_message_id":"9845a432723601a61cd39f96507780770348ed51","unresolved":false,"context_lines":[{"line_number":743,"context_line":"        for period_start, period_end in base.iter_period("},{"line_number":744,"context_line":"                start_timestamp, end_timestamp, period):"},{"line_number":745,"context_line":"            q \u003d query.filter(models.Sample.timestamp \u003e\u003d period_start)"},{"line_number":746,"context_line":"            q \u003d q.filter(models.Sample.timestamp \u003c period_end)"},{"line_number":747,"context_line":"            for r in q.all():"},{"line_number":748,"context_line":"                if r.count:"},{"line_number":749,"context_line":"                    yield self._stats_result_to_model("}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_12f7095a","line":746,"in_reply_to":"3afb71cf_11815dc3","updated":"2015-06-10 14:20:36.000000000","message":"No, i think we can\u0027t switch it to \u003c\u003d because end time of period is treated as exclusive everywhere. But we have possibility to filter timestamp by \u0027le\u0027 operator. In this case all backends except sqlalchemy will assign samples with request end timestamp to individual period with period start time equal request end timestamp. I think it is correct. So sqlalchemy backend must do the same thing.","commit_id":"379d0e6bb7aafb24ece1112362b9428818057d8c"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"600da2ec5c43dac8f9e131d689a3823628ab583f","unresolved":false,"context_lines":[{"line_number":743,"context_line":"        for period_start, period_end in base.iter_period("},{"line_number":744,"context_line":"                start_timestamp, end_timestamp, period):"},{"line_number":745,"context_line":"            q \u003d query.filter(models.Sample.timestamp \u003e\u003d period_start)"},{"line_number":746,"context_line":"            q \u003d q.filter(models.Sample.timestamp \u003c period_end)"},{"line_number":747,"context_line":"            for r in q.all():"},{"line_number":748,"context_line":"                if r.count:"},{"line_number":749,"context_line":"                    yield self._stats_result_to_model("}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_e0a6bb0d","line":746,"in_reply_to":"3afb71cf_12f7095a","updated":"2015-06-11 02:40:33.000000000","message":"i see. can we make the change in iter_period than. (the timedelta change)\n\nthat way we\u0027re consistent with who ever uses that method.","commit_id":"379d0e6bb7aafb24ece1112362b9428818057d8c"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"7c2f5eb5f4440645dc286a58deec8818aec26d4c","unresolved":false,"context_lines":[{"line_number":729,"context_line":"        # portable way to manipulate timestamp in SQL, so we can\u0027t."},{"line_number":730,"context_line":"        start_timestamp \u003d sample_filter.start_timestamp or res.tsmin"},{"line_number":731,"context_line":"        end_timestamp \u003d (sample_filter.end_timestamp or"},{"line_number":732,"context_line":"                         res.tsmax) + datetime.timedelta(seconds\u003d1)"},{"line_number":733,"context_line":"        for period_start, period_end in base.iter_period("},{"line_number":734,"context_line":"                start_timestamp, end_timestamp, period):"},{"line_number":735,"context_line":"            q \u003d query.filter(models.Sample.timestamp \u003e\u003d period_start)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_92bc81bc","line":732,"updated":"2015-06-23 15:42:04.000000000","message":"i have opposite opinion of Igor, i still think this delta should be applied on iter_period side... it is not a sql backend only issue. it just so happens that sql is the only user of iter_period currently.\n\nthat said, you will need to fix the iter_period test to get it passing.","commit_id":"3599db6a4f2ec9331cf12786a4fcbb92d6d48316"}]}
