简体   繁体   English

WireMock性能和负载测试

[英]WireMock Performance and Load Testing

Is there any way to make WireMock Standalone faster? 有没有办法让WireMock Standalone更快? I have 1kb response file that I want to get back between 3ms - 10ms Currently the response is coming back within 20ms - 40ms 我有1kb的响应文件,我希望在3ms - 10ms之间回来。目前响应在20ms内回复 - 40ms

This is for an individual request/response from SoapUI, so it also needs to scale under load, although I believe this can be accommodated using the command line switches/Jetty parameters 这是针对来自SoapUI的单独请求/响应,因此它还需要在负载下进行扩展,尽管我相信这可以通过命令行开关/ Jetty参数来适应

Machine is 2x2.8 GHz (64 bit) / 32GB Ram 机器是2x2.8 GHz(64位)/ 32GB Ram

You might find that putting the response bodies directly into the stub mappings works better (which you can do as base64 if they're binary). 您可能会发现将响应主体直接放入存根映射中效果更好(如果它们是二进制的,您可以将其作为base64)。

Currently WireMock reads body files from the filesystem each time they're served, so you're probably taking a hit on I/O latency. 目前,WireMock每次服务时都会从文件系统中读取正文文件,因此您可能会对I / O延迟产生影响。 When they're part of the mapping they're held in memory. 当它们成为映射的一部分时,它们被保存在内存中。

Another alternative if you have the option would be to mount the __files directory on faster storage eg a ramdisk. 如果你有选择的另一种选择是将__files目录挂载到更快的存储上,例如ramdisk。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM