diff --git a/Others/webbench/README.md b/Others/webbench/README.md new file mode 100644 index 0000000000000000000000000000000000000000..6ff39e582c63be51eeb2bcefaf242f1429723386 --- /dev/null +++ b/Others/webbench/README.md @@ -0,0 +1,56 @@ +# Quick reference + +- The official WebBench docker image. + +- Maintained by: [openEuler CloudNative SIG](https://gitee.com/openeuler/cloudnative). + +- Where to get help: [openEuler CloudNative SIG](https://gitee.com/openeuler/cloudnative), [openEuler](https://gitee.com/openeuler/community). + +# WebBench | openEuler +Current WebBench docker images are built on the [openEuler](https://repo.openeuler.org/). This repository is free to use and exempted from per-user rate limits. + +WebBench is a lightweight and easy-to-use HTTP benchmarking tool designed to measure the performance of web servers. It simulates multiple concurrent clients sending HTTP +request to a target server, allowing users to evaluate throughput, reponse time, and concurrency handing capabilities. + +# Supported tags and respective Dockerfile links +The tag of each `webbench` docker image is consist of the version of `webbench` and the version of basic image. The details are as follows + +| Tag | Currently | Architectures | +|----------|-------------|------------------| +|[1.5-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Others/webbench/1.5/24.03-lts-sp1/Dockerfile)| webbench 1.5 on openEuler 24.03-LTS-SP1 | amd64, arm64 | + +# Usage +In this usage, users can select the corresponding `{Tag}` based on their requirements. + +- Pull the `openeuler/webbench` image from docker + + ```bash + docker pull openeuler/webbench:{Tag} + ``` + +- Run with an interactive shell + + You can start the container with an interactive shell to use webbench. + ``` + docker run -it --rm openeuler/webbench:{Tag} bash + ``` + +- Start a simple HTTP server + + In the directory containing you `index.html` file, run: + ``` + nohup python3 -m http.server 8080 & + ``` + * This command will serve files from the current directory on port `8080`. + * `nohup` and `&` allow the sever to keep running in the background. + +- Test GET request + + Once the server is running, use `webbench` to generate HTTP load: + ``` + webbench -c 100 -t 30 http://127.0.0.1:8080/index.html + ``` + This means using `100 concurrent clients` to test accessing `http://127.0.0.1:8080/index.html` for `30 seconds`. + +# Question and answering +If you have any questions or want to use some special features, please submit an issue or a pull request on [openeuler-docker-images](https://gitee.com/openeuler/openeuler-docker-images). \ No newline at end of file diff --git a/Others/webbench/doc/image-info.yml b/Others/webbench/doc/image-info.yml new file mode 100644 index 0000000000000000000000000000000000000000..aa0aeb2bd1f8e47a645cd5c72b9ff0b564d715d1 --- /dev/null +++ b/Others/webbench/doc/image-info.yml @@ -0,0 +1,51 @@ +name: webbench +category: others +description: Webbench是一个在linux下使用的非常简单的网站压测工具。它使用fork()模拟多个客户端同时访问我们设定的URL,测试网站在压力下工作的性能,最多可以模拟3万个并发连接去测试网站的负载能力。 +environment: | + 本应用在Docker环境中运行,安装Docker执行如下命令 + ``` + yum install -y docker + ``` +tags: | + webbench镜像的Tag由其版本信息和基础镜像版本信息组成,详细内容如下 + + | Tag | Currently | Architectures | + |----------|-------------|------------------| + |[1.5-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Others/webbench/1.5/24.03-lts-sp1/Dockerfile)| webbench 1.5 on openEuler 24.03-LTS-SP1 | amd64, arm64 | + +download: | + 拉取镜像到本地 + ``` + docker pull openeuler/webbench:{Tag} + ``` + +usage: | + - 以交互式Shell运行容器: + + 通过交互式 Shell 启动容器,使用webbench: + ``` + docker run -it --rm openeuler/webbench:{Tag} bash + ``` + + - 启动一个简单的HTTP服务 + + 在有index.html文件(任意内容)的目录下执行: + ``` + nohup python3 -m http.server 8080 & + ``` + * 该命令会将当前目录作为文件根目录,通过端口 8080 提供 HTTP 服务。 + * 使用 nohup 和 & 可以让服务器在后台持续运行,不会因关闭终端而中断。 + + - 测试 GET 请求 + + ``` + webbench -c 100 -t 30 http://127.0.0.1:8080/index.html + ``` + 表示使用 100 个并发客户端,测试 30 秒访问 http://127.0.0.1:8080/index.html。 + +license: GPL-3.0 license +similar_packages: + - wrk: 高性能 HTTP 压力测试工具,支持多线程和长连接,适合更高并发场景。 +dependency: + - ctags + - libtirpc diff --git a/Others/webbench/doc/picture/logo.png b/Others/webbench/doc/picture/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..d0a72df0597ec77c7665bd62b556ce3e9bd90c80 Binary files /dev/null and b/Others/webbench/doc/picture/logo.png differ