Browse Source

Try fixing a couple of issues in continuous benchmarking (#3489)

Michael Hixson 7 years ago
parent
commit
fdfe0ff790
2 changed files with 8 additions and 1 deletions
  1. 1 1
      toolset/setup/docker/wrk/query.sh
  2. 7 0
      toolset/utils/docker_helper.py

+ 1 - 1
toolset/setup/docker/wrk/query.sh

@@ -28,7 +28,7 @@ echo " wrk \"-H 'Host: $server_host' -H 'Accept: $accept' -H 'Connection: keep-a
 echo "---------------------------------------------------------"
 echo "---------------------------------------------------------"
 echo ""
 echo ""
 STARTTIME=$(date +"%s")
 STARTTIME=$(date +"%s")
-wrk "-H 'Host: $server_host' -H 'Accept: $accept' -H 'Connection: keep-alive'" --latency -d $duration -c %max_concurrency --timeout 8 -t $max_threads "$url$c"
+wrk "-H 'Host: $server_host' -H 'Accept: $accept' -H 'Connection: keep-alive'" --latency -d $duration -c $max_concurrency --timeout 8 -t $max_threads "$url$c"
 echo "STARTTIME $STARTTIME"
 echo "STARTTIME $STARTTIME"
 echo "ENDTIME $(date +"%s")"
 echo "ENDTIME $(date +"%s")"
 sleep 2
 sleep 2

+ 7 - 0
toolset/utils/docker_helper.py

@@ -279,6 +279,13 @@ def stop(benchmarker_config=None,
     client.containers.prune()
     client.containers.prune()
     client.networks.prune()
     client.networks.prune()
     client.volumes.prune()
     client.volumes.prune()
+    if benchmarker_config.server_docker_host != benchmarker_config.database_docker_host:
+        db_client = docker.DockerClient(
+            base_url=benchmarker_config.database_docker_host)
+        db_client.images.prune()
+        db_client.containers.prune()
+        db_client.networks.prune()
+        db_client.volumes.prune()
 
 
 
 
 def find(path, pattern):
 def find(path, pattern):