)]}'
{"monasca_common/kafka/producer.py":[{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"89485b56c8218089b4956f8df47b628211c37256","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        try:"},{"line_number":47,"context_line":"            if key is None:"},{"line_number":48,"context_line":"                key \u003d int(time.time() * 1000)"},{"line_number":49,"context_line":"            if type(key) is not unicode:"},{"line_number":50,"context_line":"                key \u003d str(key)"},{"line_number":51,"context_line":"            self._producer.send_messages(topic, key.encode(\u0027utf-8\u0027), *messages)"},{"line_number":52,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_97e843e4","line":49,"range":{"start_line":49,"start_character":32,"end_line":49,"end_character":39},"updated":"2016-06-06 20:58:57.000000000","message":"If we\u0027re going to do unicode conversions it would be better to check if the type is unicode and do the encoding here rather than running the encode on every key that comes in.","commit_id":"2863b1f02e42669d1a4134dd64b607184865cfac"},{"author":{"_account_id":17331,"name":"Koji Nakazono","email":"nakazono_0507@jp.fujitsu.com","username":"Koji_Nakazono"},"change_message_id":"30e7fc55ebcbca2d37d39c0275657d73964f7814","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        try:"},{"line_number":47,"context_line":"            if key is None:"},{"line_number":48,"context_line":"                key \u003d int(time.time() * 1000)"},{"line_number":49,"context_line":"            if type(key) is not unicode:"},{"line_number":50,"context_line":"                key \u003d str(key)"},{"line_number":51,"context_line":"            self._producer.send_messages(topic, key.encode(\u0027utf-8\u0027), *messages)"},{"line_number":52,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_83291e8c","line":49,"range":{"start_line":49,"start_character":32,"end_line":49,"end_character":39},"in_reply_to":"7aa08908_97e843e4","updated":"2016-06-07 00:10:06.000000000","message":"Done","commit_id":"2863b1f02e42669d1a4134dd64b607184865cfac"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"89485b56c8218089b4956f8df47b628211c37256","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                key \u003d int(time.time() * 1000)"},{"line_number":49,"context_line":"            if type(key) is not unicode:"},{"line_number":50,"context_line":"                key \u003d str(key)"},{"line_number":51,"context_line":"            self._producer.send_messages(topic, key.encode(\u0027utf-8\u0027), *messages)"},{"line_number":52,"context_line":"        except Exception:"},{"line_number":53,"context_line":"            log.exception(\u0027Error publishing to {} topic.\u0027.format(topic))"},{"line_number":54,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_f777079d","line":51,"range":{"start_line":51,"start_character":52,"end_line":51,"end_character":58},"updated":"2016-06-06 20:58:57.000000000","message":"This is substantially slower than the code that was here before.  Have you done any performance testing on it?  Is it possible to push this further up so that other projects, that don\u0027t have unicode keys, aren\u0027t effected?","commit_id":"2863b1f02e42669d1a4134dd64b607184865cfac"},{"author":{"_account_id":17331,"name":"Koji Nakazono","email":"nakazono_0507@jp.fujitsu.com","username":"Koji_Nakazono"},"change_message_id":"30e7fc55ebcbca2d37d39c0275657d73964f7814","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                key \u003d int(time.time() * 1000)"},{"line_number":49,"context_line":"            if type(key) is not unicode:"},{"line_number":50,"context_line":"                key \u003d str(key)"},{"line_number":51,"context_line":"            self._producer.send_messages(topic, key.encode(\u0027utf-8\u0027), *messages)"},{"line_number":52,"context_line":"        except Exception:"},{"line_number":53,"context_line":"            log.exception(\u0027Error publishing to {} topic.\u0027.format(topic))"},{"line_number":54,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_83775e9e","line":51,"range":{"start_line":51,"start_character":52,"end_line":51,"end_character":58},"in_reply_to":"7aa08908_f777079d","updated":"2016-06-07 00:10:06.000000000","message":"Done","commit_id":"2863b1f02e42669d1a4134dd64b607184865cfac"}]}
