当前位置: 首页>>代码示例>>Python>>正文


Python DotDict.OOMAllocationSize方法代码示例

本文整理汇总了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)
开发者ID:Earth4,项目名称:socorro,代码行数:11,代码来源:test_processed_transform_rules.py

示例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')
开发者ID:Earth4,项目名称:socorro,代码行数:17,代码来源:test_processed_transform_rules.py

示例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')
开发者ID:jberkus,项目名称:socorro,代码行数:18,代码来源:test_processed_transform_rules.py


注:本文中的socorro.lib.util.DotDict.OOMAllocationSize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。