gpt-engineer
gpt-engineer copied to clipboard
Resolve Port Conflict for npx http-server in Benchmark Script
This PR addresses the issue where running multiple npx http-server
projects in the benchmark.py
script causes all of them to start up the first project that used npx http-server
. This is due to the fact that npx http-server
defaults to using the same port for all instances.
To resolve this, we've modified the benchmark.py
script to start each subprocess on a unique port. This is achieved by passing the -p
(port) option to npx http-server
followed by a unique port number for each subprocess. We start from port 8000 and increment it for each new subprocess to ensure that the port numbers we choose are available and not being used by other services.
This change ensures that each project run by the benchmark script operates independently on its own port, preventing conflicts and ensuring accurate benchmarking results.
Fixes #412.
To checkout this PR branch, run the following command in your terminal:
git checkout sweep/fix/benchmark-port-conflict