Skip to content

Commit

Permalink
Use environment variable to run as a local server with better parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
FredTingaud committed Feb 14, 2021
1 parent 0462eb3 commit 132abfa
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build-bench
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

docker run -p 4000:4000 -v $PWD/data:/data -v /var/run/docker.sock:/var/run/docker.sock -e BENCH_ROOT=$PWD -it fredtingaud/bench-runner ./start-build-bench
docker run -p 4000:4000 -v $PWD/data:/data -v /var/run/docker.sock:/var/run/docker.sock --env-file local.env -e BENCH_ROOT=$PWD -it fredtingaud/bench-runner ./start-build-bench
34 changes: 34 additions & 0 deletions local.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Environment variables to run a local instance of Quick Bench or Build Bench

# Disable CPU and memory throttling
UNLIMITED_RESOURCES=true

# Make it possible to download additional containers from the front-end
ALLOW_CONTAINER_DOWNLOAD=true

###############
# Quick Bench #
###############

# Maximum time to run a benchmark (in seconds).
# Increasing this number above the OS wide TCP connection timeout will have no effect
QB_TIMEOUT=300

# Maximum length of the code that can be sent. -1 to deactivate the check
QB_CODE_LIMIT=-1

###############
# Build Bench #
###############

# Maximum time to run a benchmark (in seconds).
# Increasing this number above the OS wide TCP connection timeout will have no effect
BB_TIMEOUT=300

# Maximum number of runs of the compilation.
# It is an upper limit, but the script will automatically scale down if there is a risk of reaching the timeout.
BB_MAX_ITERATION=30

# Maximum length of the code that can be sent. -1 to deactivate the check
BB_CODE_LIMIT=-1

2 changes: 1 addition & 1 deletion quick-bench
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

docker run -p 4000:4000 -v $PWD/data:/data -v /var/run/docker.sock:/var/run/docker.sock -e BENCH_ROOT=$PWD -it fredtingaud/bench-runner ./start-quick-bench
docker run -p 4000:4000 -v $PWD/data:/data -v /var/run/docker.sock:/var/run/docker.sock --env-file local.env -e BENCH_ROOT=$PWD -it fredtingaud/bench-runner ./start-quick-bench

0 comments on commit 132abfa

Please sign in to comment.