)]}'
{"ceilometer/tests/pipeline_base.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"d629c419a477d44b6621b9e439650bfd7886c76b","unresolved":false,"context_lines":[{"line_number":1010,"context_line":"                                                offset\u003d0)"},{"line_number":1011,"context_line":""},{"line_number":1012,"context_line":"    def test_rate_of_change_no_predecessor(self):"},{"line_number":1013,"context_line":"        s \u003d \"100.0 / (10**9 * (resource_metadata.cpu_number or 1))\""},{"line_number":1014,"context_line":"        transformer_cfg \u003d ["},{"line_number":1015,"context_line":"            {"},{"line_number":1016,"context_line":"                \u0027name\u0027: \u0027rate_of_change\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_0174b3cc","line":1013,"updated":"2015-08-05 12:56:11.000000000","message":"why did this change? resource_metadata shouldn\u0027t be an object.","commit_id":"5bc3281f4e29355a9b8011c543b26f3c5427b388"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"205f0e4ad3ef0d1f182b28d5ef857f2b73aee370","unresolved":false,"context_lines":[{"line_number":1010,"context_line":"                                                offset\u003d0)"},{"line_number":1011,"context_line":""},{"line_number":1012,"context_line":"    def test_rate_of_change_no_predecessor(self):"},{"line_number":1013,"context_line":"        s \u003d \"100.0 / (10**9 * (resource_metadata.cpu_number or 1))\""},{"line_number":1014,"context_line":"        transformer_cfg \u003d ["},{"line_number":1015,"context_line":"            {"},{"line_number":1016,"context_line":"                \u0027name\u0027: \u0027rate_of_change\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_57835956","line":1013,"in_reply_to":"1a4dcd0f_0174b3cc","updated":"2015-08-05 13:06:01.000000000","message":"it _is_ an object. It\u0027s a thing called a NameSpace.\n\nBasically the tests were not working so I went to look at how things are done in the deployed pipeline.yaml and the above is in line with how things are supposed to be done. Fixing the above in this patch was just an opportunistic thing because of what I learned to make the test work before.\n\nNamespace is here: https://github.com/openstack/ceilometer/blob/master/ceilometer/transformer/__init__.py#L54\n\nand see example pipeline here: https://github.com/openstack/ceilometer/blob/master/etc/ceilometer/pipeline.yaml#L50\n\nThe reason this never caused a problem is because the scale doesn\u0027t engage when there is no predecessor, so \u0027s\u0027 here could be anything. I changed it because even things that aren\u0027t used should be correct...","commit_id":"5bc3281f4e29355a9b8011c543b26f3c5427b388"}],"ceilometer/transformer/conversions.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"24d9a43012c7ce39b6a94c4662a1108ff61bea26","unresolved":false,"context_lines":[{"line_number":133,"context_line":"            volume_delta \u003d (s.volume - prev_volume"},{"line_number":134,"context_line":"                            if (prev_volume \u003c\u003d s.volume or"},{"line_number":135,"context_line":"                                s.type !\u003d sample.TYPE_CUMULATIVE)"},{"line_number":136,"context_line":"                            else s.volume)"},{"line_number":137,"context_line":"            rate_of_change \u003d ((1.0 * volume_delta / time_delta)"},{"line_number":138,"context_line":"                              if time_delta else 0.0)"},{"line_number":139,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_547afeba","line":136,"updated":"2015-07-29 19:00:19.000000000","message":"based on the comment, it seems like negative deltas are fine.\n\nseems like the else case should be \u0027return\u0027 rather than s.volume\n\nif we want to go minimise the drops, we could maintained an ordered list of say 5 samples and calculate off most recent sample with earlier ts... but that just minimises things... and adds overhead.","commit_id":"27f5723e2e40083f879f5cef5d2e5e7c346697b2"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"9018510feec27bb87582d437ee62f6f859ae79ae","unresolved":false,"context_lines":[{"line_number":133,"context_line":"            volume_delta \u003d (s.volume - prev_volume"},{"line_number":134,"context_line":"                            if (prev_volume \u003c\u003d s.volume or"},{"line_number":135,"context_line":"                                s.type !\u003d sample.TYPE_CUMULATIVE)"},{"line_number":136,"context_line":"                            else s.volume)"},{"line_number":137,"context_line":"            rate_of_change \u003d ((1.0 * volume_delta / time_delta)"},{"line_number":138,"context_line":"                              if time_delta else 0.0)"},{"line_number":139,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_cfcafb9f","line":136,"in_reply_to":"3a50d1a3_547afeba","updated":"2015-07-29 19:05:44.000000000","message":"errr.. nevermind. my suggestion will fall apart during normal reset... that said i think we still need to allow negative delta","commit_id":"27f5723e2e40083f879f5cef5d2e5e7c346697b2"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"916c0c1f28f6f9f3b48d983bdaddfe20ea6ab2f1","unresolved":false,"context_lines":[{"line_number":133,"context_line":"            volume_delta \u003d (s.volume - prev_volume"},{"line_number":134,"context_line":"                            if (prev_volume \u003c\u003d s.volume or"},{"line_number":135,"context_line":"                                s.type !\u003d sample.TYPE_CUMULATIVE)"},{"line_number":136,"context_line":"                            else s.volume)"},{"line_number":137,"context_line":"            rate_of_change \u003d ((1.0 * volume_delta / time_delta)"},{"line_number":138,"context_line":"                              if time_delta else 0.0)"},{"line_number":139,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_815b6753","line":136,"in_reply_to":"3a50d1a3_cfcafb9f","updated":"2015-07-29 19:49:19.000000000","message":"Okay, but that has nothing to do with this specific change does it?","commit_id":"27f5723e2e40083f879f5cef5d2e5e7c346697b2"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"d629c419a477d44b6621b9e439650bfd7886c76b","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        key \u003d s.name + s.resource_id"},{"line_number":116,"context_line":"        prev \u003d self.cache.get(key)"},{"line_number":117,"context_line":"        timestamp \u003d timeutils.parse_isotime(s.timestamp)"},{"line_number":118,"context_line":"        self.cache[key] \u003d (s.volume, timestamp)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        if prev:"},{"line_number":121,"context_line":"            prev_volume \u003d prev[0]"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_bc5162da","line":118,"updated":"2015-08-05 12:56:11.000000000","message":"(nit) i\u0027d probably move this to bottom so we don\u0027t need to do revert","commit_id":"5bc3281f4e29355a9b8011c543b26f3c5427b388"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"205f0e4ad3ef0d1f182b28d5ef857f2b73aee370","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        key \u003d s.name + s.resource_id"},{"line_number":116,"context_line":"        prev \u003d self.cache.get(key)"},{"line_number":117,"context_line":"        timestamp \u003d timeutils.parse_isotime(s.timestamp)"},{"line_number":118,"context_line":"        self.cache[key] \u003d (s.volume, timestamp)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        if prev:"},{"line_number":121,"context_line":"            prev_volume \u003d prev[0]"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_97e80112","line":118,"in_reply_to":"1a4dcd0f_bc5162da","updated":"2015-08-05 13:06:01.000000000","message":"I considered but figured in the actual code (not the tests) minimizing the surface are of the change was the way to go, but happy to change if it matters.","commit_id":"5bc3281f4e29355a9b8011c543b26f3c5427b388"}]}
