-
Notifications
You must be signed in to change notification settings - Fork 604
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
GUI representation of the system's activity using the 'system_stats' extension. #6721
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apar from these, I have already sent some other review on email (https://www.postgresql.org/message-id/flat/CAFOhELeBxSfF8PUk556R-cBoyvNrLkU3NDWhzbFbD1OQfp%2BxwA%40mail.gmail.com#78cad2258908e3ef48e7b9b4c62b20d2)
b55e737
to
d76903a
Compare
518bfc9
to
569f7b1
Compare
569f7b1
to
351fa07
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@khushboovashi Could you please suggest labels for the table in Memory and CPU tabs. |
Description
This pull request contains changes to enhance the GUI representation of the system's activity using the 'system_stats' extension.
Changes Made
Added tab to toggle between general (existing dashboard) and system statistics.
Updated StreamingChart
Secondary Y-axis support (Different scale on the right hand side). Set
showSecondAxis=True
to enable this.It is currently not formatting the axis values and takes much space in case of larger values (eg. memory_usage, handle_count etc.). So added custom formatter for y-axis values.
suffixes = ['', 'k', 'M', 'B', 'T']
Tooltip issue: When the container's size changes, tooltips continues to accumulate without being properly removed. This bug is also present in the current stable version of pgAdmin4 application.
Current method that is used to display tooltips involves inserting a new element into the DOM with the class name "uplot-tooltip". So, to resolve this issue, I have added method to remove all the existing tooltip elements before inserting a new one.
If the System Stats extension does not exist, display the appropriate message
System statistics features covered
All the features are split into 4 different tabs with the following grouping:
Tabular representation of the following OS properties.
Streaming line chart to show changes in handle and process count over time.
Tabular representation of the following CPU properties.
Streaming line chart to show changes in CPU usage over time. Values are a percentage of time spent by CPUs for all operations.
Following modes are covered:
Streaming line chart to show changes in the average load of the system over 1, 5, 10 and 15 minute intervals over time.
Tabular representation of the CPU usage per process with the options to filter and sort.
Streaming line chart to show changes in the memory usage.
Both Main and Swap memory are covered with following categories.
Tabular representation of the memory usage per process with the options to filter and sort.
Disk Information
Tabular representation of the following properties for all the drive partitions.
Graphical representation of Total space using a Pie chart and Stacked Bar chart for Used and Available space
I/O Analysis Information
Streaming line chart to show changes in the total number of operations, bytes transferred, and time spent in milliseconds for reading and writing over time for each disk.
Provided option to configure the refresh rates for the API calls
(File > Preferences > Dashboards > Refresh rates)
SQL queries
All the required queries are present in the
pgadmin4\web\pgadmin\dashboard\templates\dashboard\sql\default\system_statistics.sql
Demo
A small demonstration of the work can be found here.