本文整理匯總了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)