本文整理汇总了Python中socorro.lib.util.DotDict.OOMAllocationSize方法的典型用法代码示例。如果您正苦于以下问题:Python DotDict.OOMAllocationSize方法的具体用法?Python DotDict.OOMAllocationSize怎么用?Python DotDict.OOMAllocationSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类socorro.lib.util.DotDict
的用法示例。
在下文中一共展示了DotDict.OOMAllocationSize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_OOMAllocationSize_predicate
# 需要导入模块: from socorro.lib.util import DotDict [as 别名]
# 或者: from socorro.lib.util.DotDict import OOMAllocationSize [as 别名]
def test_OOMAllocationSize_predicate(self):
pc = DotDict()
pc.signature = 'hello'
rc = DotDict()
rc.OOMAllocationSize = 17
fake_processor = create_basic_fake_processor()
rule = OOMSignature()
predicate_result = rule.predicate(rc, pc, fake_processor)
ok_(predicate_result)
示例2: test_OOMAllocationSize_action_large
# 需要导入模块: from socorro.lib.util import DotDict [as 别名]
# 或者: from socorro.lib.util.DotDict import OOMAllocationSize [as 别名]
def test_OOMAllocationSize_action_large(self):
pc = DotDict()
pc.signature = 'hello'
fake_processor = create_basic_fake_processor()
rc = DotDict()
rc.OOMAllocationSize = 17000000
rule = OOMSignature()
action_result = rule.action(rc, pc, fake_processor)
ok_(action_result)
ok_(pc.original_signature, 'hello')
ok_(pc.signature, 'OOM | large | hello')
示例3: test_OOMAllocationSize_action_small
# 需要导入模块: from socorro.lib.util import DotDict [as 别名]
# 或者: from socorro.lib.util.DotDict import OOMAllocationSize [as 别名]
def test_OOMAllocationSize_action_small(self):
pc = DotDict()
pc.signature = 'hello'
fake_processor = create_basic_fake_processor()
rc = DotDict()
rc.OOMAllocationSize = 17
rd = {}
rule = OOMSignature(fake_processor.config)
action_result = rule.action(rc, rd, pc, fake_processor)
ok_(action_result)
ok_(pc.original_signature, 'hello')
ok_(pc.signature, 'OOM | small')