ANT / JMeter - 长时间运行测试 - 停止编写摘要结果(ANT / JMeter - long running test - stops writing the summariser results)
我有一个WebService,我连续5天每隔2秒点击一次WebService,一个用户使用jmeter连续5天。 我使用ANT调用JMeter。 我在调用jmeter时使用ANT为jmeter设置4GB堆大小。 我没有为ANT设置任何ANT_OPTS。 (我不确定ANT将采用的默认堆大小)
当我开始jmeter测试时,它工作正常。 我在控制台中每30秒获得一次jmeter summaryctorer输出,这很棒。
问题是 - 在3或4天之后,它停止在控制台中写出摘要结果(前3天它工作得很好。没有问题)。 ANT版本尚未完成。 它仍在运行。 看起来jmeter停止工作/悬挂。 但我不认为它使用4GB,因为我看到更多的可用内存。 我在任何地方的日志中都没有看到任何异常。 如果我尝试访问它,API仍然运行良好。 这是ANT / jmeter的问题吗? 我应该为这个长期运行的ANT目标为ANT分配更多空间吗?
试过2次。 第一次运行3天没有任何问题。 第二次差不多4天没有任何问题。 但它不会连续运行5天。
注意:
它与WebService服务器无关。 jmeter机器有16GB RAM。 除了这个测试(ANT和jmeter),我没有运行任何其他东西。
我在JMeter中使用SOAP / XML RPC sampler
I have a WebService & I hit that WebService once for every 2 seconds with 1 user using jmeter for 5 days continuously. I invoke JMeter using ANT. I set 4GB heap size for jmeter using ANT while invoking jmeter. I do not have any ANT_OPTS set for ANT. (I am not sure of the default heap size ANT will take)
When i start the jmeter test, it works fine. I get the jmeter summariser output in the console for 30 every 30 seconds which is great.
Problem is - After 3 or 4 days, It stops writing the summariser results in the console (first 3 days it works really fine. no issues). ANT build does not complete yet. It is still running. Looks like jmeter stops working/hanging. But I do not think it uses the 4GB as i see more free memory available. I do not see any exception in the log anywhere. The API is still running good if i try to access it. Is it an issue with ANT / jmeter? Should i allocate more space for ANT for this long running ANT target?
Tried 2 times. First time it ran for 3 days w/o any issues. Second time almost 4 days w/o any issues. But It does not run for 5 days continuously.
Note:
It is nothing to do with the WebService server. The jmeter machine has 16GB RAM. I do not run anything else except this test (ANT & jmeter).
I use SOAP/XML RPC sampler in JMeter
原文:https://stackoverflow.com/questions/31434828
最满意答案
由于IDataReader没有暴露很多帮助,因此您可以执行的操作是有限制的。 使用如类似问题的答案中所示的循环
您可以在处理的第一行中构建一个简单的字典,该字典由列名称键入,其中序号为值(如果您不关心序数值,则为HashSet)。 然后你可以使用columnDictionary.ContainsKey(“LastName”)作为你的测试。 你只会为遇到的第一行构建一次字典,然后所有后续行都会很快。
但说实话,与数据库时间相比,使用as-as所消耗的时间是其他stackoverflow qeustion可能忽略不计的解决方案。
编辑:此处的其他可能性: 检查数据读取器中是否存在列
There is a limit to what you can do since the IDataReader doesn't expose much that helps. Using the loop as shown in the answer to a similar question
Check for column name in a SqlDataReader object
You could, with the first row you process, build a simple dictionary that is keyed by column name with ordinals as values (or a HashSet if you don't care about the ordinal values). Then you can just use columnDictionary.ContainsKey("LastName") as your test. You would only build the dictionary once, for the first row encountered, then all the subsequent rows would be fast.
But to be honest, compared with database time, the time consumed by using as-is the solution in that other stackoverflow qeustion would probably be negligible.
Edit: additional possibilities here: Checking to see if a column exists in a data reader
相关问答
更多-
TCP/IP模型是一个________。[2023-05-19]
a -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
DataReader最佳实践(DataReader best-practices)[2021-12-31]
这是我做的方式: Int32 ordinal = dataReader.GetOrdinal("ColumnName"); if (!dataReader.IsDBNull(ordinal)) yourString = dataReader.GetString(ordinal); 像上面显示的那样检查DBNull非常重要,因为如果DataReader的字段为空,它将在您尝试检索它时引发异常。 Here is the way that I do it: Int32 ordinal = dataRe ... -
使用DataAdapter.Fill()方法使用相同的查询。 dconnetion = new OdbcConnection(lsconnectionstring); //dconnetion.Open() mssql = "select cust_id,cust_name,cust_address,cust_contact_no from cust_details where cust_id in (select cust_id from cust_details)"; cmd.Connection = ...
-
SqlDataReader和所有其他数据提供者实现IDataReader 。 如果您认为您可能会将提供程序从sql更改为oracle或将来的其他内容 ,请使用IDataReader 。 在使用IDataReader情况下,您不必更改代码即可IDataReader更改。 否则你可以使用SqlDataReader 。 但是如果你使用IDataReader ,它将是一个分离的设计,并被推荐。 SqlDataReader and all other data providers implement IDataRea ...
-
由于IDataReader没有暴露很多帮助,因此您可以执行的操作是有限制的。 使用如类似问题的答案中所示的循环 检查SqlDataReader对象中的列名 您可以在处理的第一行中构建一个简单的字典,该字典由列名称键入,其中序号为值(如果您不关心序数值,则为HashSet)。 然后你可以使用columnDictionary.ContainsKey(“LastName”)作为你的测试。 你只会为遇到的第一行构建一次字典,然后所有后续行都会很快。 但说实话,与数据库时间相比,使用as-as所消耗的时间是其他sta ...
-
尝试按照以下方式。 string xmlData = (string)reader["LoadData"] 现在在XmlDocument或XDocument中加载字符串以解析它。 Try to do following way. string xmlData = (string)reader["LoadData"] Now load string in XmlDocument or XDocument to parse it.
-
Datareader与数据集(Datareader vs Dataset)[2022-01-10]
最好通过使用SQK SERVER的ROW NUMBER()函数来更改查询并添加一个额外的列。它将获取您选择的每一行的数字。使用DataTable来保存执行select查询后获得的值。 因此,您的数据表中将有一个额外的列,只需使用您要打印多少行的列。在for循环中,可以从开始索引到endindex打印coloumns。 dataTable的最后一列将包含通过执行查询选择的行数。 我希望你的问题能通过这种方法解决 Its better to change the query and add an extra c ... -
如果您知道列的索引,则通过索引访问它。 If you know the index of the column, then access it by the index.
-
通过调用GetSchemaTable可以获得此类信息。 它返回一个DataTable,其中查询返回的每列都有一行。 该表的每列描述由元数据相对于查询字段提取的特定信息 例如 SqlDataReader dataReader = command.ExecuteReader(); if (!dataReader.HasRows || !withValues) { DataTable dt = dataReader.GetSchemaTable(); fo ...