Skip to content

Instantly share code, notes, and snippets.

@m-ueno
Created June 15, 2015 14:14
Show Gist options
  • Save m-ueno/99921850e0793a1869f0 to your computer and use it in GitHub Desktop.
Save m-ueno/99921850e0793a1869f0 to your computer and use it in GitHub Desktop.
client:
image: httpd
links:
- app50:app50
- app500:app500
- app5000:app5000
volumes:
- /home/masaru/logs:/tmp/output
working_dir: /tmp/output
command: [sh, -c, "for i in $(grep app /etc/hosts| perl -anle 'print $F[1]') ; do echo $i >> out ; ab -n 500 -c 500 -e output_$i.csv http://$i:8000/ ; done"]
# command: [sh, -c, "for i in $(grep app /etc/hosts| perl -anle 'print $F[1]') ; do echo $i >> out ; ab -n 500 -c 500 http://$i:8000/ | grep 95% | tee -a out ; done"]
# command: [sh, -c, "cat /etc/hosts; echo ''; grep app /etc/hosts| perl -anle 'print $F[1]'"]
app50:
image: python
mem_limit: 50m
command: python -m http.server 8000
app500:
image: python
mem_limit: 500m
command: python -m http.server 8000
app5000:
image: python
mem_limit: 5g
command: python -m http.server 8000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment