dragonfly/test/tools/stress
Eng Zer Jun f579d3c9ce
refactor: move from io/ioutil to io and os packages (#906)
* chore: run `go fmt ./...`

This commit synchronizes `//go:build` lines with `// +build` lines.

Reference: https://go.googlesource.com/proposal/+/master/design/draft-gobuild.md
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* refactor: move from io/ioutil to io and os packages

The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-06-28 17:32:45 +08:00
..
README.md chore: add markdown lint (#779) 2023-06-28 17:32:34 +08:00
main.go refactor: move from io/ioutil to io and os packages (#906) 2023-06-28 17:32:45 +08:00

README.md

Simple Stress Testing Tools for Dragonfly

Daemon Proxy

Build and Run

  1. Build tool:

    go build -o bin/stress test/stress/main.go
    
  2. Run stress:

    bin/stress -connections 100 -duration 1s -proxy http://127.0.0.1:65001 \
        --url http://localhost/misc/d7y-test/blobs/sha256/128K
    

    Example output:

    Latency
      avg  17.286522ms
      min  617.801µs
      max  84.201941ms
    Latency Distribution
      50% 11.39049ms
      75% 18.308966ms
      90% 49.052485ms
      95% 55.886513ms
      99% 65.013042ms
    HTTP codes
      200  5849
    Throughput 731.1MB
    Request 5849/s
    

CLI Reference

Usage of ./stress:
  -connections int
     concurrency count of connections (default 100)
  -duration duration
     testing duration (default 1m40s)
  -output string
     all request statistics (default "/tmp/statistics.txt")
  -proxy string
     target proxy for downloading, example: http://127.0.0.1:65001
  -url string
     target url for stress testing, example: http://localhost