mattermost / desktop

Mattermost Desktop application for Windows, Mac and Linux
Apache License 2.0
2.03k stars 829 forks source link

[MM-60086][MM-60610] Implement performanceMonitor, collect CPU/memory usage data and send via API #3165

Closed devinbinnie closed 1 month ago

devinbinnie commented 1 month ago

Summary

This PR contains a new module called performanceMonitor, which is responsible for:

This monitoring will take CPU and memory usage data and send it to servers that have elected to subscribe to the Desktop App for performance data. This data will then be available to administrators via Prometheus.

The idea behind this is to get a better idea of how hard users are getting hit in terms of system resources by various parts of our app. The data is divided up by unique process, so that should give us some idea of which part of the app is causing issues if there is a lot of system resources being dedicated to a process.

Not in scope for this change are load times, which we will calculate and send as part of a separate API created later.

Ticket Link

https://mattermost.atlassian.net/browse/MM-60610 https://mattermost.atlassian.net/browse/MM-60086

Screenshots

image

Implement a performanceMonitor to collect and send anonymous usage data to server dashboards.
github-actions[bot] commented 1 month ago

Here are the test results below:

Test Summary for Linux on commit 2679017842f887f5f193650cf25ece062e66cc27

New failed tests found on Linux:

Test Summary for macOS on commit 2679017842f887f5f193650cf25ece062e66cc27

All stable tests passed on macOS.

yasserfaraazkhan commented 1 month ago

verified e2e tests locally. No blocking failures.

devinbinnie commented 1 month ago

@amyblais Am I okay to cherry-pick this to v5.10 to include in the next RC?

amyblais commented 1 month ago

Am I okay to cherry-pick this to v5.10 to include in the next RC?

I think this would be better for v5.11 unless this is considered to be urgent for v5.10. I thought you were planning only bug fixes for RC-2. We are cherry-picking to v5.10

devinbinnie commented 1 month ago

/cherry-pick release-5.10

mattermost-build commented 1 month ago

Cherry pick is scheduled.

cwarnermm commented 3 weeks ago

@devinbinnie - Are there any product or dev docs updates needed for this PR from your perspective?

devinbinnie commented 3 weeks ago

@devinbinnie - Are there any product or dev docs updates needed for this PR from your perspective?

Dev docs would be helpful, but I likely won't be able to get to it any time soon. Product doc wise - maybe we can add something for the upcoming dashboard? https://mattermost.atlassian.net/browse/MM-60613