通用延迟基准库 bench

码农软件 · 软件分类 · 常用工具包 · 2019-08-15 08:59:55

软件介绍

Bench 是一个通用的延迟基准库。它有简单的界面,可以测试各种系统。Bench 每秒发出固定频率的请求,并且同步测量每个请求的延迟。延迟通过 HDR Histogram 捕捉,它可以观察整个延迟,并校正 Coordinated Omission。Bench 提供一些基本工具,可以将输出绘制出如下面这样的图:


示例代码:

package mainimport (    "fmt"
    "time"

    "github.com/tylertreat/bench"
    "github.com/tylertreat/bench/requester")func main() {    r := &requester.RedisPubSubRequester{
        URL:         ":6379",
        PayloadSize: 500,
        Channel:     "benchmark",
    }    benchmark := bench.NewBenchmark(r, 10000, 30*time.Second)
        summary, err := benchmark.Run()
        if err != nil {        panic(err)
    }

    fmt.Println(summary)
    summary.GenerateLatencyDistribution(bench.Logarithmic, "redis.txt")
}

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

Chinese Authoritarianism in the Information Age

Chinese Authoritarianism in the Information Age

Routledge / 2018-2-13 / GBP 115.00

This book examines information and public opinion control by the authoritarian state in response to popular access to information and upgraded political communication channels among the citizens in co......一起来看看 《Chinese Authoritarianism in the Information Age》 这本书的介绍吧!

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

在线图片转Base64编码工具

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

在线XML、JSON转换工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具