class MyStats(mmstats.BaseMmStats): pid = mmstats.StaticUIntField(label="sys.pid", value=os.getpid) tid = mmstats.StaticInt64Field(label="sys.tid", value=libgettid.gettid) uid = mmstats.StaticUInt64Field(label="sys.uid", value=os.getuid) gid = mmstats.StaticUInt64Field(label="sys.gid", value=os.getgid) errors = mmstats.UIntField(label="com.urbanairship.app.errors") warnings = mmstats.UIntField(label="com.urbanairship.app.warnings") queries = mmstats.UIntField(label="com.urbanairship.app.queries") cache_hits = mmstats.UIntField(label="com.urbanairship.app.cache_hits") cache_misses = mmstats.UIntField(label="com.urbanairship.app.cache_misses") degraded = mmstats.BoolField(label="com.urbanairship.app.degraded") foo = mmstats.StaticTextField( label="com.idealist.app.name", value="webapp")
class MixedStats(mmstats.MmStats): a = mmstats.UIntField() b = mmstats.BoolField() c = mmstats.IntField() d = mmstats.BoolField(label='The Bool') e = mmstats.ShortField(label='shortie')
class MyStats(mmstats.MmStats): zebras = mmstats.IntField() apples = mmstats.UIntField() oranges = mmstats.UIntField()
class StatsA(mmstats.MmStats): f2 = mmstats.UIntField(label='f.secondary') f1 = mmstats.UIntField()
class ChildAStats(ParentStats): a = mmstats.BoolField() c = mmstats.UIntField()
class ParentStats(mmstats.MmStats): a = mmstats.UIntField() b = mmstats.UIntField()
class LaserStats(mmstats.MmStats): blue = mmstats.UIntField() red = mmstats.UIntField()
class BigStats(mmstats.MmStats): f1 = mmstats.UIntField(label='f' + ('o' * _mmap.PAGESIZE)) f2 = mmstats.UIntField(label='f' + ('0' * _mmap.PAGESIZE)) f3 = mmstats.UIntField(label='f' + ('1' * _mmap.PAGESIZE))