)]}'
{"rally/plugins/openstack/context/ceilometer/samples.py":[{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"e7e1cfe10c99057761981f509d3b5d271f3a77c1","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        \"timestamp_interval\": 60,"},{"line_number":76,"context_line":"    }"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def _store_batch_samples(self, scenario, batches):"},{"line_number":79,"context_line":"        success \u003d 0"},{"line_number":80,"context_line":"        for i, batch in enumerate(batches, start\u003d1):"},{"line_number":81,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_ebf6e38d","line":78,"updated":"2015-10-09 13:27:18.000000000","message":"I think that better name would be _create_batch_samples for example","commit_id":"92b3b98deabfc978bc3d49ee6c504e5b711760cd"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"da189730c512235e5ce53f0ab29f6796c1f730dd","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        \"timestamp_interval\": 60,"},{"line_number":76,"context_line":"    }"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def _store_batch_samples(self, scenario, batches):"},{"line_number":79,"context_line":"        success \u003d 0"},{"line_number":80,"context_line":"        for i, batch in enumerate(batches, start\u003d1):"},{"line_number":81,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_996466b9","line":78,"in_reply_to":"7a2fa921_ebf6e38d","updated":"2015-10-09 14:48:58.000000000","message":"this function do not create batch but store it","commit_id":"92b3b98deabfc978bc3d49ee6c504e5b711760cd"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"e7e1cfe10c99057761981f509d3b5d271f3a77c1","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                samples \u003d scenario._create_samples(batch)"},{"line_number":83,"context_line":"            except Exception:"},{"line_number":84,"context_line":"                LOG.warning(_(\"Batch %d fails to be stored into database \""},{"line_number":85,"context_line":"                              \"during context creation\") % i)"},{"line_number":86,"context_line":"                continue"},{"line_number":87,"context_line":"            success +\u003d 1"},{"line_number":88,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_4b8b571f","line":85,"updated":"2015-10-09 13:27:18.000000000","message":"Lets LOG here error message to find out issues in case of errors. I don\u0027t what is says this for user if he will know the number if failed batch. And Why we not raise error?","commit_id":"92b3b98deabfc978bc3d49ee6c504e5b711760cd"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"da189730c512235e5ce53f0ab29f6796c1f730dd","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                samples \u003d scenario._create_samples(batch)"},{"line_number":83,"context_line":"            except Exception:"},{"line_number":84,"context_line":"                LOG.warning(_(\"Batch %d fails to be stored into database \""},{"line_number":85,"context_line":"                              \"during context creation\") % i)"},{"line_number":86,"context_line":"                continue"},{"line_number":87,"context_line":"            success +\u003d 1"},{"line_number":88,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_d9a73ea5","line":85,"in_reply_to":"7a2fa921_4b8b571f","updated":"2015-10-09 14:48:58.000000000","message":"As I\u0027ve wrote in commit message the main goal of this patch is let test go even if part of context would have not created, that\u0027s why it is not error it warning to have possibility make correction for test\u0027s result or even skip it if too big part of batches fails","commit_id":"92b3b98deabfc978bc3d49ee6c504e5b711760cd"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"bf022aa0a98e54226955ff13a75bdac5d6d7301e","unresolved":false,"context_lines":[{"line_number":62,"context_line":"            \"metadata\": {"},{"line_number":63,"context_line":"                \"type\": \"array\","},{"line_number":64,"context_line":"            },"},{"line_number":65,"context_line":"            \"batch\": {"},{"line_number":66,"context_line":"                \"type\": \"integer\","},{"line_number":67,"context_line":"                \"minimum\": 1"},{"line_number":68,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a2ca52d_6cc91b78","line":65,"updated":"2015-10-14 13:56:52.000000000","message":"I think \u0027batch_size\u0027 would be a more intuitive name for this.","commit_id":"ab7c3f62fc00bbf4846dba9a726f6fdddd817acd"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"83323a50d058aaf08263b7fa1bc33408114bab16","unresolved":false,"context_lines":[{"line_number":62,"context_line":"            \"metadata\": {"},{"line_number":63,"context_line":"                \"type\": \"array\","},{"line_number":64,"context_line":"            },"},{"line_number":65,"context_line":"            \"batch\": {"},{"line_number":66,"context_line":"                \"type\": \"integer\","},{"line_number":67,"context_line":"                \"minimum\": 1"},{"line_number":68,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_47269c69","line":65,"in_reply_to":"5a2ca52d_6cc91b78","updated":"2015-10-19 11:51:07.000000000","message":"Done","commit_id":"ab7c3f62fc00bbf4846dba9a726f6fdddd817acd"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"bf022aa0a98e54226955ff13a75bdac5d6d7301e","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                samples \u003d scenario._create_samples(batch)"},{"line_number":86,"context_line":"            except Exception:"},{"line_number":87,"context_line":"                LOG.warning(_(\"Batch %d fails to be stored into database \""},{"line_number":88,"context_line":"                              \"during context creation\") % i)"},{"line_number":89,"context_line":"                continue"},{"line_number":90,"context_line":"            success +\u003d 1"},{"line_number":91,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a2ca52d_4c30df9e","line":88,"updated":"2015-10-14 13:56:52.000000000","message":"Maybe: \"Failed to store batch %d of Ceilometer samples during context creation\"\n\nI think it\u0027s important that we tell the user a batch of *what* failed. Also some grammatical improvements.","commit_id":"ab7c3f62fc00bbf4846dba9a726f6fdddd817acd"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"83323a50d058aaf08263b7fa1bc33408114bab16","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                samples \u003d scenario._create_samples(batch)"},{"line_number":86,"context_line":"            except Exception:"},{"line_number":87,"context_line":"                LOG.warning(_(\"Batch %d fails to be stored into database \""},{"line_number":88,"context_line":"                              \"during context creation\") % i)"},{"line_number":89,"context_line":"                continue"},{"line_number":90,"context_line":"            success +\u003d 1"},{"line_number":91,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_672b9831","line":88,"in_reply_to":"5a2ca52d_4c30df9e","updated":"2015-10-19 11:51:07.000000000","message":"Done","commit_id":"ab7c3f62fc00bbf4846dba9a726f6fdddd817acd"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"bf022aa0a98e54226955ff13a75bdac5d6d7301e","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                              \"during context creation\") % i)"},{"line_number":89,"context_line":"                continue"},{"line_number":90,"context_line":"            success +\u003d 1"},{"line_number":91,"context_line":"        else:"},{"line_number":92,"context_line":"            if success \u003d\u003d 0:"},{"line_number":93,"context_line":"                raise exceptions.ContextSetupFailure("},{"line_number":94,"context_line":"                    ctx_name\u003dself.get_name(),"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a2ca52d_6c911b99","line":91,"updated":"2015-10-14 13:56:52.000000000","message":"There is no \u0027break\u0027 in the loop, so this block will always be executed and the \u0027else\u0027 is unnecessary.","commit_id":"ab7c3f62fc00bbf4846dba9a726f6fdddd817acd"},{"author":{"_account_id":13609,"name":"Pavel Boldin","email":"pboldin@mirantis.com","username":"pboldin"},"change_message_id":"27f0f85aeed538192deda8b5beef5e1a7cdaec3a","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                              \"during context creation\") % i)"},{"line_number":89,"context_line":"                continue"},{"line_number":90,"context_line":"            success +\u003d 1"},{"line_number":91,"context_line":"        else:"},{"line_number":92,"context_line":"            if success \u003d\u003d 0:"},{"line_number":93,"context_line":"                raise exceptions.ContextSetupFailure("},{"line_number":94,"context_line":"                    ctx_name\u003dself.get_name(),"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a2ca52d_ebbae7e0","line":91,"in_reply_to":"5a2ca52d_6c911b99","updated":"2015-10-14 17:35:17.000000000","message":"Here:\n\n \u003e\u003e\u003e for a in []:\n...     pass\n... else:\n...     print 42\n... \n42","commit_id":"ab7c3f62fc00bbf4846dba9a726f6fdddd817acd"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"83323a50d058aaf08263b7fa1bc33408114bab16","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                              \"during context creation\") % i)"},{"line_number":89,"context_line":"                continue"},{"line_number":90,"context_line":"            success +\u003d 1"},{"line_number":91,"context_line":"        else:"},{"line_number":92,"context_line":"            if success \u003d\u003d 0:"},{"line_number":93,"context_line":"                raise exceptions.ContextSetupFailure("},{"line_number":94,"context_line":"                    ctx_name\u003dself.get_name(),"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_87a114ac","line":91,"in_reply_to":"5a2ca52d_6c911b99","updated":"2015-10-19 11:51:07.000000000","message":"Sure you are right here. Done.","commit_id":"ab7c3f62fc00bbf4846dba9a726f6fdddd817acd"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"c16d66c76c65b84edc1e0b323d28922dd7cf98d8","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                              \"during context creation\") % i)"},{"line_number":89,"context_line":"                continue"},{"line_number":90,"context_line":"            success +\u003d 1"},{"line_number":91,"context_line":"        else:"},{"line_number":92,"context_line":"            if success \u003d\u003d 0:"},{"line_number":93,"context_line":"                raise exceptions.ContextSetupFailure("},{"line_number":94,"context_line":"                    ctx_name\u003dself.get_name(),"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a2ca52d_ab994f70","line":91,"in_reply_to":"5a2ca52d_ebbae7e0","updated":"2015-10-14 17:37:21.000000000","message":"Exactly. That\u0027s functionally identical to:\n\n    for a in []:\n        pass\n    print 42\n\nI.e., there\u0027s no need for the else.","commit_id":"ab7c3f62fc00bbf4846dba9a726f6fdddd817acd"},{"author":{"_account_id":7132,"name":"Nikita Konovalov","email":"nkonovalov@mirantis.com","username":"nkonovalov"},"change_message_id":"19d48d24af665eb220eb947c1c72b0b2467f5482","unresolved":false,"context_lines":[{"line_number":80,"context_line":"                    \"additionalProperties\": True"},{"line_number":81,"context_line":"                }"},{"line_number":82,"context_line":"            },"},{"line_number":83,"context_line":"            \"batch_size\": {"},{"line_number":84,"context_line":"                \"type\": \"integer\","},{"line_number":85,"context_line":"                \"minimum\": 1"},{"line_number":86,"context_line":"            },"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa80f949_1bb6833d","line":83,"updated":"2015-11-05 12:54:31.000000000","message":"I don\u0027t see any config[\"batch_size\"] used anywhere. What is this parameter for?","commit_id":"3536c3bca609ba84e89757f949f7a2a64bca361b"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"929f896d4cdada255862db95093e9e25391838b0","unresolved":false,"context_lines":[{"line_number":80,"context_line":"                    \"additionalProperties\": True"},{"line_number":81,"context_line":"                }"},{"line_number":82,"context_line":"            },"},{"line_number":83,"context_line":"            \"batch_size\": {"},{"line_number":84,"context_line":"                \"type\": \"integer\","},{"line_number":85,"context_line":"                \"minimum\": 1"},{"line_number":86,"context_line":"            },"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa80f949_90efad86","line":83,"in_reply_to":"fa80f949_1bb6833d","updated":"2015-11-05 13:51:52.000000000","message":"Thank you for catching that using \"batch_size\" parameter disappear somewhere between 6 and 10 patches. Will improve.","commit_id":"3536c3bca609ba84e89757f949f7a2a64bca361b"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"f7127e1586ad70e5da211fd4f8dd9c46bf3a83f4","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            try:"},{"line_number":102,"context_line":"                samples \u003d scenario._create_samples(batch_size)"},{"line_number":103,"context_line":"            except Exception:"},{"line_number":104,"context_line":"                LOG.warning(_(\"Failed to store batch %d of Ceilometer samples\""},{"line_number":105,"context_line":"                              \" during context creation\") % i)"},{"line_number":106,"context_line":"                continue"},{"line_number":107,"context_line":"            success +\u003d 1"}],"source_content_type":"text/x-python","patch_set":16,"id":"da85f559_f3245ab0","line":104,"updated":"2015-11-08 10:56:38.000000000","message":"Why we are continue work in case of errors? \nThis seems invalid for me..","commit_id":"ae4de259208905cf1444d8e2fc82f3e33f69d491"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"553bf8c043c0e8abbba62893eba17506b4dea07e","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            try:"},{"line_number":102,"context_line":"                samples \u003d scenario._create_samples(batch_size)"},{"line_number":103,"context_line":"            except Exception:"},{"line_number":104,"context_line":"                LOG.warning(_(\"Failed to store batch %d of Ceilometer samples\""},{"line_number":105,"context_line":"                              \" during context creation\") % i)"},{"line_number":106,"context_line":"                continue"},{"line_number":107,"context_line":"            success +\u003d 1"}],"source_content_type":"text/x-python","patch_set":16,"id":"da85f559_1c1ebd0c","line":104,"in_reply_to":"da85f559_f3245ab0","updated":"2015-11-09 08:50:41.000000000","message":"Boris, as I wrote in commit massage, now it is not a problem to loose some batches while context is created. If batch size is equal or less 1% of whole number of samples it won\u0027t affect main test result much, but we can continue tests after context will be created. So we need here \"try except\" construction again.","commit_id":"ae4de259208905cf1444d8e2fc82f3e33f69d491"},{"author":{"_account_id":9601,"name":"Oleh Anufriiev","email":"oanufriev@mirantis.com","username":"oanufriev"},"change_message_id":"7498ddace7425f2e2681dc173c34cedd25447bad","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        \"timestamp_interval\": 60"},{"line_number":96,"context_line":"    }"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def _store_batch_samples(self, scenario, batches):"},{"line_number":99,"context_line":"        success \u003d 0"},{"line_number":100,"context_line":"        for i, batch_size in enumerate(batches, start\u003d1):"},{"line_number":101,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":17,"id":"da85f559_2f09e5dd","line":98,"updated":"2015-11-09 17:31:01.000000000","message":"Please, add tockstring for this function and mention there, that \u0027batches\u0027 is an iterable with batches of samples.","commit_id":"77546d84f949d4b70aa4431cb8abe40bc04a703b"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"7d7c8aa257dad0571a478a86c2f9c753e7da8ba5","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        \"timestamp_interval\": 60"},{"line_number":96,"context_line":"    }"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def _store_batch_samples(self, scenario, batches):"},{"line_number":99,"context_line":"        success \u003d 0"},{"line_number":100,"context_line":"        for i, batch_size in enumerate(batches, start\u003d1):"},{"line_number":101,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":17,"id":"da85f559_aab60888","line":98,"in_reply_to":"da85f559_2f09e5dd","updated":"2015-11-10 07:59:13.000000000","message":"yep it could be changed but i would love to add doc strings in my next patch if you don\u0027t mind because it already has two +2 and your comment do not weight for -1 its more like a perfection nit.","commit_id":"77546d84f949d4b70aa4431cb8abe40bc04a703b"},{"author":{"_account_id":9601,"name":"Oleh Anufriiev","email":"oanufriev@mirantis.com","username":"oanufriev"},"change_message_id":"7498ddace7425f2e2681dc173c34cedd25447bad","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def _store_batch_samples(self, scenario, batches):"},{"line_number":99,"context_line":"        success \u003d 0"},{"line_number":100,"context_line":"        for i, batch_size in enumerate(batches, start\u003d1):"},{"line_number":101,"context_line":"            try:"},{"line_number":102,"context_line":"                samples \u003d scenario._create_samples(batch_size)"},{"line_number":103,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":17,"id":"da85f559_ef299d38","line":100,"range":{"start_line":100,"start_character":15,"end_line":100,"end_character":25},"updated":"2015-11-09 17:31:01.000000000","message":"why \u0027batch_size\u0027? this shoul be at least \u0027batch\u0027","commit_id":"77546d84f949d4b70aa4431cb8abe40bc04a703b"},{"author":{"_account_id":8491,"name":"Illia Khudoshyn","email":"ikhudoshyn@mirantis.com","username":"ikhudoshyn"},"change_message_id":"bf38f81285d5efb15187e456786c4d1ecd072ce8","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def _store_batch_samples(self, scenario, batches):"},{"line_number":99,"context_line":"        success \u003d 0"},{"line_number":100,"context_line":"        for i, batch_size in enumerate(batches, start\u003d1):"},{"line_number":101,"context_line":"            try:"},{"line_number":102,"context_line":"                samples \u003d scenario._create_samples(batch_size)"},{"line_number":103,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":17,"id":"da85f559_1cbcf804","line":100,"in_reply_to":"da85f559_8aac6436","updated":"2015-11-11 14:23:18.000000000","message":"batch_size is very misleading here","commit_id":"77546d84f949d4b70aa4431cb8abe40bc04a703b"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"7d7c8aa257dad0571a478a86c2f9c753e7da8ba5","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def _store_batch_samples(self, scenario, batches):"},{"line_number":99,"context_line":"        success \u003d 0"},{"line_number":100,"context_line":"        for i, batch_size in enumerate(batches, start\u003d1):"},{"line_number":101,"context_line":"            try:"},{"line_number":102,"context_line":"                samples \u003d scenario._create_samples(batch_size)"},{"line_number":103,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":17,"id":"da85f559_8aac6436","line":100,"range":{"start_line":100,"start_character":15,"end_line":100,"end_character":25},"in_reply_to":"da85f559_ef299d38","updated":"2015-11-10 07:59:13.000000000","message":"ditto","commit_id":"77546d84f949d4b70aa4431cb8abe40bc04a703b"},{"author":{"_account_id":9601,"name":"Oleh Anufriiev","email":"oanufriev@mirantis.com","username":"oanufriev"},"change_message_id":"7498ddace7425f2e2681dc173c34cedd25447bad","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        success \u003d 0"},{"line_number":100,"context_line":"        for i, batch_size in enumerate(batches, start\u003d1):"},{"line_number":101,"context_line":"            try:"},{"line_number":102,"context_line":"                samples \u003d scenario._create_samples(batch_size)"},{"line_number":103,"context_line":"            except Exception:"},{"line_number":104,"context_line":"                LOG.warning(_(\"Failed to store batch %d of Ceilometer samples\""},{"line_number":105,"context_line":"                              \" during context creation\") % i)"}],"source_content_type":"text/x-python","patch_set":17,"id":"da85f559_2f080591","line":102,"range":{"start_line":102,"start_character":16,"end_line":102,"end_character":23},"updated":"2015-11-09 17:31:01.000000000","message":"IMO, this should be \u0027stored_samples\u0027","commit_id":"77546d84f949d4b70aa4431cb8abe40bc04a703b"},{"author":{"_account_id":9601,"name":"Oleh Anufriiev","email":"oanufriev@mirantis.com","username":"oanufriev"},"change_message_id":"7498ddace7425f2e2681dc173c34cedd25447bad","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                LOG.warning(_(\"Failed to store batch %d of Ceilometer samples\""},{"line_number":105,"context_line":"                              \" during context creation\") % i)"},{"line_number":106,"context_line":"                continue"},{"line_number":107,"context_line":"            success +\u003d 1"},{"line_number":108,"context_line":"        if success \u003d\u003d 0:"},{"line_number":109,"context_line":"            raise exceptions.ContextSetupFailure("},{"line_number":110,"context_line":"                ctx_name\u003dself.get_name(),"}],"source_content_type":"text/x-python","patch_set":17,"id":"da85f559_2f8c8534","line":107,"updated":"2015-11-09 17:31:01.000000000","message":"IMO, you have to move this line under L102\nelse \u0027succsess\u0027 will never equal to 0","commit_id":"77546d84f949d4b70aa4431cb8abe40bc04a703b"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"7d7c8aa257dad0571a478a86c2f9c753e7da8ba5","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                LOG.warning(_(\"Failed to store batch %d of Ceilometer samples\""},{"line_number":105,"context_line":"                              \" during context creation\") % i)"},{"line_number":106,"context_line":"                continue"},{"line_number":107,"context_line":"            success +\u003d 1"},{"line_number":108,"context_line":"        if success \u003d\u003d 0:"},{"line_number":109,"context_line":"            raise exceptions.ContextSetupFailure("},{"line_number":110,"context_line":"                ctx_name\u003dself.get_name(),"}],"source_content_type":"text/x-python","patch_set":17,"id":"da85f559_4a73dc15","line":107,"in_reply_to":"da85f559_2f8c8534","updated":"2015-11-10 07:59:13.000000000","message":"you are not correct here.","commit_id":"77546d84f949d4b70aa4431cb8abe40bc04a703b"},{"author":{"_account_id":8491,"name":"Illia Khudoshyn","email":"ikhudoshyn@mirantis.com","username":"ikhudoshyn"},"change_message_id":"bf38f81285d5efb15187e456786c4d1ecd072ce8","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                LOG.warning(_(\"Failed to store batch %d of Ceilometer samples\""},{"line_number":105,"context_line":"                              \" during context creation\") % i)"},{"line_number":106,"context_line":"                continue"},{"line_number":107,"context_line":"            success +\u003d 1"},{"line_number":108,"context_line":"        if success \u003d\u003d 0:"},{"line_number":109,"context_line":"            raise exceptions.ContextSetupFailure("},{"line_number":110,"context_line":"                ctx_name\u003dself.get_name(),"}],"source_content_type":"text/x-python","patch_set":17,"id":"da85f559_fcd6d44d","line":107,"in_reply_to":"da85f559_4a73dc15","updated":"2015-11-11 14:23:18.000000000","message":"Igor, the code seems to work properly here. Yet it looks misleading.","commit_id":"77546d84f949d4b70aa4431cb8abe40bc04a703b"},{"author":{"_account_id":9601,"name":"Oleh Anufriiev","email":"oanufriev@mirantis.com","username":"oanufriev"},"change_message_id":"7498ddace7425f2e2681dc173c34cedd25447bad","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                context\u003d{\"user\": user, \"task\": self.context[\"task\"]}"},{"line_number":128,"context_line":"            )"},{"line_number":129,"context_line":"            for i in moves.xrange(self.config[\"resources_per_tenant\"]):"},{"line_number":130,"context_line":"                samples_to_create \u003d scenario._make_samples("},{"line_number":131,"context_line":"                    count\u003dself.config[\"samples_per_resource\"],"},{"line_number":132,"context_line":"                    interval\u003dself.config[\"timestamp_interval\"],"},{"line_number":133,"context_line":"                    metadata_list\u003dself.config.get(\"metadata_list\"),"}],"source_content_type":"text/x-python","patch_set":17,"id":"da85f559_4fba2925","line":130,"range":{"start_line":130,"start_character":16,"end_line":130,"end_character":33},"updated":"2015-11-09 17:31:01.000000000","message":"here will be returned generator of batches. Right?\nif so, please rename \u0027samples_to_create\u0027 to someting like\n\u0027batches_generator\u0027","commit_id":"77546d84f949d4b70aa4431cb8abe40bc04a703b"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"7d7c8aa257dad0571a478a86c2f9c753e7da8ba5","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                context\u003d{\"user\": user, \"task\": self.context[\"task\"]}"},{"line_number":128,"context_line":"            )"},{"line_number":129,"context_line":"            for i in moves.xrange(self.config[\"resources_per_tenant\"]):"},{"line_number":130,"context_line":"                samples_to_create \u003d scenario._make_samples("},{"line_number":131,"context_line":"                    count\u003dself.config[\"samples_per_resource\"],"},{"line_number":132,"context_line":"                    interval\u003dself.config[\"timestamp_interval\"],"},{"line_number":133,"context_line":"                    metadata_list\u003dself.config.get(\"metadata_list\"),"}],"source_content_type":"text/x-python","patch_set":17,"id":"da85f559_ca0fcc86","line":130,"range":{"start_line":130,"start_character":16,"end_line":130,"end_character":33},"in_reply_to":"da85f559_4fba2925","updated":"2015-11-10 07:59:13.000000000","message":"this method returns generator of batches only if optional parameter batch_size is not set, otherwise it is a list of sample so it doesn\u0027t need to be renamed.","commit_id":"77546d84f949d4b70aa4431cb8abe40bc04a703b"},{"author":{"_account_id":8491,"name":"Illia Khudoshyn","email":"ikhudoshyn@mirantis.com","username":"ikhudoshyn"},"change_message_id":"bf38f81285d5efb15187e456786c4d1ecd072ce8","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                context\u003d{\"user\": user, \"task\": self.context[\"task\"]}"},{"line_number":128,"context_line":"            )"},{"line_number":129,"context_line":"            for i in moves.xrange(self.config[\"resources_per_tenant\"]):"},{"line_number":130,"context_line":"                samples_to_create \u003d scenario._make_samples("},{"line_number":131,"context_line":"                    count\u003dself.config[\"samples_per_resource\"],"},{"line_number":132,"context_line":"                    interval\u003dself.config[\"timestamp_interval\"],"},{"line_number":133,"context_line":"                    metadata_list\u003dself.config.get(\"metadata_list\"),"}],"source_content_type":"text/x-python","patch_set":17,"id":"da85f559_1c32b8f2","line":130,"in_reply_to":"da85f559_ca0fcc86","updated":"2015-11-11 14:23:18.000000000","message":"Igor, I\u0027m afraid the mathod always returns generator) Even if it is a generator that only produces one list of samples.","commit_id":"77546d84f949d4b70aa4431cb8abe40bc04a703b"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"257ade2a6d53e3e2efa2ad049809e3ed28ad1d5d","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                context\u003d{\"user\": user, \"task\": self.context[\"task\"]}"},{"line_number":128,"context_line":"            )"},{"line_number":129,"context_line":"            for i in moves.xrange(self.config[\"resources_per_tenant\"]):"},{"line_number":130,"context_line":"                samples_to_create \u003d scenario._make_samples("},{"line_number":131,"context_line":"                    count\u003dself.config[\"samples_per_resource\"],"},{"line_number":132,"context_line":"                    interval\u003dself.config[\"timestamp_interval\"],"},{"line_number":133,"context_line":"                    metadata_list\u003dself.config.get(\"metadata_list\"),"}],"source_content_type":"text/x-python","patch_set":17,"id":"da85f559_85ec5690","line":130,"range":{"start_line":130,"start_character":16,"end_line":130,"end_character":33},"in_reply_to":"da85f559_ca0fcc86","updated":"2015-11-10 08:56:02.000000000","message":"s/batch_size is not set/batch_size is set/","commit_id":"77546d84f949d4b70aa4431cb8abe40bc04a703b"},{"author":{"_account_id":7369,"name":"Sergey Skripnick","email":"sskripnick@mirantis.com","username":"redixin"},"change_message_id":"abafa5a74dcb43c05c2b5b12bd9c6083b7b112d0","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        success \u003d 0"},{"line_number":100,"context_line":"        for i, batch in enumerate(batches, start\u003d1):"},{"line_number":101,"context_line":"            try:"},{"line_number":102,"context_line":"                samples \u003d scenario._create_samples(batch)"},{"line_number":103,"context_line":"                success +\u003d 1"},{"line_number":104,"context_line":"            except Exception:"},{"line_number":105,"context_line":"                LOG.warning(_(\"Failed to store batch %d of Ceilometer samples\""}],"source_content_type":"text/x-python","patch_set":18,"id":"da85f559_6f786490","line":102,"updated":"2015-11-13 14:28:50.000000000","message":"This method will return only last created item.","commit_id":"a4a4483e15d32c63b7c3295c7938da445672ab5f"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"8113583f748cb93d2714924ddf031b4370e18bb4","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        success \u003d 0"},{"line_number":100,"context_line":"        for i, batch in enumerate(batches, start\u003d1):"},{"line_number":101,"context_line":"            try:"},{"line_number":102,"context_line":"                samples \u003d scenario._create_samples(batch)"},{"line_number":103,"context_line":"                success +\u003d 1"},{"line_number":104,"context_line":"            except Exception:"},{"line_number":105,"context_line":"                LOG.warning(_(\"Failed to store batch %d of Ceilometer samples\""}],"source_content_type":"text/x-python","patch_set":18,"id":"da85f559_200eebe5","line":102,"in_reply_to":"da85f559_6f786490","updated":"2015-11-13 15:14:20.000000000","message":"Yes, this method returns only last successfully stored batch. We did it on purpose to avoid creating in context Millions of samples. Our ordinary benchmark tests required to create (0.5, 1) Million samples per resource. That\u0027s why we do not need to have all that samples in context. To get resource_id and other info we need in tests one batch is fair enough.","commit_id":"a4a4483e15d32c63b7c3295c7938da445672ab5f"},{"author":{"_account_id":7369,"name":"Sergey Skripnick","email":"sskripnick@mirantis.com","username":"redixin"},"change_message_id":"abafa5a74dcb43c05c2b5b12bd9c6083b7b112d0","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                samples \u003d self._store_batch_samples(scenario,"},{"line_number":136,"context_line":"                                                    samples_to_create)"},{"line_number":137,"context_line":"                for sample in samples:"},{"line_number":138,"context_line":"                    self.context[\"tenants\"][tenant_id][\"samples\"].append("},{"line_number":139,"context_line":"                        sample.to_dict())"},{"line_number":140,"context_line":"                self.context[\"tenants\"][tenant_id][\"resources\"].append("},{"line_number":141,"context_line":"                    samples[0].resource_id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"da85f559_ef92149f","line":138,"updated":"2015-11-13 14:28:50.000000000","message":"Just move this line inside of _store_batch_samples","commit_id":"a4a4483e15d32c63b7c3295c7938da445672ab5f"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"bb3a75cb879ff96746dc508864d8322f2a52fa05","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                samples \u003d scenario._create_samples(batch)"},{"line_number":103,"context_line":"                success +\u003d 1"},{"line_number":104,"context_line":"            except Exception:"},{"line_number":105,"context_line":"                LOG.warning(_(\"Failed to store batch %d of Ceilometer samples\""},{"line_number":106,"context_line":"                              \" during context creation\") % i)"},{"line_number":107,"context_line":"        if success \u003d\u003d 0:"},{"line_number":108,"context_line":"            raise exceptions.ContextSetupFailure("}],"source_content_type":"text/x-python","patch_set":19,"id":"ba8a016a_002f043f","line":105,"updated":"2015-11-23 13:21:09.000000000","message":"something is unclear here for me... \n\nWe should create all samples or fail, why we are continue execution even if part of samples failed to create?","commit_id":"8864e9781429664e0548fc6dcdcd963a157afbbe"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"3d8d97d60a728b68ace5cde3126d3d22ccac7e0b","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                samples \u003d scenario._create_samples(batch)"},{"line_number":103,"context_line":"                success +\u003d 1"},{"line_number":104,"context_line":"            except Exception:"},{"line_number":105,"context_line":"                LOG.warning(_(\"Failed to store batch %d of Ceilometer samples\""},{"line_number":106,"context_line":"                              \" during context creation\") % i)"},{"line_number":107,"context_line":"        if success \u003d\u003d 0:"},{"line_number":108,"context_line":"            raise exceptions.ContextSetupFailure("}],"source_content_type":"text/x-python","patch_set":19,"id":"ba8a016a_afdf0339","line":105,"in_reply_to":"ba8a016a_002f043f","updated":"2015-11-23 14:36:21.000000000","message":"Hi Boris! As I wrote earlier in answer on some previous comment usually in our Ceilo scenarios we need to create a great amount of samples (1-2 Millions) to have enough data in storage for performance tests. So the answer for your question is that we can close eyes for missing some batches in our tests for context creation. So for context in 1 Mil samples batch equal 1% (in this case the rate of context creation is the same) and loosing 10k samples not critical for test result. For 10 Mil samples batch could be 0.1% of all data. And our tests for statistics won\u0027t be affected too much, and we will be able to finish test even if something happens with some batches in context creation.","commit_id":"8864e9781429664e0548fc6dcdcd963a157afbbe"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"f1e734e15dca436144b09ce9d19d94789b283ddd","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                samples \u003d scenario._create_samples(batch)"},{"line_number":103,"context_line":"                success +\u003d 1"},{"line_number":104,"context_line":"            except Exception:"},{"line_number":105,"context_line":"                LOG.warning(_(\"Failed to store batch %d of Ceilometer samples\""},{"line_number":106,"context_line":"                              \" during context creation\") % i)"},{"line_number":107,"context_line":"        if success \u003d\u003d 0:"},{"line_number":108,"context_line":"            raise exceptions.ContextSetupFailure("}],"source_content_type":"text/x-python","patch_set":19,"id":"ba8a016a_50013669","line":105,"in_reply_to":"ba8a016a_afdf0339","updated":"2015-11-24 01:28:20.000000000","message":"Ok, I can understand that you don\u0027t care about ALL operations, and if there will be some small issues (like 1% failed to created) we treat context as successfully created. \n\nBut your code says another thing, it says: \n\n  \"Even if 1% passed treat context as successfully created\"  which doesn\u0027t seems like to be a true. \n\nI believe you should refactor a bit if success \u003d\u003d 0: code to make something like: \n\n  if success \u003c len(batches) - N: \n\nWhere N should be specified via task file, by default it should be 1 (no failures).","commit_id":"8864e9781429664e0548fc6dcdcd963a157afbbe"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"ea5ca87256fb4eab58477e0df23b661668bf7a58","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            },"},{"line_number":86,"context_line":"            \"batches_allow_lose\": {"},{"line_number":87,"context_line":"                \"type\": \"integer\","},{"line_number":88,"context_line":"                \"minimum\": 1"},{"line_number":89,"context_line":"            }"},{"line_number":90,"context_line":"        },"},{"line_number":91,"context_line":"        \"required\": [\"counter_name\", \"counter_type\", \"counter_unit\","}],"source_content_type":"text/x-python","patch_set":20,"id":"9a8ffd7b_35af612b","line":88,"updated":"2015-11-28 08:44:35.000000000","message":"why minimum is 1 and not 0? \n\nI believe I would prefer by default to not ignore loses.","commit_id":"06cc27a5e79bf78827fc7a829177964952cf1be4"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"8a68ba4d30a32129389fc035abb059b5e94f3ee9","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            },"},{"line_number":86,"context_line":"            \"batches_allow_lose\": {"},{"line_number":87,"context_line":"                \"type\": \"integer\","},{"line_number":88,"context_line":"                \"minimum\": 1"},{"line_number":89,"context_line":"            }"},{"line_number":90,"context_line":"        },"},{"line_number":91,"context_line":"        \"required\": [\"counter_name\", \"counter_type\", \"counter_unit\","}],"source_content_type":"text/x-python","patch_set":20,"id":"9a8ffd7b_ab751bcb","line":88,"in_reply_to":"9a8ffd7b_35af612b","updated":"2015-11-30 09:09:29.000000000","message":"I thought that we use optional parameter when allow to lose even one batch otherwise we do not use it. But for consistency it should be set to zero.","commit_id":"06cc27a5e79bf78827fc7a829177964952cf1be4"}],"rally/plugins/openstack/scenarios/ceilometer/utils.py":[{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"e7e1cfe10c99057761981f509d3b5d271f3a77c1","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        :param timestamp: specifies timestamp for samples"},{"line_number":47,"context_line":"        :param metadata_list: specifies list of resource metadata"},{"line_number":48,"context_line":"        :param batch: specifies number of samples to store in one query"},{"line_number":49,"context_line":"        :returns: list of samples used to create samples"},{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        batch \u003d batch if (batch and batch \u003c count) else count"},{"line_number":52,"context_line":"        sample \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_ff49c531","line":49,"updated":"2015-10-09 13:27:18.000000000","message":"Now it return generator.","commit_id":"92b3b98deabfc978bc3d49ee6c504e5b711760cd"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"da189730c512235e5ce53f0ab29f6796c1f730dd","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        :param timestamp: specifies timestamp for samples"},{"line_number":47,"context_line":"        :param metadata_list: specifies list of resource metadata"},{"line_number":48,"context_line":"        :param batch: specifies number of samples to store in one query"},{"line_number":49,"context_line":"        :returns: list of samples used to create samples"},{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        batch \u003d batch if (batch and batch \u003c count) else count"},{"line_number":52,"context_line":"        sample \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_b9da8215","line":49,"in_reply_to":"7a2fa921_ff49c531","updated":"2015-10-09 14:48:58.000000000","message":"agreed, missed it.\n\nwill improve","commit_id":"92b3b98deabfc978bc3d49ee6c504e5b711760cd"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"e7e1cfe10c99057761981f509d3b5d271f3a77c1","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        sent \u003d 1"},{"line_number":70,"context_line":"        samples \u003d []"},{"line_number":71,"context_line":"        for i in six.moves.xrange(count):"},{"line_number":72,"context_line":"            if i \u003d\u003d ((batch - 1) * sent):"},{"line_number":73,"context_line":"                yield samples"},{"line_number":74,"context_line":"                sent +\u003d 1"},{"line_number":75,"context_line":"                samples \u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_2225e05a","line":72,"updated":"2015-10-09 13:27:18.000000000","message":"We could get rid of sent variable just use % operator.","commit_id":"92b3b98deabfc978bc3d49ee6c504e5b711760cd"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"da189730c512235e5ce53f0ab29f6796c1f730dd","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        sent \u003d 1"},{"line_number":70,"context_line":"        samples \u003d []"},{"line_number":71,"context_line":"        for i in six.moves.xrange(count):"},{"line_number":72,"context_line":"            if i \u003d\u003d ((batch - 1) * sent):"},{"line_number":73,"context_line":"                yield samples"},{"line_number":74,"context_line":"                sent +\u003d 1"},{"line_number":75,"context_line":"                samples \u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_9ce3f4d8","line":72,"in_reply_to":"7a2fa921_2225e05a","updated":"2015-10-09 14:48:58.000000000","message":"Done","commit_id":"92b3b98deabfc978bc3d49ee6c504e5b711760cd"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"e7e1cfe10c99057761981f509d3b5d271f3a77c1","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                    if i \u003c count / len_meta * (j + 1):"},{"line_number":85,"context_line":"                        sample[\"resource_metadata\"] \u003d metadata_list[j]"},{"line_number":86,"context_line":"            samples.append(sample)"},{"line_number":87,"context_line":"        else:"},{"line_number":88,"context_line":"            yield samples"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def _get_alarm_dict(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_9f9211f5","line":87,"updated":"2015-10-09 13:27:18.000000000","message":"Why was used here else clause? There is no any break clause inside the loop. So looks like its useless.","commit_id":"92b3b98deabfc978bc3d49ee6c504e5b711760cd"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"da189730c512235e5ce53f0ab29f6796c1f730dd","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                    if i \u003c count / len_meta * (j + 1):"},{"line_number":85,"context_line":"                        sample[\"resource_metadata\"] \u003d metadata_list[j]"},{"line_number":86,"context_line":"            samples.append(sample)"},{"line_number":87,"context_line":"        else:"},{"line_number":88,"context_line":"            yield samples"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def _get_alarm_dict(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_5ca1dc44","line":87,"in_reply_to":"7a2fa921_9f9211f5","updated":"2015-10-09 14:48:58.000000000","message":"else we need for case count % batch !\u003d 0","commit_id":"92b3b98deabfc978bc3d49ee6c504e5b711760cd"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"bf022aa0a98e54226955ff13a75bdac5d6d7301e","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        :param source: specifies source for samples"},{"line_number":46,"context_line":"        :param timestamp: specifies timestamp for samples"},{"line_number":47,"context_line":"        :param metadata_list: specifies list of resource metadata"},{"line_number":48,"context_line":"        :param batch: specifies number of samples to store in one query"},{"line_number":49,"context_line":"        :returns: generator of samples used to create samples"},{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        batch \u003d batch if (batch and batch \u003c count) else count"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a2ca52d_6ca03ba0","line":48,"updated":"2015-10-14 13:56:52.000000000","message":"\u0027batch_size\u0027 again might make more sense.","commit_id":"ab7c3f62fc00bbf4846dba9a726f6fdddd817acd"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"83323a50d058aaf08263b7fa1bc33408114bab16","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        :param source: specifies source for samples"},{"line_number":46,"context_line":"        :param timestamp: specifies timestamp for samples"},{"line_number":47,"context_line":"        :param metadata_list: specifies list of resource metadata"},{"line_number":48,"context_line":"        :param batch: specifies number of samples to store in one query"},{"line_number":49,"context_line":"        :returns: generator of samples used to create samples"},{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        batch \u003d batch if (batch and batch \u003c count) else count"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_67b078f5","line":48,"in_reply_to":"5a2ca52d_6ca03ba0","updated":"2015-10-19 11:51:07.000000000","message":"Done","commit_id":"ab7c3f62fc00bbf4846dba9a726f6fdddd817acd"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"bf022aa0a98e54226955ff13a75bdac5d6d7301e","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        :param timestamp: specifies timestamp for samples"},{"line_number":47,"context_line":"        :param metadata_list: specifies list of resource metadata"},{"line_number":48,"context_line":"        :param batch: specifies number of samples to store in one query"},{"line_number":49,"context_line":"        :returns: generator of samples used to create samples"},{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        batch \u003d batch if (batch and batch \u003c count) else count"},{"line_number":52,"context_line":"        sample \u003d {"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a2ca52d_8cd7d7ec","line":49,"updated":"2015-10-14 13:56:52.000000000","message":"Clarify that the generator returns lists of samples.","commit_id":"ab7c3f62fc00bbf4846dba9a726f6fdddd817acd"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"83323a50d058aaf08263b7fa1bc33408114bab16","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        :param timestamp: specifies timestamp for samples"},{"line_number":47,"context_line":"        :param metadata_list: specifies list of resource metadata"},{"line_number":48,"context_line":"        :param batch: specifies number of samples to store in one query"},{"line_number":49,"context_line":"        :returns: generator of samples used to create samples"},{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        batch \u003d batch if (batch and batch \u003c count) else count"},{"line_number":52,"context_line":"        sample \u003d {"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_0796644c","line":49,"in_reply_to":"5a2ca52d_8cd7d7ec","updated":"2015-10-19 11:51:07.000000000","message":"Done","commit_id":"ab7c3f62fc00bbf4846dba9a726f6fdddd817acd"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"bf022aa0a98e54226955ff13a75bdac5d6d7301e","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                    if i \u003c count / len_meta * (j + 1):"},{"line_number":83,"context_line":"                        sample[\"resource_metadata\"] \u003d metadata_list[j]"},{"line_number":84,"context_line":"            samples.append(sample)"},{"line_number":85,"context_line":"        else:"},{"line_number":86,"context_line":"            yield samples"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def _get_alarm_dict(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a2ca52d_0c398741","line":85,"updated":"2015-10-14 13:56:52.000000000","message":"There\u0027s again no break in the loop, so the else is unnecessary.","commit_id":"ab7c3f62fc00bbf4846dba9a726f6fdddd817acd"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"ae81d8302b4ef384470a37f96a3638ea6b3bb4ce","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        :returns: generator returns lists of samples"},{"line_number":46,"context_line":"        \"\"\""},{"line_number":47,"context_line":"        batch_size \u003d (batch_size if (batch_size and batch_size \u003c count)"},{"line_number":48,"context_line":"                      else count)"},{"line_number":49,"context_line":"        sample \u003d {"},{"line_number":50,"context_line":"            \"counter_name\": counter_name,"},{"line_number":51,"context_line":"            \"counter_type\": counter_type,"}],"source_content_type":"text/x-python","patch_set":16,"id":"da85f559_4055581b","line":48,"updated":"2015-11-07 00:42:54.000000000","message":"If batch_size \u003e\u003d count then we will sent samples any way. So we will simplify this line to:\n  batch_size \u003d batch_size or count","commit_id":"ae4de259208905cf1444d8e2fc82f3e33f69d491"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"553bf8c043c0e8abbba62893eba17506b4dea07e","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        :returns: generator returns lists of samples"},{"line_number":46,"context_line":"        \"\"\""},{"line_number":47,"context_line":"        batch_size \u003d (batch_size if (batch_size and batch_size \u003c count)"},{"line_number":48,"context_line":"                      else count)"},{"line_number":49,"context_line":"        sample \u003d {"},{"line_number":50,"context_line":"            \"counter_name\": counter_name,"},{"line_number":51,"context_line":"            \"counter_type\": counter_type,"}],"source_content_type":"text/x-python","patch_set":16,"id":"da85f559_bcf1b1cf","line":48,"in_reply_to":"da85f559_4055581b","updated":"2015-11-09 08:50:41.000000000","message":"Nice catch, thanks will improve.","commit_id":"ae4de259208905cf1444d8e2fc82f3e33f69d491"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"626fcf762df2e46b0482ee6b058db70309b62dd7","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        :returns: generator returns lists of samples"},{"line_number":46,"context_line":"        \"\"\""},{"line_number":47,"context_line":"        batch_size \u003d (batch_size if (batch_size and batch_size \u003c count)"},{"line_number":48,"context_line":"                      else count)"},{"line_number":49,"context_line":"        sample \u003d {"},{"line_number":50,"context_line":"            \"counter_name\": counter_name,"},{"line_number":51,"context_line":"            \"counter_type\": counter_type,"}],"source_content_type":"text/x-python","patch_set":16,"id":"da85f559_13ff9e02","line":48,"in_reply_to":"da85f559_4055581b","updated":"2015-11-08 10:49:52.000000000","message":"agreed, Roman\u0027s idea has better semantics aslo","commit_id":"ae4de259208905cf1444d8e2fc82f3e33f69d491"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"3430da5cf286564cdd25840ded836b5302be7c7e","unresolved":false,"context_lines":[{"line_number":23,"context_line":"class CeilometerScenario(scenario.OpenStackScenario):"},{"line_number":24,"context_line":"    \"\"\"Base class for Ceilometer scenarios with basic atomic actions.\"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def _make_samples(self, count\u003d1, interval\u003d0, counter_name\u003d\"cpu_util\","},{"line_number":27,"context_line":"                      counter_type\u003d\"gauge\", counter_unit\u003d\"%\", counter_volume\u003d1,"},{"line_number":28,"context_line":"                      project_id\u003dNone, user_id\u003dNone, source\u003dNone,"},{"line_number":29,"context_line":"                      timestamp\u003dNone, metadata_list\u003dNone, batch_size\u003dNone):"}],"source_content_type":"text/x-python","patch_set":17,"id":"da85f559_4f04807d","line":26,"updated":"2015-11-09 10:57:56.000000000","message":"Why this method is located here? It looks like it used only in context.","commit_id":"77546d84f949d4b70aa4431cb8abe40bc04a703b"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"b93b4d3ec550e4f3f3380ad30603b56b59a788ad","unresolved":false,"context_lines":[{"line_number":23,"context_line":"class CeilometerScenario(scenario.OpenStackScenario):"},{"line_number":24,"context_line":"    \"\"\"Base class for Ceilometer scenarios with basic atomic actions.\"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def _make_samples(self, count\u003d1, interval\u003d0, counter_name\u003d\"cpu_util\","},{"line_number":27,"context_line":"                      counter_type\u003d\"gauge\", counter_unit\u003d\"%\", counter_volume\u003d1,"},{"line_number":28,"context_line":"                      project_id\u003dNone, user_id\u003dNone, source\u003dNone,"},{"line_number":29,"context_line":"                      timestamp\u003dNone, metadata_list\u003dNone, batch_size\u003dNone):"}],"source_content_type":"text/x-python","patch_set":17,"id":"da85f559_e4c1d2e5","line":26,"in_reply_to":"da85f559_4f04807d","updated":"2015-11-09 13:53:25.000000000","message":"this method is used in context for each scenarios. Where are you expecting to see this patch?","commit_id":"77546d84f949d4b70aa4431cb8abe40bc04a703b"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"7a57442d78941abfe08e0385d37ddffb708c83d5","unresolved":false,"context_lines":[{"line_number":23,"context_line":"class CeilometerScenario(scenario.OpenStackScenario):"},{"line_number":24,"context_line":"    \"\"\"Base class for Ceilometer scenarios with basic atomic actions.\"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def _make_samples(self, count\u003d1, interval\u003d0, counter_name\u003d\"cpu_util\","},{"line_number":27,"context_line":"                      counter_type\u003d\"gauge\", counter_unit\u003d\"%\", counter_volume\u003d1,"},{"line_number":28,"context_line":"                      project_id\u003dNone, user_id\u003dNone, source\u003dNone,"},{"line_number":29,"context_line":"                      timestamp\u003dNone, metadata_list\u003dNone, batch_size\u003dNone):"}],"source_content_type":"text/x-python","patch_set":17,"id":"da85f559_f31af16d","line":26,"in_reply_to":"da85f559_e4c1d2e5","updated":"2015-11-09 16:06:41.000000000","message":"I suppose this code should be in context class :)","commit_id":"77546d84f949d4b70aa4431cb8abe40bc04a703b"},{"author":{"_account_id":8491,"name":"Illia Khudoshyn","email":"ikhudoshyn@mirantis.com","username":"ikhudoshyn"},"change_message_id":"bf38f81285d5efb15187e456786c4d1ecd072ce8","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        :param timestamp: specifies timestamp for samples"},{"line_number":43,"context_line":"        :param metadata_list: specifies list of resource metadata"},{"line_number":44,"context_line":"        :param batch_size: specifies number of samples to store in one query"},{"line_number":45,"context_line":"        :returns: generator returns lists of samples"},{"line_number":46,"context_line":"        \"\"\""},{"line_number":47,"context_line":"        batch_size \u003d batch_size or count"},{"line_number":48,"context_line":"        sample \u003d {"}],"source_content_type":"text/x-python","patch_set":17,"id":"da85f559_e905b479","line":45,"updated":"2015-11-11 14:23:18.000000000","message":"generator that produces lists..","commit_id":"77546d84f949d4b70aa4431cb8abe40bc04a703b"},{"author":{"_account_id":8491,"name":"Illia Khudoshyn","email":"ikhudoshyn@mirantis.com","username":"ikhudoshyn"},"change_message_id":"bf38f81285d5efb15187e456786c4d1ecd072ce8","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                # NOTE(idegtiarov): Adding more then one template of metadata"},{"line_number":77,"context_line":"                # required it\u0027s proportional distribution among whole samples."},{"line_number":78,"context_line":"                sample_item[\"resource_metadata\"] \u003d metadata_list["},{"line_number":79,"context_line":"                    i * len_meta // count"},{"line_number":80,"context_line":"                ]"},{"line_number":81,"context_line":"            samples.append(sample_item)"},{"line_number":82,"context_line":"        yield samples"}],"source_content_type":"text/x-python","patch_set":17,"id":"da85f559_49bf20aa","line":79,"updated":"2015-11-11 14:23:18.000000000","message":"Looks like there should be i % len_meta.\nIn fact this is the only my comment that makes me give -1.\nI guess you could find the issue if there was a test WITH metadata","commit_id":"77546d84f949d4b70aa4431cb8abe40bc04a703b"},{"author":{"_account_id":8491,"name":"Illia Khudoshyn","email":"ikhudoshyn@mirantis.com","username":"ikhudoshyn"},"change_message_id":"77c6f9771b8968e0b4767f9c2ac73238ab55ae64","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                # NOTE(idegtiarov): Adding more then one template of metadata"},{"line_number":77,"context_line":"                # required it\u0027s proportional distribution among whole samples."},{"line_number":78,"context_line":"                sample_item[\"resource_metadata\"] \u003d metadata_list["},{"line_number":79,"context_line":"                    i * len_meta // count"},{"line_number":80,"context_line":"                ]"},{"line_number":81,"context_line":"            samples.append(sample_item)"},{"line_number":82,"context_line":"        yield samples"}],"source_content_type":"text/x-python","patch_set":17,"id":"da85f559_5fa5929f","line":79,"in_reply_to":"da85f559_49bf20aa","updated":"2015-11-11 14:43:13.000000000","message":"Sorry here. I missed \u0027// count\u0027. Looks like it\u0027s ok.","commit_id":"77546d84f949d4b70aa4431cb8abe40bc04a703b"}],"tests/unit/plugins/openstack/context/ceilometer/test_samples.py":[{"author":{"_account_id":8491,"name":"Illia Khudoshyn","email":"ikhudoshyn@mirantis.com","username":"ikhudoshyn"},"change_message_id":"77c6f9771b8968e0b4767f9c2ac73238ab55ae64","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            \"counter_name\": \"fake-counter-name\","},{"line_number":115,"context_line":"            \"counter_type\": \"fake-counter-type\","},{"line_number":116,"context_line":"            \"counter_unit\": \"fake-counter-unit\","},{"line_number":117,"context_line":"            \"counter_volume\": 100,"},{"line_number":118,"context_line":"            \"resource_id\": \"fake-resource-id\","},{"line_number":119,"context_line":"            \"metadata_list\": ["},{"line_number":120,"context_line":"                {\"status\": \"active\", \"name\": \"fake_resource\","}],"source_content_type":"text/x-python","patch_set":17,"id":"da85f559_3fc3ee58","line":117,"updated":"2015-11-11 14:43:13.000000000","message":"We should generate resource_id, not assign it here.","commit_id":"77546d84f949d4b70aa4431cb8abe40bc04a703b"}],"tests/unit/plugins/openstack/scenarios/ceilometer/test_utils.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"d3f42cce0b229543fc23e84cb7e51b5328ff63a9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"fa80f949_7710fba8","updated":"2015-11-05 15:21:26.000000000","message":"Need a new test that includes batch_size","commit_id":"78572ece1aa2de88d9e409ca2c22a28ee8c29946"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"812ea5e86c77dbf3d09c7d6a0f539c2252a23356","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"fa80f949_14a08a8f","in_reply_to":"fa80f949_7710fba8","updated":"2015-11-05 15:53:35.000000000","message":"Done","commit_id":"78572ece1aa2de88d9e409ca2c22a28ee8c29946"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"d3f42cce0b229543fc23e84cb7e51b5328ff63a9","unresolved":false,"context_lines":[{"line_number":34,"context_line":"            return_value\u003d\"fake_resource\")"},{"line_number":35,"context_line":"        test_timestamp \u003d datetime.datetime(2015, 10, 20, 14, 18, 40)"},{"line_number":36,"context_line":"        result \u003d list(self.scenario._make_samples(count\u003d2, interval\u003d60,"},{"line_number":37,"context_line":"                                                  timestamp\u003dtest_timestamp))[0]"},{"line_number":38,"context_line":"        expected \u003d {\"counter_name\": \"cpu_util\","},{"line_number":39,"context_line":"                    \"counter_type\": \"gauge\","},{"line_number":40,"context_line":"                    \"counter_unit\": \"%\","}],"source_content_type":"text/x-python","patch_set":14,"id":"fa80f949_b77d03e9","line":37,"updated":"2015-11-05 15:21:26.000000000","message":"You should also ensure that there are no other batches here, not just blindly grab the 0th batch.","commit_id":"78572ece1aa2de88d9e409ca2c22a28ee8c29946"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"812ea5e86c77dbf3d09c7d6a0f539c2252a23356","unresolved":false,"context_lines":[{"line_number":34,"context_line":"            return_value\u003d\"fake_resource\")"},{"line_number":35,"context_line":"        test_timestamp \u003d datetime.datetime(2015, 10, 20, 14, 18, 40)"},{"line_number":36,"context_line":"        result \u003d list(self.scenario._make_samples(count\u003d2, interval\u003d60,"},{"line_number":37,"context_line":"                                                  timestamp\u003dtest_timestamp))[0]"},{"line_number":38,"context_line":"        expected \u003d {\"counter_name\": \"cpu_util\","},{"line_number":39,"context_line":"                    \"counter_type\": \"gauge\","},{"line_number":40,"context_line":"                    \"counter_unit\": \"%\","}],"source_content_type":"text/x-python","patch_set":14,"id":"fa80f949_74b796d8","line":37,"in_reply_to":"fa80f949_b77d03e9","updated":"2015-11-05 15:53:35.000000000","message":"Done","commit_id":"78572ece1aa2de88d9e409ca2c22a28ee8c29946"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"c15d0b5f6f1785ade3539121d677f5d5acedffd9","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        samples_int \u003d (parser.parse(result[0][-1][\"timestamp\"]) -"},{"line_number":66,"context_line":"                       parser.parse(result[1][0][\"timestamp\"])).seconds"},{"line_number":67,"context_line":"        # NOTE(idegtiarov): here we check that interval between last sample in"},{"line_number":68,"context_line":"        # first batch and first sample in second batch is equal 60 sec."},{"line_number":69,"context_line":"        self.assertEqual(60, samples_int)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def test__list_alarms_by_id(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa80f949_45388fa0","line":68,"updated":"2015-11-05 21:23:12.000000000","message":"At some future date it\u0027d be nice to see if these can be turned into one case with DDT, but it\u0027s not a blocker.","commit_id":"b7745e5b932148b695b22ac1c20d20e16a7b27fe"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"137694c9ad750f5b73e75137c1b157badf6969c6","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                       parser.parse(result[1][0][\"timestamp\"])).seconds"},{"line_number":68,"context_line":"        # NOTE(idegtiarov): here we check that interval between last sample in"},{"line_number":69,"context_line":"        # first batch and first sample in second batch is equal 60 sec."},{"line_number":70,"context_line":"        self.assertEqual(60, samples_int)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test__make_timestamp_query(self):"},{"line_number":73,"context_line":"        start_time \u003d \"2015-09-09T00:00:00\""}],"source_content_type":"text/x-python","patch_set":20,"id":"9a8ffd7b_75b2c9e6","line":70,"updated":"2015-11-28 08:19:12.000000000","message":"is it a perfect 60 (second) here?","commit_id":"06cc27a5e79bf78827fc7a829177964952cf1be4"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"ea5ca87256fb4eab58477e0df23b661668bf7a58","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                       parser.parse(result[1][0][\"timestamp\"])).seconds"},{"line_number":68,"context_line":"        # NOTE(idegtiarov): here we check that interval between last sample in"},{"line_number":69,"context_line":"        # first batch and first sample in second batch is equal 60 sec."},{"line_number":70,"context_line":"        self.assertEqual(60, samples_int)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test__make_timestamp_query(self):"},{"line_number":73,"context_line":"        start_time \u003d \"2015-09-09T00:00:00\""}],"source_content_type":"text/x-python","patch_set":20,"id":"9a8ffd7b_d59295f5","line":70,"in_reply_to":"9a8ffd7b_75b2c9e6","updated":"2015-11-28 08:44:35.000000000","message":"yep","commit_id":"06cc27a5e79bf78827fc7a829177964952cf1be4"}]}
