)]}'
{"nova/compute/monitors/cpu/virt_driver.py":[{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"1c9aeaa71e7e960dfa88c2c7c6c03922639bf909","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        # since pre-conversion their values are within the range [0, 1] and the"},{"line_number":82,"context_line":"        # objects.MonitorMetric.value field requires an integer."},{"line_number":83,"context_line":"        perc \u003d (stats[\"user\"] - self._cpu_stats.get(\"user\", 0)) / cputime"},{"line_number":84,"context_line":"        self._data[\"cpu.user.percent\"] \u003d int(perc * 100)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        perc \u003d (stats[\"kernel\"] - self._cpu_stats.get(\"kernel\", 0)) / cputime"},{"line_number":87,"context_line":"        self._data[\"cpu.kernel.percent\"] \u003d int(perc * 100)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_ac227b52","line":84,"updated":"2015-08-26 03:30:42.000000000","message":"as you side in comments if the prec is 0.175, then multiples 100 will be 17, we kinds of lost precision.","commit_id":"18ee4a245d5364fac35345a9a77a876d061de89c"},{"author":{"_account_id":7664,"name":"Joe Cropper","email":"jwcroppe@us.ibm.com","username":"jwcroppe"},"change_message_id":"4853336f0eef591f4ea3fd04d762ba3e4f015c60","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        # since pre-conversion their values are within the range [0, 1] and the"},{"line_number":82,"context_line":"        # objects.MonitorMetric.value field requires an integer."},{"line_number":83,"context_line":"        perc \u003d (stats[\"user\"] - self._cpu_stats.get(\"user\", 0)) / cputime"},{"line_number":84,"context_line":"        self._data[\"cpu.user.percent\"] \u003d int(perc * 100)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        perc \u003d (stats[\"kernel\"] - self._cpu_stats.get(\"kernel\", 0)) / cputime"},{"line_number":87,"context_line":"        self._data[\"cpu.kernel.percent\"] \u003d int(perc * 100)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_2c9c2b69","line":84,"in_reply_to":"fa1b9901_ac227b52","updated":"2015-08-26 03:33:36.000000000","message":"I talked with Dan Smith about this, and the intent was to store as an Integer and keep it simple.","commit_id":"18ee4a245d5364fac35345a9a77a876d061de89c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5b3efbc511d9852b5c3cf492b3bb1b532278eaf1","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        # since pre-conversion their values are within the range [0, 1] and the"},{"line_number":82,"context_line":"        # objects.MonitorMetric.value field requires an integer."},{"line_number":83,"context_line":"        perc \u003d (stats[\"user\"] - self._cpu_stats.get(\"user\", 0)) / cputime"},{"line_number":84,"context_line":"        self._data[\"cpu.user.percent\"] \u003d int(perc * 100)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        perc \u003d (stats[\"kernel\"] - self._cpu_stats.get(\"kernel\", 0)) / cputime"},{"line_number":87,"context_line":"        self._data[\"cpu.kernel.percent\"] \u003d int(perc * 100)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_a5d3d737","line":84,"updated":"2015-08-27 14:33:43.000000000","message":"You don\u0027t really need to do this as they will be coerced when they\u0027re fed into the object. Doesn\u0027t hurt anything though.","commit_id":"87e1d8fab2b5888e711f07001025600fe709aaa7"}],"nova/objects/monitor_metric.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ed4d6967036f613bf5627ef56aa6e7c9ff40f7bf","unresolved":false,"context_lines":[{"line_number":24,"context_line":"                               fields.MonitorMetricType.CPU_KERNEL_PERCENT,"},{"line_number":25,"context_line":"                               fields.MonitorMetricType.CPU_IDLE_PERCENT,"},{"line_number":26,"context_line":"                               fields.MonitorMetricType.CPU_IOWAIT_PERCENT,"},{"line_number":27,"context_line":"                               fields.MonitorMetricType.CPU_PERCENT]"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_e03cd9e2","line":27,"updated":"2015-08-26 14:35:48.000000000","message":"nit: not sure it requires a module-scoped var for that...","commit_id":"87e1d8fab2b5888e711f07001025600fe709aaa7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5b3efbc511d9852b5c3cf492b3bb1b532278eaf1","unresolved":false,"context_lines":[{"line_number":24,"context_line":"                               fields.MonitorMetricType.CPU_KERNEL_PERCENT,"},{"line_number":25,"context_line":"                               fields.MonitorMetricType.CPU_IDLE_PERCENT,"},{"line_number":26,"context_line":"                               fields.MonitorMetricType.CPU_IOWAIT_PERCENT,"},{"line_number":27,"context_line":"                               fields.MonitorMetricType.CPU_PERCENT]"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_a588b723","line":27,"in_reply_to":"fa1b9901_e03cd9e2","updated":"2015-08-27 14:33:43.000000000","message":"It makes it easier to refer to them from elsewhere. Polluting the object\u0027s name space isn\u0027t really any better, IMHO.","commit_id":"87e1d8fab2b5888e711f07001025600fe709aaa7"}],"nova/tests/unit/compute/monitors/cpu/test_virt_driver.py":[{"author":{"_account_id":7664,"name":"Joe Cropper","email":"jwcroppe@us.ibm.com","username":"jwcroppe"},"change_message_id":"0b21809f74abf581e5ccee0a73c0208a8aa636e8","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        self.assertEqual(metrics[\"cpu.kernel.time\"], 5664160000000)"},{"line_number":66,"context_line":"        self.assertEqual(metrics[\"cpu.idle.time\"], 1592705190000000)"},{"line_number":67,"context_line":"        self.assertEqual(metrics[\"cpu.iowait.time\"], 6121490000000)"},{"line_number":68,"context_line":"        self.assertTrue(metrics[\"cpu.user.percent\"] \u003c\u003d 1"},{"line_number":69,"context_line":"                        and metrics[\"cpu.user.percent\"] \u003e\u003d 0)"},{"line_number":70,"context_line":"        self.assertTrue(metrics[\"cpu.kernel.percent\"] \u003c\u003d 1"},{"line_number":71,"context_line":"                        and metrics[\"cpu.kernel.percent\"] \u003e\u003d 0)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_ef74e59c","side":"PARENT","line":68,"updated":"2015-08-26 03:56:37.000000000","message":"This bug slipped through the cracks since all the percentages were 0 and getting included in the \u003e\u003d 0 piece, so let\u0027s be more explicit with our checks to help avoid this.","commit_id":"764c4d467e2d18e4ffd35032cd44f09a7f193f7e"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ed4d6967036f613bf5627ef56aa6e7c9ff40f7bf","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.assertEqual(metrics[\"cpu.iowait.time\"], 6121490000000)"},{"line_number":68,"context_line":"        self.assertEqual(metrics[\"cpu.user.percent\"], 1)"},{"line_number":69,"context_line":"        self.assertEqual(metrics[\"cpu.kernel.percent\"], 0)"},{"line_number":70,"context_line":"        self.assertEqual(metrics[\"cpu.idle.percent\"], 97)"},{"line_number":71,"context_line":"        self.assertEqual(metrics[\"cpu.iowait.percent\"], 0)"},{"line_number":72,"context_line":"        self.assertEqual(metrics[\"cpu.percent\"], 2)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_9201b407","line":70,"updated":"2015-08-26 14:35:48.000000000","message":"thanks for fixing the coverage which was horrible...","commit_id":"87e1d8fab2b5888e711f07001025600fe709aaa7"}],"nova/tests/unit/objects/test_monitor_metric.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ed4d6967036f613bf5627ef56aa6e7c9ff40f7bf","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    \u0027value\u0027: 0.17,"},{"line_number":31,"context_line":"    \u0027timestamp\u0027: timeutils.strtime(_ts_now),"},{"line_number":32,"context_line":"    \u0027source\u0027: \u0027nova.virt.libvirt.driver\u0027"},{"line_number":33,"context_line":"}"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"_monitor_numa_metric_spec \u003d {"},{"line_number":36,"context_line":"    \u0027name\u0027: fields.MonitorMetricType.NUMA_MEM_BW_CURRENT,"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_52555cf7","line":33,"updated":"2015-08-26 14:35:48.000000000","message":"nit: not sure it needs a module-scope var as well...","commit_id":"87e1d8fab2b5888e711f07001025600fe709aaa7"}]}
