- 源码工程在这里https://gist.github.com/lsk569937453/b42a8cfce21bd20c5da8737db1f5a1b1
- 用cross(https://github.com/cross-rs/cross)将源码工程编译为linux的运行文件( cross build --release --all --target x86_64-unknown-linux-gnu)
- 将编译好的silverwind和Dockerfile放入同一个目录中(该目录只有这两个文件),然后执行 docker build -t lsk569937453/silverwind:test .
- 在docker-compose.yaml目录下执行 docker compose up
- docker ps -a 列出所有的容器,使用命令 docker exec -it xxxx /bin/bash 进入名字为hey的容器中
- 执行指令hey -n 100000 -c 250 -m GET http://silverwind:6667
-
-
Save lsk569937453/fa70a84246efd2360f9acea1be83b182 to your computer and use it in GitHub Desktop.
hyper test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.9' | |
services: | |
test: | |
image: demisto/rakyll-hey:1.0.0.44140 | |
container_name: hey | |
tty: true | |
deploy: | |
resources: | |
limits: | |
cpus: "4.0" | |
memory: 8192M | |
backend: | |
image: jmalloc/echo-server | |
container_name: backend | |
ports: | |
- "9394:8080" | |
deploy: | |
resources: | |
limits: | |
cpus: "4.0" | |
memory: 8192M | |
silverwind: | |
image: lsk569937453/silverwind:test | |
#image: lsk569937453/silverwind:0.0.6 | |
container_name: silverwind | |
environment: | |
CONFIG_FILE_PATH: /data/app/app_config.yaml | |
RUST_BACKTRACE: 1 | |
JEMALLOC_SYS_WITH_MALLOC_CONF: background_thread:true,narenas:1,tcache:false,dirty_decay_ms:0,muzzy_decay_ms:0,abort_conf:true | |
volumes: | |
- ./app_config.yaml:/data/app/app_config.yaml | |
restart: unless-stopped | |
ports: | |
- 6667:6667 | |
- 8870:8870 | |
deploy: | |
resources: | |
limits: | |
cpus: "4.0" | |
memory: 8192M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:jammy-20230301 | |
#RUN apt-get update &&\ | |
# apt-get install -y heaptrack &&\ | |
# apt-get install -y heaptrack-gui | |
#RUN apt-get update &&\ | |
# apt-get install -y valgrind | |
COPY silverwind /tmp/silverwind | |
RUN chmod go+r /tmp/silverwind | |
WORKDIR "/tmp" | |
ENTRYPOINT ["/tmp/silverwind"] | |
#ENTRYPOINT ["tail", "-f", "/dev/null"] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment