Netty数据流性能+ websocket性能(Netty data streaming performance + websocket performance)
我想查看netty的一些特定性能数字,并查看netty网站上相关文章部分中的各个链接。
但是大多数人都谈到了与网络服务器同时连接的数量,而不是关于数据传输速率或类似的东西 ,我希望看一下。
此外,任何特定于netty websocket服务器的性能数字? (据我所知,它可能在某种程度上依赖于websocket协议,是吗?)
如果有人做了一些工作/在网络上看到了两个领域中的任何一个,他们可以分享一些数据/见解吗?
I wanted to look at some particular performance numbers for netty and have looked over the various links in the related articles section on the netty website.
But most of them talk about the number of simultaneous connections to a netty server and not about the data transfer rate or something similar which I wish to look over.
Also , any performance numbers specifically for a netty websocket server ? (I understand it may depend on the websocket protocol used as well to some extent , is it ?)
If someone has done some work / seen some links on the web in any of the 2 areas , could they please share some data numbers / insights ?
原文:https://stackoverflow.com/questions/11645450
满意答案
你正在寻找的是一个功能模板和可变参数模板(a / k / a参数包) :
template<class ... Args> void f(Args ... args) { std::cout << sizeof...(args) << "\n"; } int main() { f(0, 1, 2); // prints 3 f(0, 1, 2, 3, 4); // prints 5 }
这通常不是您默认使用的。 考虑使用范围:
template<class Iterator> void f(Iterator begin, Iterator end) { std::cout << std::distance(begin, end) << "\n"; }
这更具惯用性。
What you're looking for is a function-template in conjunction with variadic templates (a/k/a parameter packs):
template<class ... Args> void f(Args ... args) { std::cout << sizeof...(args) << "\n"; } int main() { f(0, 1, 2); // prints 3 f(0, 1, 2, 3, 4); // prints 5 }
This is generally not what you would use by default. Consider using ranges:
template<class Iterator> void f(Iterator begin, Iterator end) { std::cout << std::distance(begin, end) << "\n"; }
which is more idiomatic.
相关问答
更多作为参数的函数(Functions as arguments)
我可以知道我的函数有多少参数?(Can I know how many arguments my function gets?)
“转换”函数参数(“Transforming” Function Arguments)
没有参数的函数声明(Function declaration without arguments)
如何绑定函数参数(How to bind function arguments)
验证函数参数?(Validating function arguments?)
PHP:具有3个参数的函数>使用较少的参数(PHP: Function with 3 arguments > Use it with less arguments)
函数参数及其工作原理(Function arguments and how they work)
函数中的其他参数(Additional arguments in a function)
函数需要多少个参数?(How many arguments does a function take?)
相关文章
更多Solr Performance Factors(Solr 性能因素)
WebSocket实例详解
WebSocket介绍
《CMMI+敏捷整合开发:更快改进性能的案例与实用技术》( Integrating CMMI and Agile Development: Case Studies and Proven Techniques for Faster Performance Improvement )扫描版[PDF]
在SpringMVC中使用WebSocket
Becoming a data scientist
Supra Skytop Shoes All White Gunny are a top performance
SOLR Performance Benchmarks – Single vs. Multi-core Index Shards
摘抄---Multimedia Streaming on Microsoft Windows CE 3.0
Hadoop Streaming
最新问答
更多获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
如何通过引用返回对象?(How is returning an object by reference possible?)
矩阵如何存储在内存中?(How are matrices stored in memory?)
每个请求的Java新会话?(Java New Session For Each Request?)
css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
xcode语法颜色编码解释?(xcode syntax color coding explained?)
在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
Copyright ©2023 peixunduo.com All Rights Reserved.粤ICP备14003112号
本站部分内容来源于互联网,仅供学习和参考使用,请莫用于商业用途。如有侵犯你的版权,请联系我们(neng862121861#163.com),本站将尽快处理。谢谢合作!