)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"6e18f28153c243d9f61003d64254065081ffc579","unresolved":false,"context_lines":[{"line_number":37,"context_line":"Expression evaluation gracefully handles NaNs and exceptions. In such"},{"line_number":38,"context_line":"a case it does not create a new sample but only logs a warning."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Change-Id: I1b637e5b1d1bb15ed3c3d7ec758d2a684eaccf21"},{"line_number":41,"context_line":"Implements: arithmetic-transformer"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"baada198_8ed18f59","line":40,"updated":"2014-07-11 08:35:56.000000000","message":"Change-Id should go last if possible (otherwise it can confuse our wonderful downstream backporting pipeline)","commit_id":"a270aa8bedadaffa87fb5b1ff9fc056abac5a48a"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"53bc54e6ad0a4dd551d0c9c9a9bfb54abebd26fd","unresolved":false,"context_lines":[{"line_number":37,"context_line":"Expression evaluation gracefully handles NaNs and exceptions. In such"},{"line_number":38,"context_line":"a case it does not create a new sample but only logs a warning."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Change-Id: I1b637e5b1d1bb15ed3c3d7ec758d2a684eaccf21"},{"line_number":41,"context_line":"Implements: arithmetic-transformer"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"baada198_0e8adfbe","line":40,"in_reply_to":"baada198_8ed18f59","updated":"2014-07-11 08:52:04.000000000","message":"afaik, change-id should be in the last section and that\u0027s it, so current situation won\u0027t be parsed wrong. Although I also prefer Change-Id as a last line just to be clear :)","commit_id":"a270aa8bedadaffa87fb5b1ff9fc056abac5a48a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"6e18f28153c243d9f61003d64254065081ffc579","unresolved":false,"context_lines":[{"line_number":38,"context_line":"a case it does not create a new sample but only logs a warning."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Change-Id: I1b637e5b1d1bb15ed3c3d7ec758d2a684eaccf21"},{"line_number":41,"context_line":"Implements: arithmetic-transformer"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"baada198_8eea6f0d","line":41,"updated":"2014-07-11 08:35:56.000000000","message":"Are you missing a \"blueprint\" from the tag there?\n\ne.g.\n\n   Implements: blueprint arithmetic-transformer\n\nso that it\u0027s autolinked by gerrit.","commit_id":"a270aa8bedadaffa87fb5b1ff9fc056abac5a48a"},{"author":{"_account_id":8052,"name":"Nejc Saje","email":"nejc@saje.info","username":"nsaje"},"change_message_id":"13073383c817fa7ef80129b641c2dd503afc44f0","unresolved":false,"context_lines":[{"line_number":38,"context_line":"a case it does not create a new sample but only logs a warning."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Change-Id: I1b637e5b1d1bb15ed3c3d7ec758d2a684eaccf21"},{"line_number":41,"context_line":"Implements: arithmetic-transformer"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"baada198_8e134fb7","line":41,"in_reply_to":"baada198_8eea6f0d","updated":"2014-07-11 09:33:38.000000000","message":"Whoops, thanks!","commit_id":"a270aa8bedadaffa87fb5b1ff9fc056abac5a48a"}],"ceilometer/tests/pipeline_base.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"903d6cde0f05be8f53b0bbf7097de801fba3260e","unresolved":false,"context_lines":[{"line_number":1445,"context_line":"        publisher \u003d pipeline_manager.pipelines[0].publishers[0]"},{"line_number":1446,"context_line":"        self.assertEqual(1, len(publisher.samples))"},{"line_number":1447,"context_line":""},{"line_number":1448,"context_line":"    def test_arithmetic_expr_parse(self):"},{"line_number":1449,"context_line":"        expr \u003d \u0027$(cpu) + $(cpu.util)\u0027"},{"line_number":1450,"context_line":"        expected \u003d (\u0027cpu.volume + _cpu_util_ESC.volume\u0027,"},{"line_number":1451,"context_line":"                    {"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_8ee3aba3","line":1448,"updated":"2014-07-16 12:16:58.000000000","message":"Could the 4 separate testcases in test_arithmetic_expr_parse be factored out into 4 tests each of which calls a parameterized _do_test_arithmetic_expr_parse(self, expr, expected) style of method?","commit_id":"9b74839e9fabbb6e0704b8d8039c37da0a342f96"},{"author":{"_account_id":8052,"name":"Nejc Saje","email":"nejc@saje.info","username":"nsaje"},"change_message_id":"28577d4d4ad194eb66724ece5344bed6c72c17b3","unresolved":false,"context_lines":[{"line_number":1445,"context_line":"        publisher \u003d pipeline_manager.pipelines[0].publishers[0]"},{"line_number":1446,"context_line":"        self.assertEqual(1, len(publisher.samples))"},{"line_number":1447,"context_line":""},{"line_number":1448,"context_line":"    def test_arithmetic_expr_parse(self):"},{"line_number":1449,"context_line":"        expr \u003d \u0027$(cpu) + $(cpu.util)\u0027"},{"line_number":1450,"context_line":"        expected \u003d (\u0027cpu.volume + _cpu_util_ESC.volume\u0027,"},{"line_number":1451,"context_line":"                    {"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_0959558e","line":1448,"in_reply_to":"baada198_8ee3aba3","updated":"2014-07-16 12:28:28.000000000","message":"Will do.","commit_id":"9b74839e9fabbb6e0704b8d8039c37da0a342f96"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"bcfef99b65edb8fe16b397214ae71207122473fd","unresolved":false,"context_lines":[{"line_number":1546,"context_line":"        expression \u003d \u0027100.0 * $(memory.usage) / $(memory)\u0027"},{"line_number":1547,"context_line":"        scenario \u003d ["},{"line_number":1548,"context_line":"            dict(name\u003d\u0027memory\u0027, volume\u003d1024.0),"},{"line_number":1549,"context_line":"            dict(name\u003d\u0027memory.usage\u0027, volume\u003d512.0),"},{"line_number":1550,"context_line":"        ]"},{"line_number":1551,"context_line":"        expected \u003d [50.0]"},{"line_number":1552,"context_line":"        self._do_test_arithmetic(expression, scenario, expected)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_b71dc275","line":1549,"updated":"2014-07-18 10:30:51.000000000","message":"Just for kicks, how about throwing in a testcase that exercises the unhappy path in the calculation, e.g. a divide by zero?","commit_id":"52aeb0891fa49ec52650bd15ab960ded9fdc4b78"},{"author":{"_account_id":8052,"name":"Nejc Saje","email":"nejc@saje.info","username":"nsaje"},"change_message_id":"44e66d7cd3836ccb18c9212e8f72c2a9dd37b7a8","unresolved":false,"context_lines":[{"line_number":1546,"context_line":"        expression \u003d \u0027100.0 * $(memory.usage) / $(memory)\u0027"},{"line_number":1547,"context_line":"        scenario \u003d ["},{"line_number":1548,"context_line":"            dict(name\u003d\u0027memory\u0027, volume\u003d1024.0),"},{"line_number":1549,"context_line":"            dict(name\u003d\u0027memory.usage\u0027, volume\u003d512.0),"},{"line_number":1550,"context_line":"        ]"},{"line_number":1551,"context_line":"        expected \u003d [50.0]"},{"line_number":1552,"context_line":"        self._do_test_arithmetic(expression, scenario, expected)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_bd04c315","line":1549,"in_reply_to":"baada198_b71dc275","updated":"2014-07-18 10:56:36.000000000","message":"That\u0027s done on L1581, NaN is also tested in L1572 :)","commit_id":"52aeb0891fa49ec52650bd15ab960ded9fdc4b78"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"095db7ffe8c13b14c9d292e05aeaec8b71f8d840","unresolved":false,"context_lines":[{"line_number":1546,"context_line":"        expression \u003d \u0027100.0 * $(memory.usage) / $(memory)\u0027"},{"line_number":1547,"context_line":"        scenario \u003d ["},{"line_number":1548,"context_line":"            dict(name\u003d\u0027memory\u0027, volume\u003d1024.0),"},{"line_number":1549,"context_line":"            dict(name\u003d\u0027memory.usage\u0027, volume\u003d512.0),"},{"line_number":1550,"context_line":"        ]"},{"line_number":1551,"context_line":"        expected \u003d [50.0]"},{"line_number":1552,"context_line":"        self._do_test_arithmetic(expression, scenario, expected)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_3dc7d346","line":1549,"in_reply_to":"baada198_bd04c315","updated":"2014-07-18 11:12:21.000000000","message":"I stand corrected :)","commit_id":"52aeb0891fa49ec52650bd15ab960ded9fdc4b78"}],"ceilometer/transformer/__init__.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"6e18f28153c243d9f61003d64254065081ffc579","unresolved":false,"context_lines":[{"line_number":72,"context_line":"class Namespace(object):"},{"line_number":73,"context_line":"    \"\"\"Encapsulates the namespace."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    Encapsulation is going by wrapping the evaluation of the configured scale"},{"line_number":76,"context_line":"    factor. This allows nested dicts to be accessed in the attribute style,"},{"line_number":77,"context_line":"    and missing attributes to yield false when used in a boolean expression."},{"line_number":78,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_ae3d7391","line":75,"updated":"2014-07-11 08:35:56.000000000","message":"Maybe:\n\n  s/scale factor/rule/\n\ngiven that the usage if this is now a bit more generic.\n\nAlso my bad in the original docstr:\n\n  s/Encapsulation is going/Encapsulation is done/","commit_id":"a270aa8bedadaffa87fb5b1ff9fc056abac5a48a"},{"author":{"_account_id":8052,"name":"Nejc Saje","email":"nejc@saje.info","username":"nsaje"},"change_message_id":"13073383c817fa7ef80129b641c2dd503afc44f0","unresolved":false,"context_lines":[{"line_number":72,"context_line":"class Namespace(object):"},{"line_number":73,"context_line":"    \"\"\"Encapsulates the namespace."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    Encapsulation is going by wrapping the evaluation of the configured scale"},{"line_number":76,"context_line":"    factor. This allows nested dicts to be accessed in the attribute style,"},{"line_number":77,"context_line":"    and missing attributes to yield false when used in a boolean expression."},{"line_number":78,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_ee0e8b8b","line":75,"in_reply_to":"baada198_ae3d7391","updated":"2014-07-11 09:33:38.000000000","message":"Done","commit_id":"a270aa8bedadaffa87fb5b1ff9fc056abac5a48a"}],"ceilometer/transformer/arithmetic.py":[{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"53bc54e6ad0a4dd551d0c9c9a9bfb54abebd26fd","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class ArithmeticTransformer(transformer.TransformerBase):"},{"line_number":33,"context_line":"    \"\"\"Multi meter arithmetic transformer"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    Transformer that performs arithmetic operations"},{"line_number":36,"context_line":"    over one or more meters and/or their metadata."}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_4e03f70f","line":33,"range":{"start_line":33,"start_character":7,"end_line":33,"end_character":12},"updated":"2014-07-11 08:52:04.000000000","message":"Usually first line of the multi-line doctoring ends with \u0027.\u0027 if that\u0027s possible to be done in 80 symbols margin.","commit_id":"a270aa8bedadaffa87fb5b1ff9fc056abac5a48a"},{"author":{"_account_id":8052,"name":"Nejc Saje","email":"nejc@saje.info","username":"nsaje"},"change_message_id":"13073383c817fa7ef80129b641c2dd503afc44f0","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class ArithmeticTransformer(transformer.TransformerBase):"},{"line_number":33,"context_line":"    \"\"\"Multi meter arithmetic transformer"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    Transformer that performs arithmetic operations"},{"line_number":36,"context_line":"    over one or more meters and/or their metadata."}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_9190ce44","line":33,"in_reply_to":"baada198_4e03f70f","updated":"2014-07-11 09:33:38.000000000","message":"Done","commit_id":"a270aa8bedadaffa87fb5b1ff9fc056abac5a48a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"6e18f28153c243d9f61003d64254065081ffc579","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        self.misconfigured \u003d False"},{"line_number":47,"context_line":"        if len(self.required_meters) \u003d\u003d 0:"},{"line_number":48,"context_line":"            self.misconfigured \u003d True"},{"line_number":49,"context_line":"            return"},{"line_number":50,"context_line":"        self.reference_meter \u003d self.required_meters[0]"},{"line_number":51,"context_line":"        # convert to set for more efficient contains operation"},{"line_number":52,"context_line":"        self.required_meters \u003d set(self.required_meters)"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_aed9f358","line":49,"updated":"2014-07-11 08:35:56.000000000","message":"More readable as:\n\n  self.misconfigured \u003d len(self.required_meters) \u003d\u003d 0\n  if not self.misconfigured:\n      self.reference_meter \u003d self.required_meters[0]\n      ...","commit_id":"a270aa8bedadaffa87fb5b1ff9fc056abac5a48a"},{"author":{"_account_id":8052,"name":"Nejc Saje","email":"nejc@saje.info","username":"nsaje"},"change_message_id":"13073383c817fa7ef80129b641c2dd503afc44f0","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        self.misconfigured \u003d False"},{"line_number":47,"context_line":"        if len(self.required_meters) \u003d\u003d 0:"},{"line_number":48,"context_line":"            self.misconfigured \u003d True"},{"line_number":49,"context_line":"            return"},{"line_number":50,"context_line":"        self.reference_meter \u003d self.required_meters[0]"},{"line_number":51,"context_line":"        # convert to set for more efficient contains operation"},{"line_number":52,"context_line":"        self.required_meters \u003d set(self.required_meters)"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_0e557f4f","line":49,"in_reply_to":"baada198_aed9f358","updated":"2014-07-11 09:33:38.000000000","message":"Yep, thanks. This if used to contain more code :-)","commit_id":"a270aa8bedadaffa87fb5b1ff9fc056abac5a48a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"6e18f28153c243d9f61003d64254065081ffc579","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _check_requirements(self, resource_id):"},{"line_number":63,"context_line":"        \"\"\"Check if all the required meters are available in the cache.\"\"\""},{"line_number":64,"context_line":"        return len(self.cache[resource_id]) \u003d\u003d len(self.required_meters)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _calculate(self, resource_id):"},{"line_number":67,"context_line":"        \"\"\"Evaluate the expression and return a new sample if successful.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_8e5fcfe4","line":64,"updated":"2014-07-11 08:35:56.000000000","message":"Edge case of multiple samples for the same meter generated by one task?","commit_id":"a270aa8bedadaffa87fb5b1ff9fc056abac5a48a"},{"author":{"_account_id":8052,"name":"Nejc Saje","email":"nejc@saje.info","username":"nsaje"},"change_message_id":"13073383c817fa7ef80129b641c2dd503afc44f0","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _check_requirements(self, resource_id):"},{"line_number":63,"context_line":"        \"\"\"Check if all the required meters are available in the cache.\"\"\""},{"line_number":64,"context_line":"        return len(self.cache[resource_id]) \u003d\u003d len(self.required_meters)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _calculate(self, resource_id):"},{"line_number":67,"context_line":"        \"\"\"Evaluate the expression and return a new sample if successful.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_0edc9fe3","line":64,"in_reply_to":"baada198_8e5fcfe4","updated":"2014-07-11 09:33:38.000000000","message":"Cache[resource_id] is a dict as well, so the keys are unique.","commit_id":"a270aa8bedadaffa87fb5b1ff9fc056abac5a48a"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"53bc54e6ad0a4dd551d0c9c9a9bfb54abebd26fd","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        try:"},{"line_number":72,"context_line":"            new_volume \u003d eval(self.expr_escaped, {}, ns)"},{"line_number":73,"context_line":"            if math.isnan(new_volume):"},{"line_number":74,"context_line":"                raise Exception(_(\u0027Expression evaluated to a NaN value!\u0027))"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"            reference_sample \u003d self.cache[resource_id][self.reference_meter]"},{"line_number":77,"context_line":"            return sample.Sample("}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_ae1e536e","line":74,"updated":"2014-07-11 08:52:04.000000000","message":"Probably use more specific exception? ArithmeticError for instance or defined by you - it\u0027s not really pythonic to use so common exceptions.","commit_id":"a270aa8bedadaffa87fb5b1ff9fc056abac5a48a"},{"author":{"_account_id":8052,"name":"Nejc Saje","email":"nejc@saje.info","username":"nsaje"},"change_message_id":"13073383c817fa7ef80129b641c2dd503afc44f0","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        try:"},{"line_number":72,"context_line":"            new_volume \u003d eval(self.expr_escaped, {}, ns)"},{"line_number":73,"context_line":"            if math.isnan(new_volume):"},{"line_number":74,"context_line":"                raise Exception(_(\u0027Expression evaluated to a NaN value!\u0027))"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"            reference_sample \u003d self.cache[resource_id][self.reference_meter]"},{"line_number":77,"context_line":"            return sample.Sample("}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_d1232656","line":74,"in_reply_to":"baada198_ae1e536e","updated":"2014-07-11 09:33:38.000000000","message":"Done","commit_id":"a270aa8bedadaffa87fb5b1ff9fc056abac5a48a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"6e18f28153c243d9f61003d64254065081ffc579","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            self.cache.clear()"},{"line_number":102,"context_line":"        else:"},{"line_number":103,"context_line":"            LOG.warn(_(\u0027Arithmetic transformer must use at least one\u0027"},{"line_number":104,"context_line":"                       \u0027 meter in expression \\\u0027%s\\\u0027\u0027), self.expr)"},{"line_number":105,"context_line":"        return new_samples"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_4eee97ee","line":104,"updated":"2014-07-11 08:35:56.000000000","message":"Do we want to emit this warning on every single flush?\n\nWould it make sense to instead just emit once when we compute self.misconfigured in the init method?","commit_id":"a270aa8bedadaffa87fb5b1ff9fc056abac5a48a"},{"author":{"_account_id":8052,"name":"Nejc Saje","email":"nejc@saje.info","username":"nsaje"},"change_message_id":"13073383c817fa7ef80129b641c2dd503afc44f0","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            self.cache.clear()"},{"line_number":102,"context_line":"        else:"},{"line_number":103,"context_line":"            LOG.warn(_(\u0027Arithmetic transformer must use at least one\u0027"},{"line_number":104,"context_line":"                       \u0027 meter in expression \\\u0027%s\\\u0027\u0027), self.expr)"},{"line_number":105,"context_line":"        return new_samples"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_aef4935b","line":104,"in_reply_to":"baada198_4eee97ee","updated":"2014-07-11 09:33:38.000000000","message":"Good point. Done.","commit_id":"a270aa8bedadaffa87fb5b1ff9fc056abac5a48a"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"53bc54e6ad0a4dd551d0c9c9a9bfb54abebd26fd","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        :param expr: unescaped expression"},{"line_number":112,"context_line":"        :return: A tuple of the escaped expression and a dict representing"},{"line_number":113,"context_line":"                    the translation of meter names into Python identifiers"},{"line_number":114,"context_line":"        \"\"\""},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        class Replacer():"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_5131d6eb","line":113,"updated":"2014-07-11 08:52:04.000000000","message":"please use the indent for the \"the translation...\" line as the \"A tuple...\" phrase has.","commit_id":"a270aa8bedadaffa87fb5b1ff9fc056abac5a48a"},{"author":{"_account_id":8052,"name":"Nejc Saje","email":"nejc@saje.info","username":"nsaje"},"change_message_id":"13073383c817fa7ef80129b641c2dd503afc44f0","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        :param expr: unescaped expression"},{"line_number":112,"context_line":"        :return: A tuple of the escaped expression and a dict representing"},{"line_number":113,"context_line":"                    the translation of meter names into Python identifiers"},{"line_number":114,"context_line":"        \"\"\""},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        class Replacer():"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_f1466a7a","line":113,"in_reply_to":"baada198_5131d6eb","updated":"2014-07-11 09:33:38.000000000","message":"Done","commit_id":"a270aa8bedadaffa87fb5b1ff9fc056abac5a48a"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"53bc54e6ad0a4dd551d0c9c9a9bfb54abebd26fd","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"           If the meter name is not followed by parameter access in the"},{"line_number":120,"context_line":"           expression, it defaults to accessing the \u0027volume\u0027 parameter."},{"line_number":121,"context_line":"            \"\"\""},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"            def __init__(self, original_expr):"},{"line_number":124,"context_line":"                self.original_expr \u003d original_expr"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_f1590a36","line":121,"updated":"2014-07-11 08:52:04.000000000","message":"that\u0027s not the gerrit magic, please fix the last \"\"\" indent","commit_id":"a270aa8bedadaffa87fb5b1ff9fc056abac5a48a"},{"author":{"_account_id":8052,"name":"Nejc Saje","email":"nejc@saje.info","username":"nsaje"},"change_message_id":"13073383c817fa7ef80129b641c2dd503afc44f0","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"           If the meter name is not followed by parameter access in the"},{"line_number":120,"context_line":"           expression, it defaults to accessing the \u0027volume\u0027 parameter."},{"line_number":121,"context_line":"            \"\"\""},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"            def __init__(self, original_expr):"},{"line_number":124,"context_line":"                self.original_expr \u003d original_expr"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_315c624b","line":121,"in_reply_to":"baada198_f1590a36","updated":"2014-07-11 09:33:38.000000000","message":"Done","commit_id":"a270aa8bedadaffa87fb5b1ff9fc056abac5a48a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"6e18f28153c243d9f61003d64254065081ffc579","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                    name \u003d \"_\" + name + \u0027_ESC\u0027"},{"line_number":146,"context_line":"                return name"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        p \u003d re.compile(r\u0027\\$\\(([\\w\\.\\-]+)\\)\u0027)"},{"line_number":149,"context_line":"        replacer \u003d Replacer(expr)"},{"line_number":150,"context_line":"        expr \u003d re.sub(p, replacer, expr)"},{"line_number":151,"context_line":"        return expr, replacer.escaped_map"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_4ec5b75a","line":148,"updated":"2014-07-11 08:35:56.000000000","message":"Probably could just compile that RE once upfront.","commit_id":"a270aa8bedadaffa87fb5b1ff9fc056abac5a48a"},{"author":{"_account_id":8052,"name":"Nejc Saje","email":"nejc@saje.info","username":"nsaje"},"change_message_id":"13073383c817fa7ef80129b641c2dd503afc44f0","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                    name \u003d \"_\" + name + \u0027_ESC\u0027"},{"line_number":146,"context_line":"                return name"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        p \u003d re.compile(r\u0027\\$\\(([\\w\\.\\-]+)\\)\u0027)"},{"line_number":149,"context_line":"        replacer \u003d Replacer(expr)"},{"line_number":150,"context_line":"        expr \u003d re.sub(p, replacer, expr)"},{"line_number":151,"context_line":"        return expr, replacer.escaped_map"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_2e008333","line":148,"in_reply_to":"baada198_4ec5b75a","updated":"2014-07-11 09:33:38.000000000","message":"Done","commit_id":"a270aa8bedadaffa87fb5b1ff9fc056abac5a48a"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"f41f7353bb720adfe007d11f790d6a8b079601a3","unresolved":false,"context_lines":[{"line_number":15,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":16,"context_line":"# under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from ceilometer import transformer"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import collections"},{"line_number":21,"context_line":"import keyword"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_68c1882e","line":18,"updated":"2014-07-11 13:07:43.000000000","message":"It should be moved to the last block of imported modules.","commit_id":"9ef922ee8b4d280ca9b0d85ac68d16bc0a6529de"},{"author":{"_account_id":8052,"name":"Nejc Saje","email":"nejc@saje.info","username":"nsaje"},"change_message_id":"49f497b5374ee06ad683fdfbfa5b17d127ccb963","unresolved":false,"context_lines":[{"line_number":15,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":16,"context_line":"# under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from ceilometer import transformer"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import collections"},{"line_number":21,"context_line":"import keyword"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_c0d31dd3","line":18,"in_reply_to":"baada198_68c1882e","updated":"2014-07-14 05:34:01.000000000","message":"Done","commit_id":"9ef922ee8b4d280ca9b0d85ac68d16bc0a6529de"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"903d6cde0f05be8f53b0bbf7097de801fba3260e","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                type\u003dself.target.get(\u0027type\u0027, reference_sample.type),"},{"line_number":84,"context_line":"                volume\u003dfloat(new_volume),"},{"line_number":85,"context_line":"                user_id\u003dreference_sample.user_id,"},{"line_number":86,"context_line":"                project_id\u003dreference_sample.project_id,"},{"line_number":87,"context_line":"                resource_id\u003dreference_sample.resource_id,"},{"line_number":88,"context_line":"                timestamp\u003dreference_sample.timestamp,"},{"line_number":89,"context_line":"                resource_metadata\u003dreference_sample.resource_metadata"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_2e161f56","line":86,"updated":"2014-07-16 12:16:58.000000000","message":"Should the timestamp for the combined sample be the *latest* of all the contributing samples?\n\n(as opposed to the timestamp of the sample for whatever the first meter happens to be on the required list)","commit_id":"9b74839e9fabbb6e0704b8d8039c37da0a342f96"},{"author":{"_account_id":8052,"name":"Nejc Saje","email":"nejc@saje.info","username":"nsaje"},"change_message_id":"28577d4d4ad194eb66724ece5344bed6c72c17b3","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                type\u003dself.target.get(\u0027type\u0027, reference_sample.type),"},{"line_number":84,"context_line":"                volume\u003dfloat(new_volume),"},{"line_number":85,"context_line":"                user_id\u003dreference_sample.user_id,"},{"line_number":86,"context_line":"                project_id\u003dreference_sample.project_id,"},{"line_number":87,"context_line":"                resource_id\u003dreference_sample.resource_id,"},{"line_number":88,"context_line":"                timestamp\u003dreference_sample.timestamp,"},{"line_number":89,"context_line":"                resource_metadata\u003dreference_sample.resource_metadata"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_a972290f","line":86,"in_reply_to":"baada198_2e161f56","updated":"2014-07-16 12:28:28.000000000","message":"All the samples are from the same polling task - shouldn\u0027t the timestamps be pretty close together anyway? Can there be enough of a difference between samples in the same polling task to actually count?\n\nI agree though that it is more hygienic to have the more intuitive behaviour of the latest sample contributing the timestamp, so I\u0027ll make it happen :-)","commit_id":"9b74839e9fabbb6e0704b8d8039c37da0a342f96"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"b1f17434820aa3b090e0e7480f34b6b31d95521c","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            LOG.warn(_(\u0027Arithmetic transformer must use at least one\u0027"},{"line_number":56,"context_line":"                       \u0027 meter in expression \\\u0027%s\\\u0027\u0027), self.expr)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def _update_cache(self, s):"},{"line_number":59,"context_line":"        \"\"\"Update the cache with the latest sample.\"\"\""},{"line_number":60,"context_line":"        escaped_name \u003d self.escaped_names.get(s.name, \u0027\u0027)"},{"line_number":61,"context_line":"        if escaped_name not in self.required_meters:"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_d8e10d9d","line":58,"updated":"2014-07-22 09:57:32.000000000","message":"Not a blocking issue, but in the future please avoid using one letter long variable names. It makes harder to read the code.","commit_id":"52aeb0891fa49ec52650bd15ab960ded9fdc4b78"}]}
