stats dom
This commit is contained in:
parent
89ba74f1f7
commit
e9f910ea23
|
@ -0,0 +1,9 @@
|
||||||
|
from pydantic import BaseModel, ConfigDict, Field
|
||||||
|
from time import time_ns
|
||||||
|
|
||||||
|
class CPU(BaseModel):
|
||||||
|
model_config = ConfigDict()
|
||||||
|
time:int = Field(default_factory=time_ns)
|
||||||
|
user:int = Field()
|
||||||
|
system:int = Field()
|
||||||
|
count:int = Field()
|
|
@ -0,0 +1,16 @@
|
||||||
|
|
||||||
|
from pydantic import UUID4, BaseModel, ConfigDict, Field
|
||||||
|
from time import time_ns
|
||||||
|
|
||||||
|
class DiskFlows(BaseModel):
|
||||||
|
bytes:int = Field()
|
||||||
|
reqs:int = Field()
|
||||||
|
times:int = Field()
|
||||||
|
|
||||||
|
class Disk(BaseModel):
|
||||||
|
model_config = ConfigDict()
|
||||||
|
time:int = Field(default_factory=time_ns)
|
||||||
|
uuid:UUID4 = Field()
|
||||||
|
name:str = Field()
|
||||||
|
read:DiskFlows = Field()
|
||||||
|
write:DiskFlows = Field()
|
|
@ -0,0 +1,18 @@
|
||||||
|
from typing import Optional
|
||||||
|
from pydantic import BaseModel, ConfigDict, Field
|
||||||
|
|
||||||
|
class MemorySwap(BaseModel):
|
||||||
|
swp_in:int = Field(serialization_alias="in")
|
||||||
|
swp_out:Optional[int] = Field(default=None, serialization_alias="out")
|
||||||
|
|
||||||
|
class Memory(BaseModel):
|
||||||
|
model_config = ConfigDict()
|
||||||
|
time:int = Field()
|
||||||
|
available:Optional[int] = Field(default=None)
|
||||||
|
current:int = Field()
|
||||||
|
maximum:int = Field()
|
||||||
|
disk_caches:Optional[int] = Field(default=None)
|
||||||
|
rss:int = Field()
|
||||||
|
swap:MemorySwap = Field()
|
||||||
|
unused:Optional[int] = Field(default=None)
|
||||||
|
usable:Optional[int] = Field(default=None)
|
|
@ -0,0 +1,18 @@
|
||||||
|
from typing import Any, List
|
||||||
|
from pydantic import UUID4, BaseModel, ConfigDict, Field
|
||||||
|
from time import time_ns
|
||||||
|
|
||||||
|
class InterfaceFlows(BaseModel):
|
||||||
|
bytes:int = Field()
|
||||||
|
drop:int = Field()
|
||||||
|
errs:int = Field()
|
||||||
|
pkts:int = Field()
|
||||||
|
|
||||||
|
class Interface(BaseModel):
|
||||||
|
model_config = ConfigDict()
|
||||||
|
|
||||||
|
uuid:UUID4 = Field()
|
||||||
|
time:int = Field(default_factory=time_ns)
|
||||||
|
name:str = Field()
|
||||||
|
rx:InterfaceFlows = Field()
|
||||||
|
tx:InterfaceFlows = Field()
|
2
setup.py
2
setup.py
|
@ -2,7 +2,7 @@ from setuptools import find_packages, setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='deevirt_schema',
|
name='deevirt_schema',
|
||||||
version='0.1.0',
|
version='0.1.1',
|
||||||
description='Deevirt Schema',
|
description='Deevirt Schema',
|
||||||
url='https://git.celeonet.fr/Deevirt/deevirt_schema.git',
|
url='https://git.celeonet.fr/Deevirt/deevirt_schema.git',
|
||||||
author='Celeonet',
|
author='Celeonet',
|
||||||
|
|
Loading…
Reference in New Issue