使用JMeter测试套接字(Using JMeter to test a socket)
我想使用JMeter来测试通过套接字进行通信的应用程序。 它是用java完成的。 在服务器上,我有典型的
myServerSocket = new ServerSocket(1025);
对于每个连接,线程都会读取并理解一条线。 而在客户中,我有典型的
clientSocket = new Socket(hostCM, 1025); out = new PrintWriter(clientSocket.getOutputStream(), true); out.println("some bit string here");
我想用JMeter或任何其他负载测试工具同时发送大量请求,并进行压力和负载测试。 但我不知道如何准备测试。 在JMeter中可以做到这一点吗?
I would like to use JMeter to test an application that communicates over sockets. It is done in java. In the server I have the typical
myServerSocket = new ServerSocket(1025);
For every connection a thread reads and understands a line. And in clients I have the typical
clientSocket = new Socket(hostCM, 1025); out = new PrintWriter(clientSocket.getOutputStream(), true); out.println("some bit string here");
I would like to use JMeter or any other load testing tool to send lots of requests at the same time and make my stress and load testing. But I dont know how to prepare a test. Is is possible to do this in JMeter at all?
原文:https://stackoverflow.com/questions/15732630
最满意答案
两件事情:
1)Doxygen解析器在doNothing中不会“看到”“IN”(因为它在预处理阶段被移除),因此\ fn不应包含它:
const char* doNothing(const char* s)
。 顺便说一句,这不是必要的:如果紧靠记录在案的实体之前,Doxygen会自动将评论关联起来。2)我不知道__SXC_FUNCTION_ATTRIBUTE扩展到什么,但如果它类似于__MYLIB_FUNCTION_ATTRIBUTE,它可能会混淆Doxygen。 作为一种解决方法,您可以在Doxygen的配置文件的PREDEFINED部分中将这些宏定义为无,或者有条件地在源中定义它们,如下所示:
#ifdef DOXYGEN // Doxygen does not grok the normal definition of this #define __MYLIB_FUNCTION_ATTRIBUTE(...) #else #define __MYLIB_FUNCTION_ATTRIBUTE(...) __attribute__(__VA_ARGS__) #endif
并将PREDEFINED = DOXYGEN放入配置文件中。
Two things:
1) The Doxygen parser does not "see" the "IN" in doNothing (since it is removed in the preprocessing phase), so the \fn should not include it:
const char* doNothing(const char* s)
. BTW, this \fn is not necessary: Doxygen automatically associates the comment if it is immediately before the documented entity.2) I don't know what __SXC_FUNCTION_ATTRIBUTE expands into but, if it is something similar to __MYLIB_FUNCTION_ATTRIBUTE, it probably confuses Doxygen. As a workaround, you could either define these macros to nothing in the PREDEFINED section of Doxygen's config file, or conditionally define them in the sources, like this:
#ifdef DOXYGEN // Doxygen does not grok the normal definition of this #define __MYLIB_FUNCTION_ATTRIBUTE(...) #else #define __MYLIB_FUNCTION_ATTRIBUTE(...) __attribute__(__VA_ARGS__) #endif
and put PREDEFINED = DOXYGEN in your config file.
相关问答
更多-
正确使用Doxygen(Using Doxygen Correctly)[2022-05-11]
两件事情: 1)Doxygen解析器在doNothing中不会“看到”“IN”(因为它在预处理阶段被移除),因此\ fn不应包含它: const char* doNothing(const char* s) 。 顺便说一句,这不是必要的:如果紧靠记录在案的实体之前,Doxygen会自动将评论关联起来。 2)我不知道__SXC_FUNCTION_ATTRIBUTE扩展到什么,但如果它类似于__MYLIB_FUNCTION_ATTRIBUTE,它可能会混淆Doxygen。 作为一种解决方法,您可以在Doxyge ... -
python中的doxygen语法(doxygen syntax in python)[2022-07-08]
Doxygen也有没有记录的功能(或错误):它解析文档字符串中的Doxygen语法,如果您用感叹号开始文档字符串: class Hello: def __init__(self, name): """!@brief Creates a new Hello object. This Hello Object is being used to... @param name The name of the user. """ self.name = name ... -
Doxygen vs Javadoc(Doxygen vs Javadoc [closed])[2022-04-10]
Doxygen具有JavaDoc不提供的许多功能,例如层次结构和合作上下文的类图,更多的摘要页面,可选的源代码浏览(与文档交叉链接),附加的标签支持,如@todo on一个单独的页面,它可以生成TeX和PDF格式的输出。它还允许大量的视觉定制。 由于Doxygen支持标准的JavaDoc标签,您可以在任何源代码上使用JavaDoc注释来运行Doxygen。 没有JavaDoc,通常甚至可以在源代码上运行,因为图表和源代码浏览可以帮助您了解代码,即使没有文档。 而且由于JavaDoc工具忽略了未知标签,所以甚 ... -
如何在doxygen中支持多种输出语言的注释(How to support multiple output languages for comments in doxygen)[2022-12-28]
可能是在配置文件中设置正确的输入编码,即 INPUT_ENCODING = ISO-8859-1 默认编码为UTF-8。 It is probably a matter of setting the right input encoding in the configuration file, i.e. INPUT_ENCODING = ISO-8859-1 Default encoding is UTF-8. -
因为color乳胶包随着时间的推移而改变,并且在使用的EXTRA_PACKAGES由EXTRA_PACKAGES doxygen指令加载,如下所示: EXTRA_PACKAGES = bytefield ccaption color relsize 。 Because the color latex package changed over time and is loaded by the EXTRA_PACKAGES doxygen directive in the used Doxyfile like ...
-
如果您使用的是Java 1.4或更低版本,则必须拥有一个package.html ,它是一个完整形成的html文件。 在1.4之后,您可以使用带有格式的package-info.java文件 /** * com.foo is a group of bar utils for operating on foo things. */ package com.foo; If you're using Java 1.4 or lower you have to have a package.html whic ...
-
doxygen命令上的exec()或system()返回“退出”(exec() or system() on doxygen command returns me “Exiting”)[2022-01-06]
如果它包含空格或其他shell特殊字符,则可能需要$doxyFile使用escapeshellarg()转义$doxyFile 。 编辑记录,这是一个权限问题。 详情请参阅评论。 If it contains spaces or other shell special characters, you may need to escape $doxyFile with escapeshellarg() first. Edit for the record, it was a permission proble ... -
这似乎是因为Doxygen使用文件扩展来计算出用于分析文本的解析器,并且因为*.qml是新的,它猜错了(虽然我不知道它试图使用哪个) 。 解决方法是告诉Doxygen哪个解析器用于QML文件,所以我只需要将qml=c++添加到EXTENSION_MAPPING ,然后一切按预期工作。 It seems to be because Doxygen uses the file extension to work out what parser to use to analyse the text, and be ...
-
Doxygen解析javadoc?(Doxygen parse javadoc?)[2021-08-15]
Doxygen接受与JavaDoc类似的语法,但不完全相同。 除了@ret命令之外,您的示例注释将被识别。 doxygen中的正确命令是@return 。 以下是doxygen网站上的示例: http://www.stack.nl/~dimitri/doxygen/docblocks.html Doxygen accepts similar syntax to JavaDoc, but not exactly the same. Your example comment would be recognize ... -
从文档(自动链接生成) :一个需要改变 ///< The data. Indexed by Tick_Column_Type. 至 ///< The data. Indexed by ::Tick_Column_Type. From the docs (Automatic Link Generation): One needs to change from ///< The data. Indexed by Tick_Column_Type. to ///< The data. Indexed ...