我有一个问题想要检查我的应用程序创建 100 条记录所需的总时间。首先,我必须调用端点,该端点将触发具有相关负载的 100 条记录计算的消息。之后,我的系统将执行昂贵的后台计算,这将在一段(未知)时间后创建这些记录。我正在考虑看起来像这样的方法:
--simple controller
-- http request for triggering message for 100 records creation
-- beanshell assertion (set total number of items created as 0)
--while controller(number of total items is smaller than 100 records)
-- http request to check number of items created so far
-- JSON Extractor to extract total number of items
-- beanshell assertion (set total number of items)
我想测量创建 100 条记录所需的总时间。我还想提一下,有时我的应用程序可能会崩溃,并且永远不会创建 100 条记录(另一件事要检查,这样我就不会进入无限 while 循环)。实现这一目标的最佳方法是什么?
你的方法很好而且有效。不过我会替换: