# Python class Perfmon

> The eXtremeDB Performance Monitor is implemented in the class Perfmon which is defined as follows:

>         class Perfmon(object):
>             TotalPages  = 0
>             FreePages   = 1
>             UsedPages   = 2
>             FileSize    = 3
>             LogFileSize = 4
>             UsedFileSize = 5
>             CacheHitCount = 6
>             CacheMissCount = 7
>             CachePagesAllocated = 8
>             CachePagesUSed = 9
>             CachePagesPinned = 10
>             CachePagesModified = 11
>             CachePagesDirty = 12
>             CachePagesCopied = 13
>             CachePagesWriteDelayed = 14
>             DiskReadTime  = 0
>             DiskWriteTime = 1
>             LogWriteTime  = 2
>             CommitTime    = 3
>             RollbackTime  = 4
>             SnapshotDuration = 5
>             ClusterNetSendTime = 6
>             ClusterNetRecvTime = 7

>             @staticmethod
>             def init(memsize =64 << 20):
>                 global _eXtremeDB
>                 return _eXtremeDB.perfmon_init(memsize)

>             @staticmethod
>             def close():
>                 global _eXtremeDB
>                 return _eXtremeDB.perfmon_close()

>             @staticmethod
>             def attach(db):
>                 global _eXtremeDB
>                 return _eXtremeDB.perfmon_attach(db)

>             @staticmethod
>             def detach(db):
>                 global _eXtremeDB
>                 return _eXtremeDB.perfmon_detach(db)

>             @staticmethod
>             def getDbName():
>                 global _eXtremeDB
>                 return _eXtremeDB.perfmon_get_db_name()

>             @staticmethod
>             def getOptions():
>                 global _eXtremeDB
>                 return _eXtremeDB.perfmon_get_options()

>             @staticmethod
>             def setOption(option, value):
>                 global _eXtremeDB
>                 return _eXtremeDB.perfmon_set_option(option, value)