作者:mobiledu2502899157 | 来源:互联网 | 2023-09-12 05:22
IampracticingmyGolangbywritingasimpleRedisclone.我正在练习我的Golang,编写一个简单的Redis克隆。Howdoiw
I am practicing my Golang by writing a simple Redis clone.
我正在练习我的Golang,编写一个简单的Redis克隆。
How do i write a benchmark script that would establish X connections per second at C concurrency level to deal with my server's protocol and measure how many ops/sec?
我如何编写一个基准脚本,在C并发级别每秒建立X连接,以处理我的服务器协议并测量多少操作/秒?
I can simply write a script that would actually do this:
我可以简单地编写一个实际上会执行此操作的脚本:
for i := range(1000) {
// Open connection
// Perform command
// Close connection
}
But i want to know the concept behind distributing the number of connections per concurrency level per second.
但我想知道分配每秒并发级别的连接数背后的概念。
1 个解决方案