Add data structure description to Sensors() object
This commit is contained in:
parent
484f13dc29
commit
d7067af522
1 changed files with 36 additions and 1 deletions
|
|
@ -37,7 +37,42 @@ class ThermalLimitReachedError(RuntimeError):
|
||||||
|
|
||||||
# Classes
|
# Classes
|
||||||
class Sensors():
|
class Sensors():
|
||||||
"""Class for holding sensor specific data."""
|
"""Class for holding sensor specific data.
|
||||||
|
|
||||||
|
# Sensor data structure
|
||||||
|
#
|
||||||
|
# Section # CPUTemps / Other
|
||||||
|
# Adapters # coretemp / acpi / nvme / etc
|
||||||
|
# Sources # Core 1 / SODIMM / Sensor X / etc
|
||||||
|
# Label # temp1_input / etc (i.e. lm_sensor label)
|
||||||
|
# Max # 99.0
|
||||||
|
# X # 55.0 (where X is Idle/Current/Sysbench/etc)
|
||||||
|
# Temps # [39.0, 38.0, 40.0, 39.0, 38.0, ...]
|
||||||
|
#
|
||||||
|
# e.g.
|
||||||
|
# { 'CPUTemps': { 'coretemp-isa-0000': { 'Core 0': { 'Average': 44.5,
|
||||||
|
# 'Current': 44.0,
|
||||||
|
# 'Idle': 44.5,
|
||||||
|
# 'Label': 'temp2_input',
|
||||||
|
# 'Max': 45.0,
|
||||||
|
# 'Temps': [ 45.0,
|
||||||
|
# 45.0,
|
||||||
|
# ...,
|
||||||
|
# 42.0]}}}}
|
||||||
|
#
|
||||||
|
# Sensor history data structure
|
||||||
|
# [ ('Name of "run"', sensor_data_structure_described_above), ]
|
||||||
|
#
|
||||||
|
# e.g.
|
||||||
|
# [
|
||||||
|
# ( 'Idle',
|
||||||
|
# { 'CPUTemps': { 'coretemp-isa-0000': { 'Core 0': { 'Max': 45.0, ..., }}}}
|
||||||
|
# ),
|
||||||
|
# ( 'Sysbench',
|
||||||
|
# { 'CPUTemps': { 'coretemp-isa-0000': { 'Core 0': { 'Max': 85.0, ..., }}}}
|
||||||
|
# ),
|
||||||
|
# ]
|
||||||
|
"""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.background_thread: Thread | None = None
|
self.background_thread: Thread | None = None
|
||||||
self.data: dict[Any, Any] = get_sensor_data()
|
self.data: dict[Any, Any] = get_sensor_data()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue