mendevi.database.complete¶
Fill the SQL database.
Functions
|
Complete the environment table with the current environment. |
|
Measure the idle consumption. |
Details
- mendevi.database.complete.add_environment(database: Cursor | str | bytes | Path) int[source]
Complete the environment table with the current environment.
Parameters¶
- databasepathlike
The path of the existing database to be updated.
Returns¶
- idint
The primary key of the freshly updated environment table.
- mendevi.database.complete.get_idle(duration: float = 60.0) dict[source]
Measure the idle consumption.
Parameters¶
- durationfloat, default=60
The total duration of the measurement, bloking time in second.
Returns¶
- measuresdict
Same as
mendevi.measures.Activity.
Examples¶
>>> from mendevi.database.complete import get_idle >>> idle = get_idle(duration=1.0) Measure IDLE during 1.0 seconds... █ avg cpu usage: ... % █ avg ram usage: ... Go █ avg rapl power: ... W >>>