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 BoolFields(mmstats.MmStats): a = mmstats.BoolField() b = mmstats.BoolField(initial=True)
class TestStat(mmstats.MmStats): b = mmstats.BoolField()
class ChildBStats(ChildAStats): b = mmstats.BoolField() c = mmstats.BoolField()
class ChildAStats(ParentStats): a = mmstats.BoolField() c = mmstats.UIntField()
class BigStats(mmstats.MmStats): f1 = mmstats.BoolField(label='f1' * (_mmap.PAGESIZE / 2)) f2 = mmstats.BoolField(label='f2' * (_mmap.PAGESIZE / 2))
class Stats(mmstats.MmStats): ok = mmstats.CounterField(label="flask.example.ok") bad = mmstats.CounterField(label="flask.example.bad") working = mmstats.BoolField(label="flask.example.working")