本文整理汇总了Python中bzt.modules.blazemeter.BlazeMeterUploader.settings["monitoring-buffer-limit"]方法的典型用法代码示例。如果您正苦于以下问题:Python BlazeMeterUploader.settings["monitoring-buffer-limit"]方法的具体用法?Python BlazeMeterUploader.settings["monitoring-buffer-limit"]怎么用?Python BlazeMeterUploader.settings["monitoring-buffer-limit"]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bzt.modules.blazemeter.BlazeMeterUploader
的用法示例。
在下文中一共展示了BlazeMeterUploader.settings["monitoring-buffer-limit"]方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_monitoring_buffer_limit_option
# 需要导入模块: from bzt.modules.blazemeter import BlazeMeterUploader [as 别名]
# 或者: from bzt.modules.blazemeter.BlazeMeterUploader import settings["monitoring-buffer-limit"] [as 别名]
def test_monitoring_buffer_limit_option(self):
obj = BlazeMeterUploader()
obj.engine = EngineEmul()
mock = BZMock(obj._user)
obj.settings["monitoring-buffer-limit"] = 100
obj.prepare()
for i in range(1000):
mon = [{"ts": i, "source": "local", "cpu": float(i) / 1000 * 100, "mem": 2, "bytes-recv": 100, "other": 0}]
obj.monitoring_data(mon)
for source, buffer in iteritems(obj.monitoring_buffer.data):
self.assertLessEqual(len(buffer), 100)
self.assertEqual(1, len(mock.requests))
示例2: test_monitoring_buffer_limit_option
# 需要导入模块: from bzt.modules.blazemeter import BlazeMeterUploader [as 别名]
# 或者: from bzt.modules.blazemeter.BlazeMeterUploader import settings["monitoring-buffer-limit"] [as 别名]
def test_monitoring_buffer_limit_option(self):
obj = BlazeMeterUploader()
obj.engine = EngineEmul()
obj.client = BlazeMeterClientEmul(logging.getLogger(''))
obj.client.results.append({"marker": "ping", 'result': {}})
obj.settings["monitoring-buffer-limit"] = 100
obj.prepare()
for i in range(1000):
mon = [{"ts": i, "source": "local", "cpu": float(i) / 1000 * 100, "mem": 2, "bytes-recv": 100, "other": 0}]
obj.monitoring_data(mon)
for source, buffer in iteritems(obj.monitoring_buffer.data):
self.assertLessEqual(len(buffer), 100)