Comments (4)
目前 gev 没有计划支持 http 协议,仅仅定位做个简洁的 TCP 库(通过新增插件是可以的,类似库中的 websocket)。所以,你文章里的基于 HTTP 的 QPS 测试可能做不了。
目前,库中 PingPong 测试的客户端是每次发送固定长度的包,所以简单除一下也就是基于 PingPong 协议的 QPS 了。
https://github.com/Allenxuxu/gev/blob/master/benchmarks/client/main.go
from gev.
@lazy-luo 这种命题就有问题,如果是测试实用性性能,那就是要融入业务,看看每个网络库能给业务带来多少实质性得提升。然而给的例子中仅仅测试http得响应,看不出来和pingpong测试有什么本质区别。
from gev.
@MrChang0 意义在于ping-pong测试少数连接就可以跑满带宽,况且是直接转发,没有完整性校验及沾包处理;不要小看http相应,req/rsp才真正体现QPS,而QPS高低在特定带宽及硬件环境下与调度性能强相关
from gev.
@lazy-luo 有一点在于gev定义为网络库,而非“框架”。网络库关心事情更偏底层,上层可以进行自由得进行协议封装。协议层不同的实现不同的处理也可能有很大的性能差异。如果你有比较好的实现(http),可以基于gev做一版,看看性能如何。
from gev.
Related Issues (20)
- unix.POLLHUP=0x10,这里为什么或(|)上0x80啊? HOT 1
- default protocol bug HOT 3
- 这里为什么是一个循环啊??? HOT 2
- How to use with gin HOT 1
- 事件处理顺序如何排序,这里的排序有什么讲究? HOT 4
- Are the writes to socket blocking or non-blocking? HOT 3
- 这里的循环是不是换成if也行 HOT 2
- 请教一个问题,实在没看懂。 HOT 4
- 关闭连接时,为什么不直接关闭连接,而是将【关闭连接】这个任务放到异步队列里面等待执行? HOT 3
- 请问一下该库能管理大量客户端连接么? HOT 1
- 对于gev的一些疑问 HOT 1
- 控制EpollWait的msec优势在哪?
- EpollWait循环中wakeHandlerRead()是不是处理早了 HOT 1
- 建议加入UDP协议 HOT 1
- 百兆数据传输效率 HOT 2
- Question: is it possible to use your module as a websocket client? HOT 1
- OnConnect 里使用 c.set 的请教! HOT 1
- 能不能加一个sproto支持啊?
- 是否应该加入高水位回调来避免客户端不收数据
- windows 下cpu、内存占用问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gev.