它是否能够通过在另一台机器上使用它的结果 JMeter 来计算应用程序的性能?

Is it able to calculate performance of an application through using it's result JMeter in another machine?

我在环境 PRODUCT 中有一个应用程序 运行。我想通过使用 JMeter 来测试它的性能,但我不能直接对环境 PRODUCT 进行测试,所以我的想法是在环境 DEV 中测试应用程序,然后我可以使用结果来计算 PRODUCT 中的值。我可以这样做吗?如果可以,我该怎么做?

如果 DEV 环境与 PRODUCT 环境相同 - 您应该得到相同的结果。

如果 DEV 环境不同 - 我认为您无法精确计算 PRODUCT 环境的预期性能,因为要考虑的因素太多,而且它不像这样工作:"If my app is serving X requests per second being deployed on a system with Y GB of RAM then it will process X * 2 requests per second on a system with Y * 2 GB of RAM"

There are several things you still can check on a scaled down environment,即

  • 您可以 运行 某种形式的 integration test 但在负载下,它将允许您识别任何部署问题,即配置错误。如果有问题的长运行宁慢数据库查询 - 它也会在生产中复制
  • 您可以测试负载分配和分配。如果您的应用程序可扩展 - 您可以执行 scalability testing。负载分配和扩展算法在两种环境中都是相同的
  • 您可以使用 PerfMon Plugin 来执行系统监控,以确定消耗最多的资源 - 生产环境中的情况是一样的
  • 你可以运行一个Soak Test - put your system under a prolonged load. This way you will be able to catch memory leaks
  • 您可以在系统处于负载状态时使用 profiling tools 来识别最消耗资源的逻辑、最大的对象、最慢的函数等。