我使用Web Polygraph负载测试工具来提供快速的http请求,因为它可靠,资源消耗低,并且具有良好的报告功能。但是,我找不到任何设置来告诉Web Polygraph运行一段时间。我希望能够获得准确的报告,而不是通过向进程发送终止信号而导致的潜在未命中。
我一直在阅读web polygraph的帮助页面,并且可以看到每秒的请求是可配置的,但是我没有看到对请求持续时间的支持。
我有这样的配置文件(我认为这是选项可能去的地方,可能在机器人配置中):
Content SimpleContent = {
size = exp(1KB); // response sizes distributed exponentially
cachable = 100%;
};
Server S1 = {
kind = "S101";
contents = [ SimpleContent ];
direct_access = contents;
addresses = ['X.X.X.X' ];
};
// a primitive robot
Robot R1 = {
kind = "R101";
req_rate = 100/sec;
interests = [ "foreign" ];
foreign_trace = "/home/x/trace.urls";
pop_model = { pop_distr = popUnif(); };
recurrence = 100% / SimpleContent.cachable;
origins = S1.addresses;
addresses = ['X.X.X.X' ];
};
我希望能够设置一些持续时间,比如说40分钟,我可以让R1机器人每秒100页,每次40分钟。
我从Web Polygraph的支持中得到了答案。为了将来参考,可以通过Phase和Goal对象以及使用Schedule函数来完成。这是我收到的电子邮件的一小段内容:
See the goal field inside the Phase object:
http://www.web-polygraph.org/docs/reference/pgl/types.html#type:docs/reference/pgl/types/Goal
http://www.web-polygraph.org/docs/reference/pgl/types.html#type:docs/reference/pgl/types/Phase
Do not forget to schedule() your phases:
http://www.web-polygraph.org/docs/reference/pgl/calls.html
Many workloads that are distributed with Polygraph include Phase
schedules. To see examples, search for "goal" in workloads/