)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"3abe0dd083bb752f3a1bc1290968334bd9ee3ae3","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Remove extraneous debug statement from a loop over ports."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Do not log debug entries when looping over a potentially large"},{"line_number":10,"context_line":"nuber of objects (ports) in a loop. Even when debug is not enabled"},{"line_number":11,"context_line":"the string formatting gets executed which adds overhead to the time"},{"line_number":12,"context_line":"it takes to create the contents of the Dnsmasq hosts file for the"},{"line_number":13,"context_line":"network."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a930d6b_2eaf9a95","line":10,"updated":"2015-01-24 08:34:14.000000000","message":"it\u0027s not suppose to - see http://stackoverflow.com/a/5082809","commit_id":"c92f2491df77783d9e45974021fc070a0f07b0cc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a9162684aadc690814e396cabb607ae5a4b9c9dc","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Remove extraneous debug statement from a loop over ports."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Do not log debug entries when looping over a potentially large"},{"line_number":10,"context_line":"nuber of objects (ports) in a loop. Even when debug is not enabled"},{"line_number":11,"context_line":"the string formatting gets executed which adds overhead to the time"},{"line_number":12,"context_line":"it takes to create the contents of the Dnsmasq hosts file for the"},{"line_number":13,"context_line":"network."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a930d6b_eece722d","line":10,"in_reply_to":"1a930d6b_2eaf9a95","updated":"2015-01-24 09:30:17.000000000","message":"+1. No formatting should occur.","commit_id":"c92f2491df77783d9e45974021fc070a0f07b0cc"},{"author":{"_account_id":8992,"name":"Billy Olsen","email":"billy.olsen@canonical.com","username":"billy-olsen"},"change_message_id":"c7d07acc7134e5470eccbff059eb6b965215acb0","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Remove extraneous debug statement from a loop over ports."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Do not log debug entries when looping over a potentially large"},{"line_number":10,"context_line":"nuber of objects (ports) in a loop. Even when debug is not enabled"},{"line_number":11,"context_line":"the string formatting gets executed which adds overhead to the time"},{"line_number":12,"context_line":"it takes to create the contents of the Dnsmasq hosts file for the"},{"line_number":13,"context_line":"network."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a930d6b_70fb3cc1","line":10,"in_reply_to":"1a930d6b_eece722d","updated":"2015-01-24 17:54:43.000000000","message":"I went back and read the docs and you are absolutely right that it isn\u0027t the string formatting which is adding the overhead. I suspect it\u0027s the overhead of the logging method call but there is impact to this loop of the logging statement alone. I will run with some timings.","commit_id":"c92f2491df77783d9e45974021fc070a0f07b0cc"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"edb92d40fe7e5ee62374d3b4e7670e059afb44c6","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Billy Olsen \u003cbilly.olsen@canonical.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-01-27 23:00:58 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor logging in loop to only log debug messages once."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Logging entries in a loop to a file can be expensive for a large"},{"line_number":10,"context_line":"number of objects (e.g. ports) in a loop. Rather than perform the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa81d914_3555a9c6","line":7,"updated":"2015-01-28 06:56:27.000000000","message":"no period in the summary line","commit_id":"500ac79f62e975bf5088d85503d489e06ec60c9e"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"a97603ffb40402bb4ac6029c2299fa6c1d03ecca","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Billy Olsen \u003cbilly.olsen@canonical.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-01-27 23:00:58 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor logging in loop to only log debug messages once."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Logging entries in a loop to a file can be expensive for a large"},{"line_number":10,"context_line":"number of objects (e.g. ports) in a loop. Rather than perform the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa81d914_782638bc","line":7,"in_reply_to":"fa81d914_3555a9c6","updated":"2015-01-28 07:21:27.000000000","message":"doesn\u0027t look like pep8 isn\u0027t failing because of that.","commit_id":"500ac79f62e975bf5088d85503d489e06ec60c9e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"33a8596bf501e690d2c469e2ce121b95070a262c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Billy Olsen \u003cbilly.olsen@canonical.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-01-27 23:00:58 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor logging in loop to only log debug messages once."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Logging entries in a loop to a file can be expensive for a large"},{"line_number":10,"context_line":"number of objects (e.g. ports) in a loop. Rather than perform the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa81d914_cc311fa4","line":7,"in_reply_to":"fa81d914_782638bc","updated":"2015-01-28 11:20:52.000000000","message":"I don\u0027t believe those kind of nits are useful at all.","commit_id":"500ac79f62e975bf5088d85503d489e06ec60c9e"}],"neutron/agent/linux/dhcp.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"e5fbc46d7fe27fbfe62c62e610b16f093ede22cc","unresolved":false,"context_lines":[{"line_number":510,"context_line":""},{"line_number":511,"context_line":"            LOG.debug(\u0027Adding %(mac)s : %(name)s : %(ip)s\u0027,"},{"line_number":512,"context_line":"                      {\"mac\": port.mac_address, \"name\": name,"},{"line_number":513,"context_line":"                       \"ip\": ip_address})"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"            if getattr(port, \u0027extra_dhcp_opts\u0027, False):"},{"line_number":516,"context_line":"                buf.write(\u0027%s,%s,%s,%s%s\\n\u0027 %"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a930d6b_e90bcc8b","side":"PARENT","line":513,"updated":"2015-01-24 13:01:52.000000000","message":"This information is however not useless. If you remove it from here please ensure it is printed somewhere else, perhaps once the loop completes","commit_id":"7d577606e52ac881283639c3d0d312037463f666"},{"author":{"_account_id":8992,"name":"Billy Olsen","email":"billy.olsen@canonical.com","username":"billy-olsen"},"change_message_id":"c1ecf7ea934997491400ef26f3a57c36cc1caddb","unresolved":false,"context_lines":[{"line_number":510,"context_line":""},{"line_number":511,"context_line":"            LOG.debug(\u0027Adding %(mac)s : %(name)s : %(ip)s\u0027,"},{"line_number":512,"context_line":"                      {\"mac\": port.mac_address, \"name\": name,"},{"line_number":513,"context_line":"                       \"ip\": ip_address})"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"            if getattr(port, \u0027extra_dhcp_opts\u0027, False):"},{"line_number":516,"context_line":"                buf.write(\u0027%s,%s,%s,%s%s\\n\u0027 %"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa81d914_705d88e9","side":"PARENT","line":513,"in_reply_to":"1a930d6b_6f027270","updated":"2015-01-27 20:32:39.000000000","message":"Done","commit_id":"7d577606e52ac881283639c3d0d312037463f666"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"8586908bec8b57d3cbb3daa002a7b3dd6a7dbf47","unresolved":false,"context_lines":[{"line_number":510,"context_line":""},{"line_number":511,"context_line":"            LOG.debug(\u0027Adding %(mac)s : %(name)s : %(ip)s\u0027,"},{"line_number":512,"context_line":"                      {\"mac\": port.mac_address, \"name\": name,"},{"line_number":513,"context_line":"                       \"ip\": ip_address})"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"            if getattr(port, \u0027extra_dhcp_opts\u0027, False):"},{"line_number":516,"context_line":"                buf.write(\u0027%s,%s,%s,%s%s\\n\u0027 %"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a930d6b_6f027270","side":"PARENT","line":513,"in_reply_to":"1a930d6b_e90bcc8b","updated":"2015-01-26 03:42:36.000000000","message":"how about LOG.debug the contents after line 524?","commit_id":"7d577606e52ac881283639c3d0d312037463f666"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"04a68cda5ee28073bc3bb73ca2f9d39b7aa1f19b","unresolved":false,"context_lines":[{"line_number":552,"context_line":"                              (port.mac_address, \u0027set:\u0027, port.id))"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"        utils.replace_file(filename, buf.getvalue())"},{"line_number":555,"context_line":"        LOG.debug(\u0027Done building host file %s with contents: %s\u0027, filename,"},{"line_number":556,"context_line":"                  buf.getvalue())"},{"line_number":557,"context_line":"        return filename"},{"line_number":558,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa81d914_5fddef41","line":555,"updated":"2015-01-27 21:23:21.000000000","message":"I would add a newline after : so that all lines including the very first one starts on the same char position in the log.","commit_id":"99876c88a48b71e2e5bbb9d78a33b9905472680b"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"6b74150f1147d081f9b5dbc4514b81791f660cbf","unresolved":false,"context_lines":[{"line_number":552,"context_line":"                              (port.mac_address, \u0027set:\u0027, port.id))"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"        utils.replace_file(filename, buf.getvalue())"},{"line_number":555,"context_line":"        LOG.debug(\u0027Done building host file %s with contents: %s\u0027, filename,"},{"line_number":556,"context_line":"                  buf.getvalue())"},{"line_number":557,"context_line":"        return filename"},{"line_number":558,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa81d914_b671ad79","line":555,"in_reply_to":"fa81d914_5fddef41","updated":"2015-01-28 01:26:52.000000000","message":"newline after: is a good idea.","commit_id":"99876c88a48b71e2e5bbb9d78a33b9905472680b"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"fa65130953c71e62017a3d5c4942740d1836e2f9","unresolved":false,"context_lines":[{"line_number":513,"context_line":"                          (port.mac_address, name, ip_address))"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"        utils.replace_file(filename, buf.getvalue())"},{"line_number":516,"context_line":"        LOG.debug(\u0027Done building host file %s with contents:\\n%s\u0027, filename,"},{"line_number":517,"context_line":"                  buf.getvalue())"},{"line_number":518,"context_line":"        return filename"},{"line_number":519,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_f417e142","line":516,"updated":"2015-02-05 14:57:47.000000000","message":"Just curious... do we need to dump the contents of the file? Could we instead, break this up into two methods, one that builds the buffer, and one that writes it to a file, and then rely on unit tests to verify that the contents of the buffer are correct?\n\nAlso, I\u0027m curious as to the unit test coverage of this method (didn\u0027t really see anything).","commit_id":"d93e0098ebd5f333d6f496f10a663cd4351410ae"},{"author":{"_account_id":8992,"name":"Billy Olsen","email":"billy.olsen@canonical.com","username":"billy-olsen"},"change_message_id":"d5925058c6334593f154e160ad5be0ae046500d1","unresolved":false,"context_lines":[{"line_number":513,"context_line":"                          (port.mac_address, name, ip_address))"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"        utils.replace_file(filename, buf.getvalue())"},{"line_number":516,"context_line":"        LOG.debug(\u0027Done building host file %s with contents:\\n%s\u0027, filename,"},{"line_number":517,"context_line":"                  buf.getvalue())"},{"line_number":518,"context_line":"        return filename"},{"line_number":519,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_a4152e9d","line":516,"in_reply_to":"da86d52c_f417e142","updated":"2015-02-05 18:08:15.000000000","message":"So I initially had the same concerns and earliest version of this patch dropped the logging of these contents altogether. However, it was felt that the removed debug statements did provide some value so I landed on this to include the content.\n\nThere are already a fair amount of unit tests which cover this method and verify the correctness of the buffer itself under various conditions (see test_linux_dhcp.py) which gets written to the file. As far as a specific unit test for this change, I felt that the unit test would be checking that logging did not occur which can be a brittle test at best for future changes.","commit_id":"d93e0098ebd5f333d6f496f10a663cd4351410ae"}]}
