Skip to content
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

Add cpu usage chart #1344

Merged
merged 4 commits into from
May 18, 2023

Conversation

Kathenae
Copy link
Contributor

CPU usage chart


This pull requests add a cpu usage chart to the diagnostics page, allowing users to view the system wide cpu usage percentage and update the charts every 5 seconds.
Changes:

  • added psutil to the main requirements.txt and coreplugins/diagnostics/requirements.txt.
  • Modified and Refactored coreplugins/diagnostics/plugin.py to retrieve the system wide CPU usage and also exposed an api endpoint that returns all diagnostics information the plugin uses.
  • Modified coreplugins/diagnostic/templates/diagnostic.html to include a donut chart that displays the CPU usage percent.
  • Refactored existing code to support updating the charts every 5 seconds with information retrieved using the exposed api endpoint.

Note: The cpu usage stats is retrieved using the psutil library which is considered cross-platform but i personally have not tested this in other operating systems so not sure what the behavior would be there.

this PR is related to this #1341 issue

@Kathenae Kathenae changed the title Kathenae add cpu usage chart Add cpu usage chart May 18, 2023
@pierotofy
Copy link
Member

Thanks @Kathenae , 🙏 I've made some small adjustments, but otherwise looks great.

image

I'll merge this by tonight.

@Kathenae
Copy link
Contributor Author

Kathenae commented May 18, 2023 via email

@pierotofy pierotofy merged commit a18c1d3 into OpenDroneMap:master May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants