-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PIOT-CDA-02-007: Connect SystemCpuUtilTask and SystemMemUtilTask to SystemPerformanceManager #20
Comments
Hi,
output the following error:
Trying:
Output the following error:
Any thought? Best, Full code of SystemPerformanceManager:
|
Hi - thanks for pointing this out and for your question. Two things:
Hope this helps! |
Thank you for your quick help! That helped but I needed to update the code to include definitions for cpuUtilPct and memUtilPct to be members of the SystemPerformanceManager Class. Below is the full code of SystemPerformance that worked correctly:
Below are the results that I have for this code. I see the results are the same during one run (multiple iterations over time. e.g.: 85.7 in this run). When I run the code it gives a new value (e.g. 98.2 )but it is repeated during the same run.
|
Glad to hear the fixes mentioned resolved the initial issue. Here are some thoughts on your follow-up question:
Hope this helps! |
Description
SystemCpuUtilTask
andSystemMemUtilTask
withinSystemPerformanceManager
and use theapscheduler
library to run each task at a regular interval.Review the README
Estimated effort may vary greatly
Actions
NOTE: The implementation examples depicted here are only one way to implement the requirements listed. Your own implementation may vary of course.
add_job()
method requires a function pointer to thehandleTelemetry()
method, which is already stubbed out.add_job()
- you may want to consider using additional parameters, such ascoalesce
andmisfire_grace_time
if you run into thread call delays or failures. See apscheduler v3.x - add_job() docs for further info. Here's one notional example for review purposes:handleTelemetry()
and add the following lines of code:cpuUtilPct
andmemUtilPct
as class-scoped. Since these variables are only needed within thehandleTelemetry()
method, they can be locally scoped to the method.startManager()
andstopManager()
methods:Estimate
Tests
The text was updated successfully, but these errors were encountered: