首页 \ 问答 \ JMeter结果大小限制(JMeter results size limit)

JMeter结果大小限制(JMeter results size limit)

我在Jmeter中运行稳定性测试(60小时)。 我在测试计划中有几个图表来捕获系统资源,如cpu,threads,heap。

24小时后View_Results_Tree.xml文件的大小为9GB。 我担心如果jmeter会维持60小时。

  1. View_Results_Tree.xml或结果文件夹大小是否有大小限制?
  2. 在进行如此长时间的测试之前,Jmeter遵循的最佳实践是什么? 我正在寻找这种长时间测试的推荐配置/属性。

谢谢Veera。


I am running a stability test (60hrs) in Jmeter. I have several graphs in the test plan to capture system resources like cpu, threads, heap.

The size of View_Results_Tree.xml file is 9GB after 24hrs. I am afraid if jmeter will sustain for 60hrs.

  1. Is there size limit for View_Results_Tree.xml or results folder size in Jmeter?
  2. What are the best practices to be followed in Jmeter before running such long tests? I am looking for recommended config/properties for such long tests.

Thanks Veera.


原文:https://stackoverflow.com/questions/39054961
更新时间:2022-04-11 14:04

最满意答案

问题在于你在测试用例中调用真正的boto,而不是你的模拟。

您需要使用它在测试模块中具有的相同符号名称来模拟对象。 而不是试图修补'boto.s3.connection.S3Connection',你想补丁'test_s3.S3Connection'。 它以'test_s3'开头,因为这是您要加载测试代码的模块的名称。 然后,在点之后,使用与该模块内部相同的符号可以访问S3Connection(即,没有boto.s3.connection)。

另外,补丁为你自动创建一个模拟,所以你不需要创建第一个模拟对象。 由于您已经修补了S3Connection,而不是修补其中的内容,您只需将创建的mock作为正确方法的返回值插入即可:

    mock_bucket = mock.Mock()
    mock_key = mock.Mock()

    with mock.patch('test_s3.S3Connection') as mock_conn:
        mock_conn.get_bucket.return_value = mock_bucket
        mock_bucket.lookup.return_value = mock_key

        mock_key.size.return_value = 50000
        self.assertEquals(fake.check_size(), 50)

The problem is that you are calling the real boto in your test case, not your mock.

You need to mock the object using the same symbol name it has inside your test module. Instead of trying to patch 'boto.s3.connection.S3Connection', you want to patch 'test_s3.S3Connection'. It starts with 'test_s3' because that is the name of the module from where you are loading the code under test. Then, after the dot, use the same symbol that inside that module gives you access to S3Connection (that is, without boto.s3.connection).

Also, patch creates a mock automatically for you, so you do not need to create the first mock object. And as you already patched S3Connection, instead of patching things inside it, you just need to plug your created mocks as return values for the proper methods:

    mock_bucket = mock.Mock()
    mock_key = mock.Mock()

    with mock.patch('test_s3.S3Connection') as mock_conn:
        mock_conn.get_bucket.return_value = mock_bucket
        mock_bucket.lookup.return_value = mock_key

        mock_key.size.return_value = 50000
        self.assertEquals(fake.check_size(), 50)

相关问答

更多
  • 哪种方法可能是更好的选择? 我打算假装你没有问过,因为没有“正确”的答案 - 这是主观的,而且有很多因素,其中一些是基于意见的。 但这两种解决方案都是可行的。 API网关,您将其用作将Lambda函数公开到Internet的前端,具有CORS支持,因此不需要关注您。 另一种选择是使用S3和Lambda(使用API网关),但将两个资源都配置为CloudFront分发背后的来源。 指定存储桶的默认缓存行为,然后使用路径模式(如/api/*将API请求路由到API网关。 这会将所有请求代理到适当的来源,但您的站点 ...
  • 老实说,我不知道发生了什么。 但是我重新启动了我的EC2实例并再次运行上面的程序,它运行得很好。 I honestly have no clue what happened. But I restarted my EC2 instance and ran the above again and it worked perfectly.
  • 最大的不同是CloudFront在全球50多个地方,因此它将为全球观众提供更快的内容。 实际上,您不必选择 - 您可以生成页面,将它们放入S3以获得最大的可缓存性,然后通过CloudFront提供以获得最佳的查看器体验。 The biggest difference is CloudFront is in more than 50 locations worldwide, so it will deliver content faster to viewers worldwide. Actually, yo ...
  • 所以事实证明,自从我正在调用我在课堂上创建的制作者对象时,我正在测试这些嘲笑正在被第二个嘲弄对象记录下来。 我得到了其中两个:测试类中的一个mock_producer和称为myproducer的第二个模拟生产者(我在测试中使用的名称)。 @mock.patch('mypackage.mycoordinator.producer.Producer') # This creates the first mocked object @mock.patch('mypackage.mycoordinator.cons ...
  • 这些对象是否存储在Amazon Glacier中? “InvalidObjectState”是S3尝试从Amazon Glacier读取对象但尚未“恢复”对象时将获得的错误。 如果是这种情况,请注意从Amazon Glacier恢复对象可能需要数小时,并且取决于有多少因素和许多其他因素,可能非常昂贵。 Are these objects stored in Amazon Glacier? "InvalidObjectState" is the error that S3 would get if you t ...
  • 你已经对php.ini文件做了一些调整。 下载这个文件http://curl.haxx.se/ca/cacert.pem并像这样在php.ini中设置路径,然后重新启动服务器。 ;;;;;;;;;;;;;;;;;;;; ; php.ini Options ; ;;;;;;;;;;;;;;;;;;;; curl.cainfo = "C:\xampp\php\extras\ssl\cacert.pem" 以上路径对于XAAMP来说很常见 这将解决您的问题。 You have do a tweak to t ...
  • 虽然我无法确定它是否是“最好的”,但您可以尝试AFAmazonS3Manager的AFNetworking 。 我过去没有直接使用它,但知道有的人。 https://github.com/AFNetworking/AFAmazonS3Manager 它似乎是我能找到的唯一的非亚马逊AWS框架。 While I can't say for sure if it's "the best" you could try the AFAmazonS3Manager from AFNetworking. I haven ...
  • 你应该嘲笑你正在测试的地方。 根据提供的示例,这意味着您在settings.py模块中使用的Escli类需要针对settings.py模拟。 因此,更实际的情况是,您的patch调用在setUp看起来像是这样: self.patcher = patch('escli.settings.Escli') 有了这个,你现在正在根据你的测试运行情况,在正确的地方嘲笑你想要的东西。 此外,为了增加测试的稳健性,您可能需要考虑指定您正在创建的Elasticsearch实例,以验证您实际上调用的是与Elasticsea ...
  • 您可以使用界面来完成。 例如,假设您有一个名为Mailer的界面: type Mailer interface { Send() error } 现在,您可以将Mailer对象嵌入到调用Send方法的函数中。 type Processor struct { Mailer } func (p *Processor) Process() { _ = p.Mailer.Send() } 现在,在您的测试中,您可以创建一个模拟邮件程序。 type mockMailer struct{} ...
  • 是。 您可以为存储桶启用CORS,以便可以通过XMLHttpRequest加载对象。 http://aws.typepad.com/aws/2012/08/amazon-s3-cross-origin-resource-sharing.html http://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html 特别是在使用PhoneGap / Cordova时,您可以通过在应用程序中将域列入白名单来绕过在服务器上启用CORS: http://docs.phon ...

相关文章

更多

最新问答

更多
  • 获取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))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。