prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  silo benchmark fails behind proxy
  From @mateusz-blaszkowski in #475: 
  
  > silo - failed with Clone of 'git://github.com/kohler/masstree-beta.git' into submodule path 'masstree' failed. I run the test behind the proxy and this is the case. I would have changed the path to Git repository to https:// but it is hidden somewhere in 'dbtest' (look a the command which failed: cd /tmp/pkb/silo && MODE=perf DEBUG=0 CHECK_INVARIANTS=0 make -j80 dbtest). Oh, i found that the exact path is specified here: https://github.com/stephentu/silo/blob/cc11ca1ea949ef266ee12a9b1c310392519d9e3b/.gitmodules
  
  We should switch it to `https://`.
  
  
  </issue>
  <code>
  [start of perfkitbenchmarker/linux_packages/silo.py]
  1 # Copyright 2014 PerfKitBenchmarker Authors. All rights reserved.
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #   http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 
  15 
  16 """Module containing Silo installation and cleanup functions."""
  17 
  18 from perfkitbenchmarker import vm_util
  19 
  20 GIT_REPO = 'https://github.com/stephentu/silo.git'
  21 GIT_TAG = '62d2d498984bf69d3b46a74e310e1fd12fd1f692'
  22 SILO_DIR = '%s/silo' % vm_util.VM_TMP_DIR
  23 APT_PACKAGES = ('libjemalloc-dev libnuma-dev libdb++-dev '
  24                 'libmysqld-dev libaio-dev libssl-dev')
  25 YUM_PACKAGES = ('jemalloc-devel numactl-devel libdb-cxx-devel mysql-devel '
  26                 'libaio-devel openssl-devel')
  27 
  28 
  29 def _Install(vm):
  30   """Installs the Silo package on the VM."""
  31   nthreads = vm.num_cpus * 2
  32   vm.Install('build_tools')
  33   vm.RemoteCommand('git clone {0} {1}'.format(GIT_REPO, SILO_DIR))
  34   vm.RemoteCommand('cd {0} && git checkout {1}'.format(SILO_DIR,
  35                                                        GIT_TAG))
  36   vm.RemoteCommand('cd {0} && MODE=perf DEBUG=0 CHECK_INVARIANTS=0 make\
  37           -j{1} dbtest'.format(SILO_DIR, nthreads))
  38 
  39 
  40 def YumInstall(vm):
  41   """Installs the Silo package on the VM."""
  42   vm.InstallPackages(YUM_PACKAGES)
  43   _Install(vm)
  44 
  45 
  46 def AptInstall(vm):
  47   """Installs the Silo package on the VM."""
  48   vm.InstallPackages(APT_PACKAGES)
  49   _Install(vm)
  50
  [end of perfkitbenchmarker/linux_packages/silo.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/perfkitbenchmarker/linux_packages/silo.py b/perfkitbenchmarker/linux_packages/silo.py
  --- a/perfkitbenchmarker/linux_packages/silo.py
  +++ b/perfkitbenchmarker/linux_packages/silo.py
  @@ -33,6 +33,9 @@
     vm.RemoteCommand('git clone {0} {1}'.format(GIT_REPO, SILO_DIR))
     vm.RemoteCommand('cd {0} && git checkout {1}'.format(SILO_DIR,
                                                          GIT_TAG))
  +  # This is due to a failing clone command when executing behind a proxy.
  +  # Replacing the protocol to https instead of git fixes the issue.
  +  vm.RemoteCommand('git config --global url."https://".insteadOf git://')
     vm.RemoteCommand('cd {0} && MODE=perf DEBUG=0 CHECK_INVARIANTS=0 make\
             -j{1} dbtest'.format(SILO_DIR, nthreads))
  
verification_info: {"golden_diff": "diff --git a/perfkitbenchmarker/linux_packages/silo.py b/perfkitbenchmarker/linux_packages/silo.py\n--- a/perfkitbenchmarker/linux_packages/silo.py\n+++ b/perfkitbenchmarker/linux_packages/silo.py\n@@ -33,6 +33,9 @@\n   vm.RemoteCommand('git clone {0} {1}'.format(GIT_REPO, SILO_DIR))\n   vm.RemoteCommand('cd {0} && git checkout {1}'.format(SILO_DIR,\n                                                        GIT_TAG))\n+  # This is due to a failing clone command when executing behind a proxy.\n+  # Replacing the protocol to https instead of git fixes the issue.\n+  vm.RemoteCommand('git config --global url.\"https://\".insteadOf git://')\n   vm.RemoteCommand('cd {0} && MODE=perf DEBUG=0 CHECK_INVARIANTS=0 make\\\n           -j{1} dbtest'.format(SILO_DIR, nthreads))\n", "issue": "silo benchmark fails behind proxy\nFrom @mateusz-blaszkowski in #475: \n\n> silo - failed with Clone of 'git://github.com/kohler/masstree-beta.git' into submodule path 'masstree' failed. I run the test behind the proxy and this is the case. I would have changed the path to Git repository to https:// but it is hidden somewhere in 'dbtest' (look a the command which failed: cd /tmp/pkb/silo && MODE=perf DEBUG=0 CHECK_INVARIANTS=0 make -j80 dbtest). Oh, i found that the exact path is specified here: https://github.com/stephentu/silo/blob/cc11ca1ea949ef266ee12a9b1c310392519d9e3b/.gitmodules\n\nWe should switch it to `https://`.\n\n", "before_files": [{"content": "# Copyright 2014 PerfKitBenchmarker Authors. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\n\"\"\"Module containing Silo installation and cleanup functions.\"\"\"\n\nfrom perfkitbenchmarker import vm_util\n\nGIT_REPO = 'https://github.com/stephentu/silo.git'\nGIT_TAG = '62d2d498984bf69d3b46a74e310e1fd12fd1f692'\nSILO_DIR = '%s/silo' % vm_util.VM_TMP_DIR\nAPT_PACKAGES = ('libjemalloc-dev libnuma-dev libdb++-dev '\n                'libmysqld-dev libaio-dev libssl-dev')\nYUM_PACKAGES = ('jemalloc-devel numactl-devel libdb-cxx-devel mysql-devel '\n                'libaio-devel openssl-devel')\n\n\ndef _Install(vm):\n  \"\"\"Installs the Silo package on the VM.\"\"\"\n  nthreads = vm.num_cpus * 2\n  vm.Install('build_tools')\n  vm.RemoteCommand('git clone {0} {1}'.format(GIT_REPO, SILO_DIR))\n  vm.RemoteCommand('cd {0} && git checkout {1}'.format(SILO_DIR,\n                                                       GIT_TAG))\n  vm.RemoteCommand('cd {0} && MODE=perf DEBUG=0 CHECK_INVARIANTS=0 make\\\n          -j{1} dbtest'.format(SILO_DIR, nthreads))\n\n\ndef YumInstall(vm):\n  \"\"\"Installs the Silo package on the VM.\"\"\"\n  vm.InstallPackages(YUM_PACKAGES)\n  _Install(vm)\n\n\ndef AptInstall(vm):\n  \"\"\"Installs the Silo package on the VM.\"\"\"\n  vm.InstallPackages(APT_PACKAGES)\n  _Install(vm)\n", "path": "perfkitbenchmarker/linux_packages/silo.py"}]}