Sign inSign up

zhufuyi/perftest

By zhufuyi

•Updated 12 months ago

Perftest is a high-performance tool for HTTP/1.1/2/3 & WebSocket.

Image
0

346

zhufuyi/perftest repository overview

⁠Perftest

Perftest is a high-performance load testing tool that supports multiple modern web protocols, including HTTP/1.1, HTTP/2, HTTP/3, and WebSocket. It provides real-time metrics reporting to custom HTTP endpoints or Prometheus, and supports two testing modes:

  • Standalone testing — run and monitor locally
  • Distributed cluster testing — coordinate multiple agents for large-scale testing

⁠🐳 Run with Docker

⁠1. Run Collector
docker run -d \
  --name perftest-collector \
  --restart always \
  -p 8888:8888 \
  zhufuyi/perftest:latest \
  collector -a http://<host-ip or domain>:8888
⁠2. Run Agent

The perftest agent runs on one or more machines as needed. Each agent requires a configuration file — download it from agent.yml⁠.

docker run -d \
  --name perftest-agent \
  --restart always \
  -p 6601:6601 \
  -v $(pwd)/agent.yml:/app/agent.yml \
  zhufuyi/perftest:latest \
  agent -c /app/agent.yml

⁠🧩 Run with Docker Compose

⁠1. Collector Configuration (docker-compose.yml)
version: "3.7"

services:
  perftest-collector:
    image: zhufuyi/perftest:latest
    container_name: perftest-collector
    restart: always
    command: ["collector","-a","http://<host-ip or domain>:8888"]
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
    ports:
      - "8888:8888"
⁠2. Agent Configuration (docker-compose.yml)

Download the agent.yml⁠ file before starting.

version: "3.7"

services:
  perftest-agent:
    image: zhufuyi/perftest:latest
    container_name: perftest-agent
    restart: always
    command: ["agent","-c","/app/agent.yml"]
    volumes:
      - ./agent.yml:/app/agent.yml
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
    ports:
      - "6601:6601"

⁠📘 More Information

Perftest is part of the Sponge ecosystem — a powerful and easy-to-use Go development framework that adheres to the core concept of "Definition is Code". It easily builds stable and reliable high-performance backend services through low code methods, supporting various service types including RESTful API, gRPC, HTTP+gRPC, and gRPC Gateway.

Tag summary

Content type

Image

Digest

sha256:997d5a7dc…

Size

15.5 MB

Last updated

12 months ago

docker pull zhufuyi/perftest