Golang HTTP 基准工具 go_bench

码农软件 · 软件分类 · 网络工具包 · 2019-02-24 15:29:21

软件介绍

go_bench 是一个可以向 Web 应用程序发送一些负载的小程序。

基本用法

./go_bench -n 1000 -c 10 -t 3000 -m GET http://127.0.0.1/hello

This runs a benchmark for 1000 requests, keeping 10 HTTP connections open, and timeous is 3000ms

Output:
    Request:
    [1000] http://www.baidu.com
    Summary:
    Total:        5.2124 secs
    Slowest:      0.3283 secs
    Fastest:      0.0195 secs
    Average:      0.0345 secs
    Requests/sec: 191.8491

    Status code distribution:
    [200] 1000 responses

    Latency distribution:
    10% in 0.0253 secs
    25% in 0.0272 secs
    50% in 0.0298 secs
    75% in 0.0350 secs
    90% in 0.0498 secs
    95% in 0.0606 secs
    99% in 0.0872 secs

选项

    -n  Number of requests to run.
    -c  Number of requests to run concurrently. Total number of requests cannot
        be smaller than the concurency level.
    -q  Rate limit, in seconds (QPS).
    -o  Output type. If none provided, a summary is printed.
        "csv" is the only supported alternative. Dumps the response
        metrics in comma-seperated values format.
    -m  HTTP method, one of GET, POST, PUT, DELETE, HEAD, OPTIONS.
    -H  Custom HTTP header. You can specify as many as needed by repeating the flag.
        for example, -H "Accept: text/html" -H "Content-Type: application/xml" .
    -t  Timeout in ms.
    -A  HTTP Accept header.
    -d  HTTP request body.
    -T  Content-type, defaults to "text/html".
    -a  Basic authentication, username:password.
    -x  HTTP Proxy address as host:port.
    -h2  Make HTTP/2 requests.
    -disable-compression  Disable compression.
    -disable-keepalive    Disable keep-alive, prevents re-use of TCP
                            connections between different HTTP requests.
    -cpus                 Number of used cpu cores.
                            (default for current machine is 4 cores)
    -host                 HTTP Host header.
    -f  Request url file, a launch request in the random selection file

本文地址:https://codercto.com/soft/d/38.html

机器学习算法原理与编程实践

机器学习算法原理与编程实践

郑捷 / 电子工业出版社 / 2015-11 / 88.00

本书是机器学习原理和算法编码实现的基础性读物,内容分为两大主线:单个算法的原理讲解和机器学习理论的发展变迁。算法除包含传统的分类、聚类、预测等常用算法之外,还新增了深度学习、贝叶斯网、隐马尔科夫模型等内容。对于每个算法,均包括提出问题、解决策略、数学推导、编码实现、结果评估几部分。数学推导力图做到由浅入深,深入浅出。结构上数学原理与程序代码一一对照,有助于降低学习门槛,加深公式的理解,起到推广和扩......一起来看看 《机器学习算法原理与编程实践》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换