From e7490916f930dfac7e47caa880b136ec8f7897d0 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Sun, 28 Jan 2024 14:51:02 +0530 Subject: [PATCH 01/31] feat: add performance report doctype and functions --- .../database_server/database_server.js | 6 + .../database_server/database_server.py | 82 +++++++++ .../doctype/performance_report/__init__.py | 0 .../performance_report/performance_report.js | 8 + .../performance_report.json | 162 ++++++++++++++++++ .../performance_report/performance_report.py | 9 + .../test_performance_report.py | 9 + .../doctype/top_memory_by_event/__init__.py | 0 .../top_memory_by_event.json | 86 ++++++++++ .../top_memory_by_event.py | 9 + .../doctype/top_memory_by_host/__init__.py | 0 .../top_memory_by_host.json | 77 +++++++++ .../top_memory_by_host/top_memory_by_host.py | 9 + .../doctype/top_memory_by_thread/__init__.py | 0 .../top_memory_by_thread.json | 86 ++++++++++ .../top_memory_by_thread.py | 9 + .../doctype/top_memory_by_user/__init__.py | 0 .../top_memory_by_user.json | 77 +++++++++ .../top_memory_by_user/top_memory_by_user.py | 9 + 19 files changed, 638 insertions(+) create mode 100644 press/press/doctype/performance_report/__init__.py create mode 100644 press/press/doctype/performance_report/performance_report.js create mode 100644 press/press/doctype/performance_report/performance_report.json create mode 100644 press/press/doctype/performance_report/performance_report.py create mode 100644 press/press/doctype/performance_report/test_performance_report.py create mode 100644 press/press/doctype/top_memory_by_event/__init__.py create mode 100644 press/press/doctype/top_memory_by_event/top_memory_by_event.json create mode 100644 press/press/doctype/top_memory_by_event/top_memory_by_event.py create mode 100644 press/press/doctype/top_memory_by_host/__init__.py create mode 100644 press/press/doctype/top_memory_by_host/top_memory_by_host.json create mode 100644 press/press/doctype/top_memory_by_host/top_memory_by_host.py create mode 100644 press/press/doctype/top_memory_by_thread/__init__.py create mode 100644 press/press/doctype/top_memory_by_thread/top_memory_by_thread.json create mode 100644 press/press/doctype/top_memory_by_thread/top_memory_by_thread.py create mode 100644 press/press/doctype/top_memory_by_user/__init__.py create mode 100644 press/press/doctype/top_memory_by_user/top_memory_by_user.json create mode 100644 press/press/doctype/top_memory_by_user/top_memory_by_user.py diff --git a/press/press/doctype/database_server/database_server.js b/press/press/doctype/database_server/database_server.js index 8b2d9e78e9..4eafc8c4bc 100644 --- a/press/press/doctype/database_server/database_server.js +++ b/press/press/doctype/database_server/database_server.js @@ -86,6 +86,12 @@ frappe.ui.form.on('Database Server', { true, frm.doc.is_server_setup && frm.doc.is_performance_schema_enabled, ], + [ + __('Fetch Performance Report'), + 'fetch_performance_report', + true, + frm.doc.is_server_setup && frm.doc.is_performance_schema_enabled, + ], [__('Restart MariaDB'), 'restart_mariadb', true, frm.doc.is_server_setup], [__('Stop MariaDB'), 'stop_mariadb', true, frm.doc.is_server_setup], [ diff --git a/press/press/doctype/database_server/database_server.py b/press/press/doctype/database_server/database_server.py index 5aa1dddbfb..31fd51144a 100644 --- a/press/press/doctype/database_server/database_server.py +++ b/press/press/doctype/database_server/database_server.py @@ -532,6 +532,85 @@ def disable_performance_schema(self): self.is_performance_schema_enabled = False self.save() + @frappe.whitelist() + def fetch_performance_report(self): + if self.is_performance_schema_enabled: + frappe.enqueue_doc( + self.doctype, + self.name, + "_fetch_performance_report", + queue="long", + timeout=1200, + ) + frappe.msgprint("Performance Schema Report Fetching Started") + else: + frappe.throw("Performance Schema is not enabled") + + def _fetch_performance_report(self): + try: + reports = self.get_performance_report() + record = frappe.new_doc("Performance Report") + record.server = self.name + record.recorded_on = frappe.utils.now_datetime() + record.total_allocated_memory = self._bytes_to_mb(reports.get("total_allocated_memory")) + record.top_memory_by_user = [] + for r in reports.get("top_memory_by_user", []): + record.append("top_memory_by_user", { + "user": r.get("user"), + "count": r.get("current_count_used"), + "memory": self._bytes_to_mb(r.get("current_allocated")), + "avg_memory": self._bytes_to_mb(r.get("current_avg_alloc")), + "total_memory": self._bytes_to_mb(r.get("total_allocated")), + "max_memory": self._bytes_to_mb(r.get("current_max_alloc")), + }) + record.top_memory_by_host = [] + for r in reports.get("top_memory_by_host", []): + record.append("top_memory_by_host", { + "host": r.get("host"), + "count": r.get("current_count_used"), + "memory": self._bytes_to_mb(r.get("current_allocated")), + "avg_memory": self._bytes_to_mb(r.get("current_avg_alloc")), + "total_memory": self._bytes_to_mb(r.get("total_allocated")), + "max_memory": self._bytes_to_mb(r.get("current_max_alloc")), + }) + record.top_memory_by_event = [] + for r in reports.get("top_memory_by_event", []): + record.append("top_memory_by_event", { + "event_type": r.get("event_name"), + "count": r.get("current_count"), + "max_count": r.get("high_count"), + "memory": self._bytes_to_mb(r.get("current_alloc")), + "avg_memory": self._bytes_to_mb(r.get("current_avg_alloc")), + "max_memory": self._bytes_to_mb(r.get("high_alloc")), + "max_avg_memory": self._bytes_to_mb(r.get("high_avg_alloc")), + }) + record.top_memory_by_thread = [] + for r in reports.get("top_memory_by_thread", []): + record.append("top_memory_by_thread", { + "thread_id": r.get("thread_id"), + "user": r.get("user"), + "count": r.get("current_count_used"), + "memory": self._bytes_to_mb(r.get("current_allocated")), + "avg_memory": self._bytes_to_mb(r.get("current_avg_alloc")), + "total_memory": self._bytes_to_mb(r.get("total_allocated")), + "max_memory": self._bytes_to_mb(r.get("current_max_alloc")), + }) + record.save() + except Exception: + log_error("Performance Schema Report Fetch Exception", server=self.as_dict()) + raise + + def get_performance_report(self): + return self.agent.post("database/performance_report", { + "private_ip": self.private_ip, + "mariadb_root_password": self.get_password("mariadb_root_password"), + "reports": [] # fetch all reports + }) or {} + + def _bytes_to_mb(self, bytes_val): + print(bytes_val) + return round(bytes_val / 1024 / 1024, 2) + def reset_root_password_secondary(self): primary = frappe.get_doc("Database Server", self.primary) self.mariadb_root_password = primary.get_password("mariadb_root_password") @@ -717,4 +796,7 @@ def _reconfigure_mariadb_exporter(self): "performance-schema-consumer-events-waits-current": "ON", "performance-schema-consumer-events-waits-history": "ON", "performance-schema-consumer-events-waits-history-long": "ON", + "performance-schema-consumer-events-transactions-current": "ON", + "performance-schema-consumer-events-transactions-history": "ON", + "performance-schema-consumer-events-transactions-history-long": "ON" } diff --git a/press/press/doctype/performance_report/__init__.py b/press/press/doctype/performance_report/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/press/doctype/performance_report/performance_report.js b/press/press/doctype/performance_report/performance_report.js new file mode 100644 index 0000000000..24f702f49c --- /dev/null +++ b/press/press/doctype/performance_report/performance_report.js @@ -0,0 +1,8 @@ +// Copyright (c) 2024, Frappe and contributors +// For license information, please see license.txt + +// frappe.ui.form.on("Performance Report", { +// refresh(frm) { + +// }, +// }); diff --git a/press/press/doctype/performance_report/performance_report.json b/press/press/doctype/performance_report/performance_report.json new file mode 100644 index 0000000000..b17400371b --- /dev/null +++ b/press/press/doctype/performance_report/performance_report.json @@ -0,0 +1,162 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-26 16:06:33.989913", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "general_tab", + "server", + "recorded_on", + "memory_usage_tab", + "total_allocated_memory", + "top_memory_by_user", + "top_memory_by_host", + "top_memory_by_thread", + "top_memory_by_event", + "hot_spots_for_io_tab", + "high_cost_sql_statements_tab", + "database_schema_statistics_tab", + "wait_event_times_tab", + "innodb_statistics_tab", + "user_resource_use_tab" + ], + "fields": [ + { + "fieldname": "general_tab", + "fieldtype": "Tab Break", + "label": "General" + }, + { + "fieldname": "recorded_on", + "fieldtype": "Datetime", + "in_list_view": 1, + "label": "Recorded On", + "read_only": 1, + "reqd": 1 + }, + { + "fieldname": "memory_usage_tab", + "fieldtype": "Tab Break", + "label": "Memory Usage" + }, + { + "fieldname": "hot_spots_for_io_tab", + "fieldtype": "Tab Break", + "label": "Hot Spots for I/O" + }, + { + "fieldname": "high_cost_sql_statements_tab", + "fieldtype": "Tab Break", + "label": "High Cost SQL Statements" + }, + { + "fieldname": "database_schema_statistics_tab", + "fieldtype": "Tab Break", + "label": "Database Schema Statistics" + }, + { + "fieldname": "wait_event_times_tab", + "fieldtype": "Tab Break", + "label": "Wait Event Times" + }, + { + "fieldname": "innodb_statistics_tab", + "fieldtype": "Tab Break", + "label": "InnoDB Statistics" + }, + { + "fieldname": "user_resource_use_tab", + "fieldtype": "Tab Break", + "label": "User Resource Use" + }, + { + "fieldname": "top_memory_by_user", + "fieldtype": "Table", + "label": "Top Memory By User", + "options": "Top Memory By User", + "read_only": 1 + }, + { + "fieldname": "top_memory_by_host", + "fieldtype": "Table", + "label": "Top Memory By Host", + "options": "Top Memory By Host", + "read_only": 1 + }, + { + "fieldname": "top_memory_by_event", + "fieldtype": "Table", + "label": "Top Memory By Event", + "options": "Top Memory By Event", + "read_only": 1 + }, + { + "fieldname": "top_memory_by_thread", + "fieldtype": "Table", + "label": "Top Memory By Thread", + "options": "Top Memory By Thread", + "read_only": 1 + }, + { + "fieldname": "total_allocated_memory", + "fieldtype": "Float", + "label": "Total Allocated Memory (MB)", + "read_only": 1 + }, + { + "fieldname": "server", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Database Server", + "options": "Database Server", + "read_only": 1, + "reqd": 1 + } + ], + "in_create": 1, + "index_web_pages_for_search": 1, + "links": [], + "modified": "2024-01-28 14:48:52.010031", + "modified_by": "Administrator", + "module": "Press", + "name": "Performance Report", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + }, + { + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Press Admin", + "share": 1, + "write": 1 + }, + { + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Press Member", + "share": 1, + "write": 1 + } + ], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/press/doctype/performance_report/performance_report.py b/press/press/doctype/performance_report/performance_report.py new file mode 100644 index 0000000000..e7e9401f24 --- /dev/null +++ b/press/press/doctype/performance_report/performance_report.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class PerformanceReport(Document): + pass diff --git a/press/press/doctype/performance_report/test_performance_report.py b/press/press/doctype/performance_report/test_performance_report.py new file mode 100644 index 0000000000..81d7faf375 --- /dev/null +++ b/press/press/doctype/performance_report/test_performance_report.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and Contributors +# See license.txt + +# import frappe +from frappe.tests.utils import FrappeTestCase + + +class TestPerformanceReport(FrappeTestCase): + pass diff --git a/press/press/doctype/top_memory_by_event/__init__.py b/press/press/doctype/top_memory_by_event/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/press/doctype/top_memory_by_event/top_memory_by_event.json b/press/press/doctype/top_memory_by_event/top_memory_by_event.json new file mode 100644 index 0000000000..751bdaddab --- /dev/null +++ b/press/press/doctype/top_memory_by_event/top_memory_by_event.json @@ -0,0 +1,86 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-26 16:57:53.388269", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "event_type", + "count", + "max_count", + "memory", + "avg_memory", + "max_memory", + "max_avg_memory" + ], + "fields": [ + { + "fieldname": "event_type", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Event Type", + "read_only": 1 + }, + { + "fieldname": "count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Count", + "read_only": 1 + }, + { + "fieldname": "max_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Count", + "read_only": 1 + }, + { + "fieldname": "memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Memory (MB)", + "read_only": 1 + }, + { + "fieldname": "avg_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Memory (MB)", + "read_only": 1 + }, + { + "fieldname": "max_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Memory (MB)", + "read_only": 1 + }, + { + "fieldname": "max_avg_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Avg Memory (MB)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-26 17:14:54.192143", + "modified_by": "Administrator", + "module": "Press", + "name": "Top Memory By Event", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/press/doctype/top_memory_by_event/top_memory_by_event.py b/press/press/doctype/top_memory_by_event/top_memory_by_event.py new file mode 100644 index 0000000000..b1df8a8f16 --- /dev/null +++ b/press/press/doctype/top_memory_by_event/top_memory_by_event.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class TopMemoryByEvent(Document): + pass diff --git a/press/press/doctype/top_memory_by_host/__init__.py b/press/press/doctype/top_memory_by_host/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/press/doctype/top_memory_by_host/top_memory_by_host.json b/press/press/doctype/top_memory_by_host/top_memory_by_host.json new file mode 100644 index 0000000000..67a3375d89 --- /dev/null +++ b/press/press/doctype/top_memory_by_host/top_memory_by_host.json @@ -0,0 +1,77 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-26 16:56:11.211639", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "host", + "count", + "memory", + "avg_memory", + "total_memory", + "max_memory" + ], + "fields": [ + { + "fieldname": "host", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Host", + "read_only": 1 + }, + { + "fieldname": "count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Count", + "read_only": 1 + }, + { + "fieldname": "memory", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Memory (MB)", + "read_only": 1 + }, + { + "fieldname": "avg_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Memory (MB)", + "read_only": 1 + }, + { + "fieldname": "total_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Memory (MB)", + "read_only": 1 + }, + { + "fieldname": "max_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Memory (MB)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-26 17:13:32.367268", + "modified_by": "Administrator", + "module": "Press", + "name": "Top Memory By Host", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/press/doctype/top_memory_by_host/top_memory_by_host.py b/press/press/doctype/top_memory_by_host/top_memory_by_host.py new file mode 100644 index 0000000000..f578982781 --- /dev/null +++ b/press/press/doctype/top_memory_by_host/top_memory_by_host.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class TopMemoryByHost(Document): + pass diff --git a/press/press/doctype/top_memory_by_thread/__init__.py b/press/press/doctype/top_memory_by_thread/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/press/doctype/top_memory_by_thread/top_memory_by_thread.json b/press/press/doctype/top_memory_by_thread/top_memory_by_thread.json new file mode 100644 index 0000000000..0dcfb62144 --- /dev/null +++ b/press/press/doctype/top_memory_by_thread/top_memory_by_thread.json @@ -0,0 +1,86 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-26 17:01:34.463177", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "thread_id", + "user", + "count", + "memory", + "avg_memory", + "max_memory", + "total_memory" + ], + "fields": [ + { + "fieldname": "thread_id", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Thread ID", + "read_only": 1 + }, + { + "fieldname": "user", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "User", + "read_only": 1 + }, + { + "fieldname": "count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Count", + "read_only": 1 + }, + { + "fieldname": "memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Memory (MB)", + "read_only": 1 + }, + { + "fieldname": "avg_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Memory (MB)", + "read_only": 1 + }, + { + "fieldname": "max_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Memory (MB)", + "read_only": 1 + }, + { + "fieldname": "total_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Memory (MB)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-26 17:15:33.716317", + "modified_by": "Administrator", + "module": "Press", + "name": "Top Memory By Thread", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/press/doctype/top_memory_by_thread/top_memory_by_thread.py b/press/press/doctype/top_memory_by_thread/top_memory_by_thread.py new file mode 100644 index 0000000000..cd3c77b1cd --- /dev/null +++ b/press/press/doctype/top_memory_by_thread/top_memory_by_thread.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class TopMemoryByThread(Document): + pass diff --git a/press/press/doctype/top_memory_by_user/__init__.py b/press/press/doctype/top_memory_by_user/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/press/doctype/top_memory_by_user/top_memory_by_user.json b/press/press/doctype/top_memory_by_user/top_memory_by_user.json new file mode 100644 index 0000000000..36d803fa38 --- /dev/null +++ b/press/press/doctype/top_memory_by_user/top_memory_by_user.json @@ -0,0 +1,77 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-26 16:52:53.037283", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "user", + "count", + "memory", + "avg_memory", + "total_memory", + "max_memory" + ], + "fields": [ + { + "fieldname": "user", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "User", + "read_only": 1 + }, + { + "fieldname": "count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Count", + "read_only": 1 + }, + { + "fieldname": "memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Memory (MB)", + "read_only": 1 + }, + { + "fieldname": "avg_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Memory (MB)", + "read_only": 1 + }, + { + "fieldname": "total_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Memory (MB)", + "read_only": 1 + }, + { + "fieldname": "max_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Memory (MB)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-26 17:14:22.541166", + "modified_by": "Administrator", + "module": "Press", + "name": "Top Memory By User", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/press/doctype/top_memory_by_user/top_memory_by_user.py b/press/press/doctype/top_memory_by_user/top_memory_by_user.py new file mode 100644 index 0000000000..53b6026784 --- /dev/null +++ b/press/press/doctype/top_memory_by_user/top_memory_by_user.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class TopMemoryByUser(Document): + pass From c96c8b4c03606978d1a60958c0def843436e0f1a Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Sun, 28 Jan 2024 19:47:20 +0530 Subject: [PATCH 02/31] feat: add cronjob --- press/hooks.py | 1 + press/press/doctype/database_server/database_server.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/press/hooks.py b/press/hooks.py index 2e1e5bfc3a..53ebcb2a6f 100644 --- a/press/hooks.py +++ b/press/hooks.py @@ -240,6 +240,7 @@ "press.press.doctype.version_upgrade.version_upgrade.update_from_site_update", "press.press.doctype.site_replication.site_replication.update_from_site", "press.press.doctype.virtual_disk_snapshot.virtual_disk_snapshot.sync_snapshots", + "press.press.doctype.database_server.database_server.fetch_performance_schema_reports", ], "* * * * *": [ "press.press.doctype.deploy_candidate.deploy_candidate.run_scheduled_builds", diff --git a/press/press/doctype/database_server/database_server.py b/press/press/doctype/database_server/database_server.py index 31fd51144a..b0457597ac 100644 --- a/press/press/doctype/database_server/database_server.py +++ b/press/press/doctype/database_server/database_server.py @@ -608,7 +608,6 @@ def get_performance_report(self): }) or {} def _bytes_to_mb(self, bytes_val): - print(bytes_val) return round(bytes_val / 1024 / 1024, 2) def reset_root_password_secondary(self): @@ -800,3 +799,8 @@ def _reconfigure_mariadb_exporter(self): "performance-schema-consumer-events-transactions-history": "ON", "performance-schema-consumer-events-transactions-history-long": "ON" } + +def fetch_performance_schema_reports(): + for server in frappe.get_all("Database Server", {"is_performance_schema_enabled": 1}): + server = frappe.get_doc("Database Server", server.name) + server.fetch_performance_report() From 27f5441b687db7dd9d456f0cabdbba7034f86ea0 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Mon, 29 Jan 2024 11:45:22 +0530 Subject: [PATCH 03/31] feat: cleanup --- .../database_server/database_server.py | 40 ++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/press/press/doctype/database_server/database_server.py b/press/press/doctype/database_server/database_server.py index b0457597ac..46700ed57e 100644 --- a/press/press/doctype/database_server/database_server.py +++ b/press/press/doctype/database_server/database_server.py @@ -601,10 +601,48 @@ def _fetch_performance_report(self): raise def get_performance_report(self): + """ + Available Reports: + -total_allocated_memory + -top_memory_by_event + -top_memory_by_user + -top_memory_by_host + -top_memory_by_thread + -top_io_by_file_activity_report + -top_io_by_file_by_time + -top_io_by_event_category + -top_io_in_time_by_event_category + -top_io_by_user_or_thread + -statement_analysis + -statements_in_highest_5_percentile + -statements_using_temp_tables + -statements_with_sorting + -statements_with_full_table_scans + -statements_with_errors_or_warnings + -schema_index_statistics + -schema_table_statistics + -schema_table_statistics_with_buffer + -schema_tables_with_full_table_scans + -schema_unused_indexes + -global_waits_by_time + -waits_by_user_by_time + -wait_classes_by_time + -waits_classes_by_avg_time + -innodb_buffer_stats_by_schema + -innodb_buffer_stats_by_table + -user_resource_use_overview + -user_resource_use_io_statistics + """ return self.agent.post("database/performance_report", { "private_ip": self.private_ip, "mariadb_root_password": self.get_password("mariadb_root_password"), - "reports": [] # fetch all reports + "reports": [ + "total_allocated_memory", + "top_memory_by_event", + "top_memory_by_user", + "top_memory_by_host", + "top_memory_by_thread", + ] }) or {} def _bytes_to_mb(self, bytes_val): From 81e041dac0273b7de120be4e4bb79ced693dfe43 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Mon, 29 Jan 2024 11:57:31 +0530 Subject: [PATCH 04/31] chore: remove transactions perf schema consumer --- press/press/doctype/database_server/database_server.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/press/press/doctype/database_server/database_server.py b/press/press/doctype/database_server/database_server.py index 46700ed57e..bf6dc0760f 100644 --- a/press/press/doctype/database_server/database_server.py +++ b/press/press/doctype/database_server/database_server.py @@ -833,9 +833,6 @@ def _reconfigure_mariadb_exporter(self): "performance-schema-consumer-events-waits-current": "ON", "performance-schema-consumer-events-waits-history": "ON", "performance-schema-consumer-events-waits-history-long": "ON", - "performance-schema-consumer-events-transactions-current": "ON", - "performance-schema-consumer-events-transactions-history": "ON", - "performance-schema-consumer-events-transactions-history-long": "ON" } def fetch_performance_schema_reports(): From 17888f8f96fda2b249f5251ad5767ae03e51fedf Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Tue, 30 Jan 2024 12:23:11 +0530 Subject: [PATCH 05/31] feat: top_io_by_file_activity_report added --- .../database_server/database_server.py | 14 ++ .../performance_report.json | 10 +- .../top_file_io_activity_report/__init__.py | 0 .../top_file_io_activity_report.json | 136 ++++++++++++++++++ .../top_file_io_activity_report.py | 9 ++ .../top_memory_by_user.json | 2 +- 6 files changed, 169 insertions(+), 2 deletions(-) create mode 100644 press/press/doctype/top_file_io_activity_report/__init__.py create mode 100644 press/press/doctype/top_file_io_activity_report/top_file_io_activity_report.json create mode 100644 press/press/doctype/top_file_io_activity_report/top_file_io_activity_report.py diff --git a/press/press/doctype/database_server/database_server.py b/press/press/doctype/database_server/database_server.py index bf6dc0760f..9dac9a42a9 100644 --- a/press/press/doctype/database_server/database_server.py +++ b/press/press/doctype/database_server/database_server.py @@ -595,6 +595,19 @@ def _fetch_performance_report(self): "total_memory": self._bytes_to_mb(r.get("total_allocated")), "max_memory": self._bytes_to_mb(r.get("current_max_alloc")), }) + record.top_io_by_file_activity_report = [] + for r in reports.get("top_io_by_file_activity_report", []): + record.append("top_io_by_file_activity_report", { + "file": r.get("file"), + "total_io": self._bytes_to_mb(r.get("total")), + "read_requests": r.get("count_read"), + "total_read_io": self._bytes_to_mb(r.get("total_read")), + "avg_read_io": self._bytes_to_mb(r.get("avg_read")), + "write_requests": r.get("count_write"), + "total_write_io": self._bytes_to_mb(r.get("total_written")), + "avg_write_io": self._bytes_to_mb(r.get("avg_write")), + "write_percentage": r.get("write_pct"), + }) record.save() except Exception: log_error("Performance Schema Report Fetch Exception", server=self.as_dict()) @@ -642,6 +655,7 @@ def get_performance_report(self): "top_memory_by_user", "top_memory_by_host", "top_memory_by_thread", + "top_io_by_file_activity_report" ] }) or {} diff --git a/press/press/doctype/performance_report/performance_report.json b/press/press/doctype/performance_report/performance_report.json index b17400371b..db2d37680b 100644 --- a/press/press/doctype/performance_report/performance_report.json +++ b/press/press/doctype/performance_report/performance_report.json @@ -15,6 +15,7 @@ "top_memory_by_thread", "top_memory_by_event", "hot_spots_for_io_tab", + "top_io_by_file_activity_report", "high_cost_sql_statements_tab", "database_schema_statistics_tab", "wait_event_times_tab", @@ -112,12 +113,19 @@ "options": "Database Server", "read_only": 1, "reqd": 1 + }, + { + "fieldname": "top_io_by_file_activity_report", + "fieldtype": "Table", + "label": "Top File I/O Activity Report", + "options": "Top File IO Activity Report", + "read_only": 1 } ], "in_create": 1, "index_web_pages_for_search": 1, "links": [], - "modified": "2024-01-28 14:48:52.010031", + "modified": "2024-01-30 12:22:04.598451", "modified_by": "Administrator", "module": "Press", "name": "Performance Report", diff --git a/press/press/doctype/top_file_io_activity_report/__init__.py b/press/press/doctype/top_file_io_activity_report/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/press/doctype/top_file_io_activity_report/top_file_io_activity_report.json b/press/press/doctype/top_file_io_activity_report/top_file_io_activity_report.json new file mode 100644 index 0000000000..4de77ff911 --- /dev/null +++ b/press/press/doctype/top_file_io_activity_report/top_file_io_activity_report.json @@ -0,0 +1,136 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-30 11:58:49.811446", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "file", + "total_io", + "write_percentage", + "read_io_info_section", + "read_requests", + "column_break_ydlk", + "total_read_io", + "column_break_vrkh", + "avg_read_io", + "write_io_info_section", + "write_requests", + "column_break_jlxu", + "total_write_io", + "column_break_vfzt", + "avg_write_io" + ], + "fields": [ + { + "fieldname": "file", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "File", + "read_only": 1 + }, + { + "fieldname": "read_requests", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Read Requests", + "read_only": 1 + }, + { + "fieldname": "write_requests", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Write Requests", + "read_only": 1 + }, + { + "fieldname": "total_read_io", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Read IO (MB)", + "read_only": 1 + }, + { + "fieldname": "avg_read_io", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Read IO (MB)", + "read_only": 1 + }, + { + "fieldname": "total_write_io", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Write IO (MB)", + "read_only": 1 + }, + { + "fieldname": "avg_write_io", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Write IO (MB)", + "read_only": 1 + }, + { + "fieldname": "write_percentage", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Write %", + "read_only": 1 + }, + { + "fieldname": "total_io", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total IO (MB)", + "read_only": 1 + }, + { + "fieldname": "read_io_info_section", + "fieldtype": "Section Break", + "label": "Read IO Info" + }, + { + "fieldname": "column_break_ydlk", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_vrkh", + "fieldtype": "Column Break" + }, + { + "fieldname": "write_io_info_section", + "fieldtype": "Section Break", + "label": "Write IO Info" + }, + { + "fieldname": "column_break_jlxu", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_vfzt", + "fieldtype": "Column Break" + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-30 12:07:54.572633", + "modified_by": "Administrator", + "module": "Press", + "name": "Top File IO Activity Report", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/press/doctype/top_file_io_activity_report/top_file_io_activity_report.py b/press/press/doctype/top_file_io_activity_report/top_file_io_activity_report.py new file mode 100644 index 0000000000..5b4605812f --- /dev/null +++ b/press/press/doctype/top_file_io_activity_report/top_file_io_activity_report.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class TopFileIOActivityReport(Document): + pass diff --git a/press/press/doctype/top_memory_by_user/top_memory_by_user.json b/press/press/doctype/top_memory_by_user/top_memory_by_user.json index 36d803fa38..363dbb7832 100644 --- a/press/press/doctype/top_memory_by_user/top_memory_by_user.json +++ b/press/press/doctype/top_memory_by_user/top_memory_by_user.json @@ -65,7 +65,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-26 17:14:22.541166", + "modified": "2024-01-30 11:55:41.213166", "modified_by": "Administrator", "module": "Press", "name": "Top Memory By User", From 3dbcee3a3efc858b48959c5c4220d6a0b5bc28a9 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Tue, 30 Jan 2024 17:04:25 +0530 Subject: [PATCH 06/31] feat: top_io_by_file_by_time added --- .../database_server/database_server.py | 21 ++- .../performance_report/performance_report.js | 18 +- .../performance_report.json | 62 ++++++- .../top_file_io_activity_report.json | 10 +- .../top_io_by_event_category/__init__.py | 0 .../top_io_by_event_category.json | 28 ++++ .../top_io_by_event_category.py | 9 + .../top_io_by_file_by_time/__init__.py | 0 .../top_io_by_file_by_time.json | 154 ++++++++++++++++++ .../top_io_by_file_by_time.py | 9 + .../top_memory_by_event.json | 9 +- .../top_memory_by_host.json | 7 +- .../top_memory_by_thread.json | 8 +- .../top_memory_by_user.json | 7 +- 14 files changed, 325 insertions(+), 17 deletions(-) create mode 100644 press/press/doctype/top_io_by_event_category/__init__.py create mode 100644 press/press/doctype/top_io_by_event_category/top_io_by_event_category.json create mode 100644 press/press/doctype/top_io_by_event_category/top_io_by_event_category.py create mode 100644 press/press/doctype/top_io_by_file_by_time/__init__.py create mode 100644 press/press/doctype/top_io_by_file_by_time/top_io_by_file_by_time.json create mode 100644 press/press/doctype/top_io_by_file_by_time/top_io_by_file_by_time.py diff --git a/press/press/doctype/database_server/database_server.py b/press/press/doctype/database_server/database_server.py index 9dac9a42a9..3593d3c7e2 100644 --- a/press/press/doctype/database_server/database_server.py +++ b/press/press/doctype/database_server/database_server.py @@ -608,6 +608,19 @@ def _fetch_performance_report(self): "avg_write_io": self._bytes_to_mb(r.get("avg_write")), "write_percentage": r.get("write_pct"), }) + record.top_io_by_file_by_time = [] + for r in reports.get("top_io_by_file_by_time", []): + record.append("top_io_by_file_by_time", { + "file": r.get("file"), + "total_io": self._bytes_to_mb(r.get("total")), + "read_requests": r.get("count_read"), + "write_requests": r.get("count_write"), + "misc_requests": r.get("count_misc"), + "total_time": self._convert_to_us(r.get("total_latency")), + "read_time": self._convert_to_us(r.get("read_latency")), + "write_time": self._convert_to_us(r.get("write_latency")), + "misc_time": self._convert_to_us(r.get("misc_latency")), + }) record.save() except Exception: log_error("Performance Schema Report Fetch Exception", server=self.as_dict()) @@ -655,13 +668,19 @@ def get_performance_report(self): "top_memory_by_user", "top_memory_by_host", "top_memory_by_thread", - "top_io_by_file_activity_report" + "top_io_by_file_activity_report", + "top_io_by_file_by_time", + "top_io_by_event_category", + "top_io_in_time_by_event_category", ] }) or {} def _bytes_to_mb(self, bytes_val): return round(bytes_val / 1024 / 1024, 2) + def _convert_to_us(self, duration): + return round(duration / 1000000, 2) + def reset_root_password_secondary(self): primary = frappe.get_doc("Database Server", self.primary) self.mariadb_root_password = primary.get_password("mariadb_root_password") diff --git a/press/press/doctype/performance_report/performance_report.js b/press/press/doctype/performance_report/performance_report.js index 24f702f49c..52d6984cf9 100644 --- a/press/press/doctype/performance_report/performance_report.js +++ b/press/press/doctype/performance_report/performance_report.js @@ -1,8 +1,16 @@ // Copyright (c) 2024, Frappe and contributors // For license information, please see license.txt -// frappe.ui.form.on("Performance Report", { -// refresh(frm) { - -// }, -// }); +frappe.ui.form.on("Performance Report", { + refresh(frm) { + // hide row index and check box + var css = document.createElement("style"); + css.type = "text/css"; + var styles = ` + .row-index {display:none;} + .row-check {display:none;}`; + if (css.styleSheet) css.styleSheet.cssText = styles; + else css.appendChild(document.createTextNode(styles)); + document.getElementsByTagName("head")[0].appendChild(css); + }, +}); diff --git a/press/press/doctype/performance_report/performance_report.json b/press/press/doctype/performance_report/performance_report.json index db2d37680b..3ef1912346 100644 --- a/press/press/doctype/performance_report/performance_report.json +++ b/press/press/doctype/performance_report/performance_report.json @@ -10,12 +10,19 @@ "recorded_on", "memory_usage_tab", "total_allocated_memory", + "top_memory_by_user_section", "top_memory_by_user", + "top_memory_by_host_section", "top_memory_by_host", + "top_memory_by_thread_section", "top_memory_by_thread", + "top_memory_by_event_section", "top_memory_by_event", "hot_spots_for_io_tab", + "top_file_io_activity_report_section", "top_io_by_file_activity_report", + "top_io_by_file_by_time_section", + "top_io_by_file_by_time", "high_cost_sql_statements_tab", "database_schema_statistics_tab", "wait_event_times_tab", @@ -74,28 +81,24 @@ { "fieldname": "top_memory_by_user", "fieldtype": "Table", - "label": "Top Memory By User", "options": "Top Memory By User", "read_only": 1 }, { "fieldname": "top_memory_by_host", "fieldtype": "Table", - "label": "Top Memory By Host", "options": "Top Memory By Host", "read_only": 1 }, { "fieldname": "top_memory_by_event", "fieldtype": "Table", - "label": "Top Memory By Event", "options": "Top Memory By Event", "read_only": 1 }, { "fieldname": "top_memory_by_thread", "fieldtype": "Table", - "label": "Top Memory By Thread", "options": "Top Memory By Thread", "read_only": 1 }, @@ -117,15 +120,62 @@ { "fieldname": "top_io_by_file_activity_report", "fieldtype": "Table", - "label": "Top File I/O Activity Report", "options": "Top File IO Activity Report", "read_only": 1 + }, + { + "fieldname": "top_io_by_file_by_time", + "fieldtype": "Table", + "options": "Top IO by File by Time", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "fieldname": "top_memory_by_event_section", + "fieldtype": "Section Break", + "label": "Top Memory By Event" + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "fieldname": "top_memory_by_user_section", + "fieldtype": "Section Break", + "label": "Top Memory By User" + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "fieldname": "top_memory_by_host_section", + "fieldtype": "Section Break", + "label": "Top Memory By Host" + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "fieldname": "top_memory_by_thread_section", + "fieldtype": "Section Break", + "label": "Top Memory By Thread" + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "fieldname": "top_file_io_activity_report_section", + "fieldtype": "Section Break", + "label": "Top File I/O Activity Report" + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "fieldname": "top_io_by_file_by_time_section", + "fieldtype": "Section Break", + "label": "Top IO by File by Time" } ], "in_create": 1, "index_web_pages_for_search": 1, "links": [], - "modified": "2024-01-30 12:22:04.598451", + "modified": "2024-01-30 16:34:38.595383", "modified_by": "Administrator", "module": "Press", "name": "Performance Report", diff --git a/press/press/doctype/top_file_io_activity_report/top_file_io_activity_report.json b/press/press/doctype/top_file_io_activity_report/top_file_io_activity_report.json index 4de77ff911..0b4b02f534 100644 --- a/press/press/doctype/top_file_io_activity_report/top_file_io_activity_report.json +++ b/press/press/doctype/top_file_io_activity_report/top_file_io_activity_report.json @@ -31,6 +31,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "read_requests", "fieldtype": "Int", "in_list_view": 1, @@ -39,6 +40,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "write_requests", "fieldtype": "Int", "in_list_view": 1, @@ -47,6 +49,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "total_read_io", "fieldtype": "Float", "in_list_view": 1, @@ -55,6 +58,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "avg_read_io", "fieldtype": "Float", "in_list_view": 1, @@ -63,6 +67,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "total_write_io", "fieldtype": "Float", "in_list_view": 1, @@ -71,6 +76,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "avg_write_io", "fieldtype": "Float", "in_list_view": 1, @@ -79,6 +85,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "write_percentage", "fieldtype": "Float", "in_list_view": 1, @@ -87,6 +94,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "total_io", "fieldtype": "Float", "in_list_view": 1, @@ -124,7 +132,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-30 12:07:54.572633", + "modified": "2024-01-30 16:33:18.788585", "modified_by": "Administrator", "module": "Press", "name": "Top File IO Activity Report", diff --git a/press/press/doctype/top_io_by_event_category/__init__.py b/press/press/doctype/top_io_by_event_category/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/press/doctype/top_io_by_event_category/top_io_by_event_category.json b/press/press/doctype/top_io_by_event_category/top_io_by_event_category.json new file mode 100644 index 0000000000..85d4556d78 --- /dev/null +++ b/press/press/doctype/top_io_by_event_category/top_io_by_event_category.json @@ -0,0 +1,28 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-30 16:37:12.860618", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "section_break_hlgh" + ], + "fields": [ + { + "fieldname": "section_break_hlgh", + "fieldtype": "Section Break" + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-30 16:37:12.860618", + "modified_by": "Administrator", + "module": "Press", + "name": "Top IO by Event Category", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/press/doctype/top_io_by_event_category/top_io_by_event_category.py b/press/press/doctype/top_io_by_event_category/top_io_by_event_category.py new file mode 100644 index 0000000000..36cd03a607 --- /dev/null +++ b/press/press/doctype/top_io_by_event_category/top_io_by_event_category.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class TopIObyEventCategory(Document): + pass diff --git a/press/press/doctype/top_io_by_file_by_time/__init__.py b/press/press/doctype/top_io_by_file_by_time/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/press/doctype/top_io_by_file_by_time/top_io_by_file_by_time.json b/press/press/doctype/top_io_by_file_by_time/top_io_by_file_by_time.json new file mode 100644 index 0000000000..b5b974e55a --- /dev/null +++ b/press/press/doctype/top_io_by_file_by_time/top_io_by_file_by_time.json @@ -0,0 +1,154 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-30 15:29:04.944737", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "file", + "io_count_section", + "total_io", + "column_break_xxhq", + "read_requests", + "column_break_rzrc", + "write_requests", + "column_break_qckc", + "misc_requests", + "request_time_section", + "total_time", + "column_break_xkyd", + "read_time", + "column_break_bmbz", + "write_time", + "column_break_hfre", + "misc_time" + ], + "fields": [ + { + "fieldname": "file", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "File", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "total_io", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Total IO Count", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "read_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Read Time (us)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "write_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Write Time (us)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "misc_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Misc Time (us)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "read_requests", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Read Request Count", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "write_requests", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Write Request Count", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "misc_requests", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Misc Request Count", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "total_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Time (us)", + "read_only": 1 + }, + { + "fieldname": "io_count_section", + "fieldtype": "Section Break", + "label": "IO Count" + }, + { + "fieldname": "column_break_xxhq", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_rzrc", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_qckc", + "fieldtype": "Column Break" + }, + { + "fieldname": "request_time_section", + "fieldtype": "Section Break", + "label": "Request Time" + }, + { + "fieldname": "column_break_xkyd", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_bmbz", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_hfre", + "fieldtype": "Column Break" + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-30 16:35:16.871489", + "modified_by": "Administrator", + "module": "Press", + "name": "Top IO by File by Time", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/press/doctype/top_io_by_file_by_time/top_io_by_file_by_time.py b/press/press/doctype/top_io_by_file_by_time/top_io_by_file_by_time.py new file mode 100644 index 0000000000..496282d813 --- /dev/null +++ b/press/press/doctype/top_io_by_file_by_time/top_io_by_file_by_time.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class TopIObyFilebyTime(Document): + pass diff --git a/press/press/doctype/top_memory_by_event/top_memory_by_event.json b/press/press/doctype/top_memory_by_event/top_memory_by_event.json index 751bdaddab..2d437f8b6c 100644 --- a/press/press/doctype/top_memory_by_event/top_memory_by_event.json +++ b/press/press/doctype/top_memory_by_event/top_memory_by_event.json @@ -15,6 +15,7 @@ ], "fields": [ { + "columns": 4, "fieldname": "event_type", "fieldtype": "Data", "in_list_view": 1, @@ -23,6 +24,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "count", "fieldtype": "Int", "in_list_view": 1, @@ -31,6 +33,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "max_count", "fieldtype": "Int", "in_list_view": 1, @@ -39,6 +42,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "memory", "fieldtype": "Float", "in_list_view": 1, @@ -47,6 +51,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "avg_memory", "fieldtype": "Float", "in_list_view": 1, @@ -55,6 +60,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "max_memory", "fieldtype": "Float", "in_list_view": 1, @@ -63,6 +69,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "max_avg_memory", "fieldtype": "Float", "in_list_view": 1, @@ -74,7 +81,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-26 17:14:54.192143", + "modified": "2024-01-30 15:59:14.089808", "modified_by": "Administrator", "module": "Press", "name": "Top Memory By Event", diff --git a/press/press/doctype/top_memory_by_host/top_memory_by_host.json b/press/press/doctype/top_memory_by_host/top_memory_by_host.json index 67a3375d89..9955b95c01 100644 --- a/press/press/doctype/top_memory_by_host/top_memory_by_host.json +++ b/press/press/doctype/top_memory_by_host/top_memory_by_host.json @@ -22,6 +22,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "count", "fieldtype": "Int", "in_list_view": 1, @@ -30,6 +31,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "memory", "fieldtype": "Data", "in_list_view": 1, @@ -38,6 +40,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "avg_memory", "fieldtype": "Float", "in_list_view": 1, @@ -46,6 +49,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "total_memory", "fieldtype": "Float", "in_list_view": 1, @@ -54,6 +58,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "max_memory", "fieldtype": "Float", "in_list_view": 1, @@ -65,7 +70,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-26 17:13:32.367268", + "modified": "2024-01-30 16:32:08.453330", "modified_by": "Administrator", "module": "Press", "name": "Top Memory By Host", diff --git a/press/press/doctype/top_memory_by_thread/top_memory_by_thread.json b/press/press/doctype/top_memory_by_thread/top_memory_by_thread.json index 0dcfb62144..7abfb6ef76 100644 --- a/press/press/doctype/top_memory_by_thread/top_memory_by_thread.json +++ b/press/press/doctype/top_memory_by_thread/top_memory_by_thread.json @@ -15,6 +15,7 @@ ], "fields": [ { + "columns": 1, "fieldname": "thread_id", "fieldtype": "Int", "in_list_view": 1, @@ -31,6 +32,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "count", "fieldtype": "Int", "in_list_view": 1, @@ -39,6 +41,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "memory", "fieldtype": "Float", "in_list_view": 1, @@ -47,6 +50,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "avg_memory", "fieldtype": "Float", "in_list_view": 1, @@ -55,6 +59,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "max_memory", "fieldtype": "Float", "in_list_view": 1, @@ -63,6 +68,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "total_memory", "fieldtype": "Float", "in_list_view": 1, @@ -74,7 +80,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-26 17:15:33.716317", + "modified": "2024-01-30 16:32:31.434762", "modified_by": "Administrator", "module": "Press", "name": "Top Memory By Thread", diff --git a/press/press/doctype/top_memory_by_user/top_memory_by_user.json b/press/press/doctype/top_memory_by_user/top_memory_by_user.json index 363dbb7832..4b787c3d27 100644 --- a/press/press/doctype/top_memory_by_user/top_memory_by_user.json +++ b/press/press/doctype/top_memory_by_user/top_memory_by_user.json @@ -22,6 +22,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "count", "fieldtype": "Int", "in_list_view": 1, @@ -30,6 +31,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "memory", "fieldtype": "Float", "in_list_view": 1, @@ -38,6 +40,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "avg_memory", "fieldtype": "Float", "in_list_view": 1, @@ -46,6 +49,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "total_memory", "fieldtype": "Float", "in_list_view": 1, @@ -54,6 +58,7 @@ "read_only": 1 }, { + "columns": 1, "fieldname": "max_memory", "fieldtype": "Float", "in_list_view": 1, @@ -65,7 +70,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-30 11:55:41.213166", + "modified": "2024-01-30 16:30:09.455648", "modified_by": "Administrator", "module": "Press", "name": "Top Memory By User", From 4225ea1ed60c89dfc03d403661c4748ef7f1fe24 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Wed, 31 Jan 2024 16:28:16 +0530 Subject: [PATCH 07/31] feat: additional doctype for other perf schema has been added --- press/database_performance_schema/__init__.py | 0 .../doctype/__init__.py | 0 .../doctype/global_waits_by_time/__init__.py | 0 .../global_waits_by_time.json | 68 ++ .../global_waits_by_time.py | 9 + .../innodb_buffer_stats_by_schema/__init__.py | 0 .../innodb_buffer_stats_by_schema.json | 77 +++ .../innodb_buffer_stats_by_schema.py | 9 + .../innodb_buffer_stats_by_table/__init__.py | 0 .../innodb_buffer_stats_by_table.json | 87 +++ .../innodb_buffer_stats_by_table.py | 9 + .../doctype/performance_report/__init__.py | 0 .../performance_report/performance_report.js | 8 + .../performance_report.json | 590 ++++++++++++++++++ .../performance_report/performance_report.py | 9 + .../test_performance_report.py | 9 + .../schema_index_statistics/__init__.py | 0 .../schema_index_statistics.json | 172 +++++ .../schema_index_statistics.py | 9 + .../schema_table_statistics/__init__.py | 0 .../schema_table_statistics.json | 176 ++++++ .../schema_table_statistics.py | 9 + .../__init__.py | 0 ...a_table_statistics_with_innodb_buffer.json | 246 ++++++++ ...ema_table_statistics_with_innodb_buffer.py | 9 + .../doctype/statement_analysis/__init__.py | 0 .../statement_analysis.json | 167 +++++ .../statement_analysis/statement_analysis.py | 9 + .../__init__.py | 0 ...ments_in_highest_5_percent_by_runtime.json | 132 ++++ ...tements_in_highest_5_percent_by_runtime.py | 9 + .../statements_using_temp_tables/__init__.py | 0 .../statements_using_temp_tables.json | 77 +++ .../statements_using_temp_tables.py | 9 + .../__init__.py | 0 .../statements_with_error_or_warnings.json | 82 +++ .../statements_with_error_or_warnings.py | 9 + .../__init__.py | 0 .../statements_with_full_table_scans.json | 68 ++ .../statements_with_full_table_scans.py | 9 + .../statements_with_sorting/__init__.py | 0 .../statements_with_sorting.json | 95 +++ .../statements_with_sorting.py | 9 + .../tables_with_full_table_scans/__init__.py | 0 .../tables_with_full_table_scans.json | 59 ++ .../tables_with_full_table_scans.py | 9 + .../top_file_io_activity_report/__init__.py | 0 .../top_file_io_activity_report.json | 144 +++++ .../top_file_io_activity_report.py | 9 + .../top_io_by_event_category/__init__.py | 0 .../top_io_by_event_category.json | 207 ++++++ .../top_io_by_event_category.py | 9 + .../top_io_by_file_by_time/__init__.py | 0 .../top_io_by_file_by_time.json | 154 +++++ .../top_io_by_file_by_time.py | 9 + .../__init__.py | 0 .../top_io_in_time_by_event_category.json | 226 +++++++ .../top_io_in_time_by_event_category.py | 9 + .../top_io_time_by_user_thread/__init__.py | 0 .../top_io_time_by_user_thread.json | 137 ++++ .../top_io_time_by_user_thread.py | 9 + .../doctype/top_memory_by_event/__init__.py | 0 .../top_memory_by_event.json | 93 +++ .../top_memory_by_event.py | 9 + .../doctype/top_memory_by_host/__init__.py | 0 .../top_memory_by_host.json | 82 +++ .../top_memory_by_host/top_memory_by_host.py | 9 + .../doctype/top_memory_by_thread/__init__.py | 0 .../top_memory_by_thread.json | 92 +++ .../top_memory_by_thread.py | 9 + .../doctype/top_memory_by_user/__init__.py | 0 .../top_memory_by_user.json | 87 +++ .../top_memory_by_user/top_memory_by_user.py | 9 + .../doctype/unused_indexes/__init__.py | 0 .../unused_indexes/unused_indexes.json | 50 ++ .../doctype/unused_indexes/unused_indexes.py | 9 + .../__init__.py | 0 .../user_resource_use_io_statistics.json | 68 ++ .../user_resource_use_io_statistics.py | 9 + .../user_resource_use_overview/__init__.py | 0 .../user_resource_use_overview.json | 131 ++++ .../user_resource_use_overview.py | 9 + .../__init__.py | 0 ...ser_resource_use_statement_statistics.json | 122 ++++ .../user_resource_use_statement_statistics.py | 9 + .../wait_classes_by_average_time/__init__.py | 0 .../wait_classes_by_average_time.json | 78 +++ .../wait_classes_by_average_time.py | 9 + .../doctype/wait_classes_by_time/__init__.py | 0 .../wait_classes_by_time.json | 78 +++ .../wait_classes_by_time.py | 9 + .../doctype/waits_by_user_by_time/__init__.py | 0 .../waits_by_user_by_time.json | 78 +++ .../waits_by_user_by_time.py | 9 + press/modules.txt | 3 +- .../database_server/database_server.py | 1 + .../top_io_by_event_category.json | 185 +++++- .../__init__.py | 0 .../top_io_in_time_by_event_category.json | 226 +++++++ .../top_io_in_time_by_event_category.py | 9 + .../top_io_time_by_user_thread/__init__.py | 0 .../top_io_time_by_user_thread.json | 137 ++++ .../top_io_time_by_user_thread.py | 9 + 103 files changed, 4776 insertions(+), 4 deletions(-) create mode 100644 press/database_performance_schema/__init__.py create mode 100644 press/database_performance_schema/doctype/__init__.py create mode 100644 press/database_performance_schema/doctype/global_waits_by_time/__init__.py create mode 100644 press/database_performance_schema/doctype/global_waits_by_time/global_waits_by_time.json create mode 100644 press/database_performance_schema/doctype/global_waits_by_time/global_waits_by_time.py create mode 100644 press/database_performance_schema/doctype/innodb_buffer_stats_by_schema/__init__.py create mode 100644 press/database_performance_schema/doctype/innodb_buffer_stats_by_schema/innodb_buffer_stats_by_schema.json create mode 100644 press/database_performance_schema/doctype/innodb_buffer_stats_by_schema/innodb_buffer_stats_by_schema.py create mode 100644 press/database_performance_schema/doctype/innodb_buffer_stats_by_table/__init__.py create mode 100644 press/database_performance_schema/doctype/innodb_buffer_stats_by_table/innodb_buffer_stats_by_table.json create mode 100644 press/database_performance_schema/doctype/innodb_buffer_stats_by_table/innodb_buffer_stats_by_table.py create mode 100644 press/database_performance_schema/doctype/performance_report/__init__.py create mode 100644 press/database_performance_schema/doctype/performance_report/performance_report.js create mode 100644 press/database_performance_schema/doctype/performance_report/performance_report.json create mode 100644 press/database_performance_schema/doctype/performance_report/performance_report.py create mode 100644 press/database_performance_schema/doctype/performance_report/test_performance_report.py create mode 100644 press/database_performance_schema/doctype/schema_index_statistics/__init__.py create mode 100644 press/database_performance_schema/doctype/schema_index_statistics/schema_index_statistics.json create mode 100644 press/database_performance_schema/doctype/schema_index_statistics/schema_index_statistics.py create mode 100644 press/database_performance_schema/doctype/schema_table_statistics/__init__.py create mode 100644 press/database_performance_schema/doctype/schema_table_statistics/schema_table_statistics.json create mode 100644 press/database_performance_schema/doctype/schema_table_statistics/schema_table_statistics.py create mode 100644 press/database_performance_schema/doctype/schema_table_statistics_with_innodb_buffer/__init__.py create mode 100644 press/database_performance_schema/doctype/schema_table_statistics_with_innodb_buffer/schema_table_statistics_with_innodb_buffer.json create mode 100644 press/database_performance_schema/doctype/schema_table_statistics_with_innodb_buffer/schema_table_statistics_with_innodb_buffer.py create mode 100644 press/database_performance_schema/doctype/statement_analysis/__init__.py create mode 100644 press/database_performance_schema/doctype/statement_analysis/statement_analysis.json create mode 100644 press/database_performance_schema/doctype/statement_analysis/statement_analysis.py create mode 100644 press/database_performance_schema/doctype/statements_in_highest_5_percent_by_runtime/__init__.py create mode 100644 press/database_performance_schema/doctype/statements_in_highest_5_percent_by_runtime/statements_in_highest_5_percent_by_runtime.json create mode 100644 press/database_performance_schema/doctype/statements_in_highest_5_percent_by_runtime/statements_in_highest_5_percent_by_runtime.py create mode 100644 press/database_performance_schema/doctype/statements_using_temp_tables/__init__.py create mode 100644 press/database_performance_schema/doctype/statements_using_temp_tables/statements_using_temp_tables.json create mode 100644 press/database_performance_schema/doctype/statements_using_temp_tables/statements_using_temp_tables.py create mode 100644 press/database_performance_schema/doctype/statements_with_error_or_warnings/__init__.py create mode 100644 press/database_performance_schema/doctype/statements_with_error_or_warnings/statements_with_error_or_warnings.json create mode 100644 press/database_performance_schema/doctype/statements_with_error_or_warnings/statements_with_error_or_warnings.py create mode 100644 press/database_performance_schema/doctype/statements_with_full_table_scans/__init__.py create mode 100644 press/database_performance_schema/doctype/statements_with_full_table_scans/statements_with_full_table_scans.json create mode 100644 press/database_performance_schema/doctype/statements_with_full_table_scans/statements_with_full_table_scans.py create mode 100644 press/database_performance_schema/doctype/statements_with_sorting/__init__.py create mode 100644 press/database_performance_schema/doctype/statements_with_sorting/statements_with_sorting.json create mode 100644 press/database_performance_schema/doctype/statements_with_sorting/statements_with_sorting.py create mode 100644 press/database_performance_schema/doctype/tables_with_full_table_scans/__init__.py create mode 100644 press/database_performance_schema/doctype/tables_with_full_table_scans/tables_with_full_table_scans.json create mode 100644 press/database_performance_schema/doctype/tables_with_full_table_scans/tables_with_full_table_scans.py create mode 100644 press/database_performance_schema/doctype/top_file_io_activity_report/__init__.py create mode 100644 press/database_performance_schema/doctype/top_file_io_activity_report/top_file_io_activity_report.json create mode 100644 press/database_performance_schema/doctype/top_file_io_activity_report/top_file_io_activity_report.py create mode 100644 press/database_performance_schema/doctype/top_io_by_event_category/__init__.py create mode 100644 press/database_performance_schema/doctype/top_io_by_event_category/top_io_by_event_category.json create mode 100644 press/database_performance_schema/doctype/top_io_by_event_category/top_io_by_event_category.py create mode 100644 press/database_performance_schema/doctype/top_io_by_file_by_time/__init__.py create mode 100644 press/database_performance_schema/doctype/top_io_by_file_by_time/top_io_by_file_by_time.json create mode 100644 press/database_performance_schema/doctype/top_io_by_file_by_time/top_io_by_file_by_time.py create mode 100644 press/database_performance_schema/doctype/top_io_in_time_by_event_category/__init__.py create mode 100644 press/database_performance_schema/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.json create mode 100644 press/database_performance_schema/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.py create mode 100644 press/database_performance_schema/doctype/top_io_time_by_user_thread/__init__.py create mode 100644 press/database_performance_schema/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.json create mode 100644 press/database_performance_schema/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.py create mode 100644 press/database_performance_schema/doctype/top_memory_by_event/__init__.py create mode 100644 press/database_performance_schema/doctype/top_memory_by_event/top_memory_by_event.json create mode 100644 press/database_performance_schema/doctype/top_memory_by_event/top_memory_by_event.py create mode 100644 press/database_performance_schema/doctype/top_memory_by_host/__init__.py create mode 100644 press/database_performance_schema/doctype/top_memory_by_host/top_memory_by_host.json create mode 100644 press/database_performance_schema/doctype/top_memory_by_host/top_memory_by_host.py create mode 100644 press/database_performance_schema/doctype/top_memory_by_thread/__init__.py create mode 100644 press/database_performance_schema/doctype/top_memory_by_thread/top_memory_by_thread.json create mode 100644 press/database_performance_schema/doctype/top_memory_by_thread/top_memory_by_thread.py create mode 100644 press/database_performance_schema/doctype/top_memory_by_user/__init__.py create mode 100644 press/database_performance_schema/doctype/top_memory_by_user/top_memory_by_user.json create mode 100644 press/database_performance_schema/doctype/top_memory_by_user/top_memory_by_user.py create mode 100644 press/database_performance_schema/doctype/unused_indexes/__init__.py create mode 100644 press/database_performance_schema/doctype/unused_indexes/unused_indexes.json create mode 100644 press/database_performance_schema/doctype/unused_indexes/unused_indexes.py create mode 100644 press/database_performance_schema/doctype/user_resource_use_io_statistics/__init__.py create mode 100644 press/database_performance_schema/doctype/user_resource_use_io_statistics/user_resource_use_io_statistics.json create mode 100644 press/database_performance_schema/doctype/user_resource_use_io_statistics/user_resource_use_io_statistics.py create mode 100644 press/database_performance_schema/doctype/user_resource_use_overview/__init__.py create mode 100644 press/database_performance_schema/doctype/user_resource_use_overview/user_resource_use_overview.json create mode 100644 press/database_performance_schema/doctype/user_resource_use_overview/user_resource_use_overview.py create mode 100644 press/database_performance_schema/doctype/user_resource_use_statement_statistics/__init__.py create mode 100644 press/database_performance_schema/doctype/user_resource_use_statement_statistics/user_resource_use_statement_statistics.json create mode 100644 press/database_performance_schema/doctype/user_resource_use_statement_statistics/user_resource_use_statement_statistics.py create mode 100644 press/database_performance_schema/doctype/wait_classes_by_average_time/__init__.py create mode 100644 press/database_performance_schema/doctype/wait_classes_by_average_time/wait_classes_by_average_time.json create mode 100644 press/database_performance_schema/doctype/wait_classes_by_average_time/wait_classes_by_average_time.py create mode 100644 press/database_performance_schema/doctype/wait_classes_by_time/__init__.py create mode 100644 press/database_performance_schema/doctype/wait_classes_by_time/wait_classes_by_time.json create mode 100644 press/database_performance_schema/doctype/wait_classes_by_time/wait_classes_by_time.py create mode 100644 press/database_performance_schema/doctype/waits_by_user_by_time/__init__.py create mode 100644 press/database_performance_schema/doctype/waits_by_user_by_time/waits_by_user_by_time.json create mode 100644 press/database_performance_schema/doctype/waits_by_user_by_time/waits_by_user_by_time.py create mode 100644 press/press/doctype/top_io_in_time_by_event_category/__init__.py create mode 100644 press/press/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.json create mode 100644 press/press/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.py create mode 100644 press/press/doctype/top_io_time_by_user_thread/__init__.py create mode 100644 press/press/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.json create mode 100644 press/press/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.py diff --git a/press/database_performance_schema/__init__.py b/press/database_performance_schema/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/__init__.py b/press/database_performance_schema/doctype/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/global_waits_by_time/__init__.py b/press/database_performance_schema/doctype/global_waits_by_time/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/global_waits_by_time/global_waits_by_time.json b/press/database_performance_schema/doctype/global_waits_by_time/global_waits_by_time.json new file mode 100644 index 0000000000..168a00182a --- /dev/null +++ b/press/database_performance_schema/doctype/global_waits_by_time/global_waits_by_time.json @@ -0,0 +1,68 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 13:46:00.595175", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "event_class", + "total_occurances", + "total_time", + "avg_time", + "max_time" + ], + "fields": [ + { + "fieldname": "event_class", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Event Class", + "read_only": 1 + }, + { + "fieldname": "total_occurances", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Occurances", + "read_only": 1 + }, + { + "fieldname": "total_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Time (us)", + "read_only": 1 + }, + { + "fieldname": "avg_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Time (us)", + "read_only": 1 + }, + { + "fieldname": "max_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Time (us)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 13:52:43.120022", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Global Waits By Time", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/global_waits_by_time/global_waits_by_time.py b/press/database_performance_schema/doctype/global_waits_by_time/global_waits_by_time.py new file mode 100644 index 0000000000..a1f4a037f8 --- /dev/null +++ b/press/database_performance_schema/doctype/global_waits_by_time/global_waits_by_time.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class GlobalWaitsByTime(Document): + pass diff --git a/press/database_performance_schema/doctype/innodb_buffer_stats_by_schema/__init__.py b/press/database_performance_schema/doctype/innodb_buffer_stats_by_schema/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/innodb_buffer_stats_by_schema/innodb_buffer_stats_by_schema.json b/press/database_performance_schema/doctype/innodb_buffer_stats_by_schema/innodb_buffer_stats_by_schema.json new file mode 100644 index 0000000000..6d278fa238 --- /dev/null +++ b/press/database_performance_schema/doctype/innodb_buffer_stats_by_schema/innodb_buffer_stats_by_schema.json @@ -0,0 +1,77 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 13:53:09.961052", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "schema", + "allocated", + "data", + "pages_hashed", + "pages_old", + "rows_cached" + ], + "fields": [ + { + "fieldname": "schema", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Schema", + "read_only": 1 + }, + { + "fieldname": "allocated", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Allocated", + "read_only": 1 + }, + { + "fieldname": "data", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Data", + "read_only": 1 + }, + { + "fieldname": "pages_hashed", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Pages Hashed", + "read_only": 1 + }, + { + "fieldname": "pages_old", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Pages Old", + "read_only": 1 + }, + { + "fieldname": "rows_cached", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Rows Cached", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 13:55:37.644301", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "InnoDB Buffer Stats by Schema", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/innodb_buffer_stats_by_schema/innodb_buffer_stats_by_schema.py b/press/database_performance_schema/doctype/innodb_buffer_stats_by_schema/innodb_buffer_stats_by_schema.py new file mode 100644 index 0000000000..2a45597a52 --- /dev/null +++ b/press/database_performance_schema/doctype/innodb_buffer_stats_by_schema/innodb_buffer_stats_by_schema.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class InnoDBBufferStatsbySchema(Document): + pass diff --git a/press/database_performance_schema/doctype/innodb_buffer_stats_by_table/__init__.py b/press/database_performance_schema/doctype/innodb_buffer_stats_by_table/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/innodb_buffer_stats_by_table/innodb_buffer_stats_by_table.json b/press/database_performance_schema/doctype/innodb_buffer_stats_by_table/innodb_buffer_stats_by_table.json new file mode 100644 index 0000000000..fc6eee508e --- /dev/null +++ b/press/database_performance_schema/doctype/innodb_buffer_stats_by_table/innodb_buffer_stats_by_table.json @@ -0,0 +1,87 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 13:56:05.969102", + "default_view": "List", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "schema", + "table", + "allocated", + "data", + "pages_hashed", + "pages_old", + "rows_cached" + ], + "fields": [ + { + "fieldname": "schema", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Schema", + "read_only": 1 + }, + { + "fieldname": "allocated", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Allocated", + "read_only": 1 + }, + { + "fieldname": "data", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Data", + "read_only": 1 + }, + { + "fieldname": "pages_hashed", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Pages Hashed", + "read_only": 1 + }, + { + "fieldname": "pages_old", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Pages Old", + "read_only": 1 + }, + { + "fieldname": "rows_cached", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Rows Cached", + "read_only": 1 + }, + { + "fieldname": "table", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Table", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 13:56:16.546295", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "InnoDB Buffer Stats by Table", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/innodb_buffer_stats_by_table/innodb_buffer_stats_by_table.py b/press/database_performance_schema/doctype/innodb_buffer_stats_by_table/innodb_buffer_stats_by_table.py new file mode 100644 index 0000000000..8fc7094092 --- /dev/null +++ b/press/database_performance_schema/doctype/innodb_buffer_stats_by_table/innodb_buffer_stats_by_table.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class InnoDBBufferStatsbyTable(Document): + pass diff --git a/press/database_performance_schema/doctype/performance_report/__init__.py b/press/database_performance_schema/doctype/performance_report/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/performance_report/performance_report.js b/press/database_performance_schema/doctype/performance_report/performance_report.js new file mode 100644 index 0000000000..24f702f49c --- /dev/null +++ b/press/database_performance_schema/doctype/performance_report/performance_report.js @@ -0,0 +1,8 @@ +// Copyright (c) 2024, Frappe and contributors +// For license information, please see license.txt + +// frappe.ui.form.on("Performance Report", { +// refresh(frm) { + +// }, +// }); diff --git a/press/database_performance_schema/doctype/performance_report/performance_report.json b/press/database_performance_schema/doctype/performance_report/performance_report.json new file mode 100644 index 0000000000..91affe8c3d --- /dev/null +++ b/press/database_performance_schema/doctype/performance_report/performance_report.json @@ -0,0 +1,590 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-26 16:06:33.989913", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "general_tab", + "server", + "recorded_on", + "memory_usage_tab", + "total_allocated_memory", + "top_memory_by_user_section", + "top_memory_by_user", + "top_memory_by_host_section", + "top_memory_by_host", + "top_memory_by_thread_section", + "top_memory_by_thread", + "top_memory_by_event_section", + "top_memory_by_event", + "hot_spots_for_io_tab", + "top_file_io_activity_report_section", + "top_io_by_file_activity_report", + "top_io_by_file_by_time_section", + "top_io_by_file_by_time", + "top_io_by_event_category_section", + "top_io_by_event_category", + "top_io_in_time_by_event_category_section", + "top_io_in_time_by_event_category", + "top_io_time_by_userthread_section", + "top_io_by_user_or_thread", + "high_cost_sql_statements_tab", + "statement_analysis_section", + "statement_analysis", + "statements_in_highest_5_percent_by_runtime_section", + "statements_in_highest_5_percentile", + "statements_using_temp_tables_section", + "statements_using_temp_tables", + "statements_with_sorting_section", + "statements_with_sorting", + "statements_with_full_table_scans_section", + "statements_with_full_table_scans", + "statements_with_errors_or_warnings_section", + "statements_with_errors_or_warnings", + "database_schema_statistics_tab", + "schema_index_statistics_section", + "schema_index_statistics", + "schema_table_statistics_section", + "schema_table_statistics", + "schema_table_statistics_with_innodb_buffer_section", + "schema_table_statistics_with_buffer", + "tables_with_full_table_scans_section", + "schema_tables_with_full_table_scans", + "unused_indexes_section", + "schema_unused_indexes", + "wait_event_times_tab", + "global_waits_by_time_section", + "global_waits_by_time", + "waits_by_user_by_time_section", + "waits_by_user_by_time", + "wait_classes_by_time_section", + "wait_classes_by_time", + "waits_classes_by_average_time_section", + "waits_classes_by_avg_time", + "innodb_statistics_tab", + "innodb_buffer_stats_by_schema_section", + "innodb_buffer_stats_by_schema", + "innodb_buffer_stats_by_table_section", + "innodb_buffer_stats_by_table", + "user_resource_use_tab", + "overview_section", + "user_resource_use_overview", + "io_statistics_section", + "user_resource_use_io_statistics", + "statement_statistics_section", + "user_resource_use_statement_statistics" + ], + "fields": [ + { + "fieldname": "general_tab", + "fieldtype": "Tab Break", + "label": "General" + }, + { + "fieldname": "server", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Database Server", + "options": "Database Server", + "read_only": 1, + "reqd": 1 + }, + { + "fieldname": "recorded_on", + "fieldtype": "Datetime", + "in_list_view": 1, + "label": "Recorded On", + "read_only": 1, + "reqd": 1 + }, + { + "fieldname": "memory_usage_tab", + "fieldtype": "Tab Break", + "label": "Memory Usage" + }, + { + "description": "Shows total memory allocated", + "fieldname": "total_allocated_memory", + "fieldtype": "Float", + "label": "Total Allocated Memory (MB)", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "Shows users consuming the most memory", + "fieldname": "top_memory_by_user_section", + "fieldtype": "Section Break", + "label": "Top Memory By User" + }, + { + "fieldname": "top_memory_by_user", + "fieldtype": "Table", + "options": "Top Memory By User", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "Shows hosts consuming the most memory", + "fieldname": "top_memory_by_host_section", + "fieldtype": "Section Break", + "label": "Top Memory By Host" + }, + { + "fieldname": "top_memory_by_host", + "fieldtype": "Table", + "options": "Top Memory By Host", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "Shows threads consuming the most memory", + "fieldname": "top_memory_by_thread_section", + "fieldtype": "Section Break", + "label": "Top Memory By Thread" + }, + { + "fieldname": "top_memory_by_thread", + "fieldtype": "Table", + "options": "Top Memory By Thread", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "Shows events consuming the most memory", + "fieldname": "top_memory_by_event_section", + "fieldtype": "Section Break", + "label": "Top Memory By Event" + }, + { + "fieldname": "top_memory_by_event", + "fieldtype": "Table", + "options": "Top Memory By Event", + "read_only": 1 + }, + { + "fieldname": "hot_spots_for_io_tab", + "fieldtype": "Tab Break", + "label": "Hot Spots for I/O" + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "Show the Files doing the most IOs", + "fieldname": "top_file_io_activity_report_section", + "fieldtype": "Section Break", + "label": "Top File I/O Activity Report" + }, + { + "fieldname": "top_io_by_file_activity_report", + "fieldtype": "Table", + "options": "Top File IO Activity Report", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "Show highest IO usage by file and latency", + "fieldname": "top_io_by_file_by_time_section", + "fieldtype": "Section Break", + "label": "Top I/O by File by Time" + }, + { + "fieldname": "top_io_by_file_by_time", + "fieldtype": "Table", + "options": "Top IO by File by Time", + "read_only": 1 + }, + { + "fieldname": "high_cost_sql_statements_tab", + "fieldtype": "Tab Break", + "label": "High Cost SQL Statements" + }, + { + "fieldname": "database_schema_statistics_tab", + "fieldtype": "Tab Break", + "label": "Database Schema Statistics" + }, + { + "fieldname": "wait_event_times_tab", + "fieldtype": "Tab Break", + "label": "Wait Event Times" + }, + { + "fieldname": "innodb_statistics_tab", + "fieldtype": "Tab Break", + "label": "InnoDB Statistics" + }, + { + "fieldname": "user_resource_use_tab", + "fieldtype": "Tab Break", + "label": "User Resource Use" + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "Show the highest IO Data usage by event categories", + "fieldname": "top_io_by_event_category_section", + "fieldtype": "Section Break", + "label": "Top I/O by Event Category" + }, + { + "fieldname": "top_io_by_event_category", + "fieldtype": "Table", + "options": "Top IO by Event Category", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "Show the highest IO time consumers by event categories", + "fieldname": "top_io_in_time_by_event_category_section", + "fieldtype": "Section Break", + "label": "Top I/O in Time by Event Category" + }, + { + "fieldname": "top_io_in_time_by_event_category", + "fieldtype": "Table", + "options": "Top IO in Time by Event Category", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "Shows the highest IO time consumers by event categories", + "fieldname": "top_io_time_by_userthread_section", + "fieldtype": "Section Break", + "label": "Top I/O Time by User/Thread" + }, + { + "fieldname": "top_io_by_user_or_thread", + "fieldtype": "Table", + "options": "Top IO Time by User Thread", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "List statements with various aggregated statistics", + "fieldname": "statement_analysis_section", + "fieldtype": "Section Break", + "label": "Statement Analysis" + }, + { + "fieldname": "statement_analysis", + "fieldtype": "Table", + "options": "Statement Analysis", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "List all statements whose average runtime, in microseconds is in highest 5 percent", + "fieldname": "statements_in_highest_5_percent_by_runtime_section", + "fieldtype": "Section Break", + "label": "Statements in Highest 5 Percent by Runtime" + }, + { + "fieldname": "statements_in_highest_5_percentile", + "fieldtype": "Table", + "options": "Statements in Highest 5 Percent by Runtime", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "Lists all statements that use temporary tables - access the highest # of disk temporary tables, then memory temp tables", + "fieldname": "statements_using_temp_tables_section", + "fieldtype": "Section Break", + "label": "Statements Using Temp Tables" + }, + { + "fieldname": "statements_using_temp_tables", + "fieldtype": "Table", + "options": "Statements Using Temp Tables", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "List all normalized statements that have done sorts", + "fieldname": "statements_with_sorting_section", + "fieldtype": "Section Break", + "label": "Statements With Sorting" + }, + { + "fieldname": "statements_with_sorting", + "fieldtype": "Table", + "options": "Statements With Sorting", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "Lists statements that have performed a full table scan", + "fieldname": "statements_with_full_table_scans_section", + "fieldtype": "Section Break", + "label": "Statements With Full Table Scans" + }, + { + "fieldname": "statements_with_full_table_scans", + "fieldtype": "Table", + "options": "Statements With Full Table Scans", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "List statements that have raised errors or warnings", + "fieldname": "statements_with_errors_or_warnings_section", + "fieldtype": "Section Break", + "label": "Statements With Errors or Warnings" + }, + { + "fieldname": "statements_with_errors_or_warnings", + "fieldtype": "Table", + "options": "Statements With Error or Warnings", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "fieldname": "schema_index_statistics_section", + "fieldtype": "Section Break", + "label": "Schema Index Statistics" + }, + { + "fieldname": "schema_index_statistics", + "fieldtype": "Table", + "options": "Schema Index Statistics", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "fieldname": "schema_table_statistics_section", + "fieldtype": "Section Break", + "label": "Schema Table Statistics" + }, + { + "fieldname": "schema_table_statistics", + "fieldtype": "Table", + "options": "Schema Table Statistics", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "fieldname": "schema_table_statistics_with_innodb_buffer_section", + "fieldtype": "Section Break", + "label": "Schema Table Statistics (with InnoDB Buffer)" + }, + { + "fieldname": "schema_table_statistics_with_buffer", + "fieldtype": "Table", + "options": "Schema Table Statistics With InnoDB Buffer", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "Find tables that are beign accesses by full table scans", + "fieldname": "tables_with_full_table_scans_section", + "fieldtype": "Section Break", + "label": "Tables with Full Table Scans" + }, + { + "fieldname": "schema_tables_with_full_table_scans", + "fieldtype": "Table", + "options": "Tables with Full Table Scans", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "fieldname": "unused_indexes_section", + "fieldtype": "Section Break", + "label": "Unused Indexes" + }, + { + "fieldname": "schema_unused_indexes", + "fieldtype": "Table", + "options": "Unused Indexes", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "Lists the top wait events by theit total time, ignoring idle", + "fieldname": "global_waits_by_time_section", + "fieldtype": "Section Break", + "label": "Global Waits by Time" + }, + { + "fieldname": "global_waits_by_time", + "fieldtype": "Table", + "options": "Global Waits By Time", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "Lists the top wait events by theit total time, ignoring idle", + "fieldname": "waits_by_user_by_time_section", + "fieldtype": "Section Break", + "label": "Waits by User by Time" + }, + { + "fieldname": "waits_by_user_by_time", + "fieldtype": "Table", + "options": "Waits by User by Time" + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "Lists the top wait classes by total time, ignoring idle", + "fieldname": "wait_classes_by_time_section", + "fieldtype": "Section Break", + "label": "Wait Classes by Time" + }, + { + "fieldname": "wait_classes_by_time", + "fieldtype": "Table", + "options": "Wait Classes by Time", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "Lists the top wait classes by average time, ignoring idle", + "fieldname": "waits_classes_by_average_time_section", + "fieldtype": "Section Break", + "label": "Waits Classes by Average Time" + }, + { + "fieldname": "waits_classes_by_avg_time", + "fieldtype": "Table", + "options": "Wait Classes by Average Time", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "Summarizes the output of the INFORMATION_SCHEMA.INNODB_BUFFER_PAGE table, aggregating by schema", + "fieldname": "innodb_buffer_stats_by_schema_section", + "fieldtype": "Section Break", + "label": "InnoDB Buffer Stats by Schema" + }, + { + "fieldname": "innodb_buffer_stats_by_schema", + "fieldtype": "Table", + "options": "InnoDB Buffer Stats by Schema", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "Summarizes the output of the INFORMATION_SCHEMA.INNODB_BUFFER_PAGE table, aggregating by schema and table name", + "fieldname": "innodb_buffer_stats_by_table_section", + "fieldtype": "Section Break", + "label": "InnoDB Buffer Stats by Table" + }, + { + "fieldname": "innodb_buffer_stats_by_table", + "fieldtype": "Table", + "options": "InnoDB Buffer Stats by Table", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "Shows resource use summary for each user", + "fieldname": "overview_section", + "fieldtype": "Section Break", + "label": "Overview" + }, + { + "fieldname": "user_resource_use_overview", + "fieldtype": "Table", + "options": "User Resource Use Overview", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "Shoes I/O usage for each user", + "fieldname": "io_statistics_section", + "fieldtype": "Section Break", + "label": "I/O Statistics" + }, + { + "fieldname": "user_resource_use_io_statistics", + "fieldtype": "Table", + "options": "User Resource Use IO Statistics", + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "true", + "description": "Shows statement execution statistics for each user", + "fieldname": "statement_statistics_section", + "fieldtype": "Section Break", + "label": "Statement Statistics" + }, + { + "fieldname": "user_resource_use_statement_statistics", + "fieldtype": "Table", + "options": "User Resource Use Statement Statistics", + "read_only": 1 + } + ], + "in_create": 1, + "index_web_pages_for_search": 1, + "links": [], + "modified": "2024-01-31 16:27:23.359378", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Performance Report", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + }, + { + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Press Admin", + "share": 1, + "write": 1 + }, + { + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Press Member", + "share": 1, + "write": 1 + } + ], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/performance_report/performance_report.py b/press/database_performance_schema/doctype/performance_report/performance_report.py new file mode 100644 index 0000000000..e7e9401f24 --- /dev/null +++ b/press/database_performance_schema/doctype/performance_report/performance_report.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class PerformanceReport(Document): + pass diff --git a/press/database_performance_schema/doctype/performance_report/test_performance_report.py b/press/database_performance_schema/doctype/performance_report/test_performance_report.py new file mode 100644 index 0000000000..81d7faf375 --- /dev/null +++ b/press/database_performance_schema/doctype/performance_report/test_performance_report.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and Contributors +# See license.txt + +# import frappe +from frappe.tests.utils import FrappeTestCase + + +class TestPerformanceReport(FrappeTestCase): + pass diff --git a/press/database_performance_schema/doctype/schema_index_statistics/__init__.py b/press/database_performance_schema/doctype/schema_index_statistics/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/schema_index_statistics/schema_index_statistics.json b/press/database_performance_schema/doctype/schema_index_statistics/schema_index_statistics.json new file mode 100644 index 0000000000..26f15acbce --- /dev/null +++ b/press/database_performance_schema/doctype/schema_index_statistics/schema_index_statistics.json @@ -0,0 +1,172 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 12:50:52.831632", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "schema", + "column_break_shqw", + "table", + "column_break_wtim", + "index", + "section_break_aafz", + "rows_selected", + "column_break_aeku", + "select_time", + "section_break_kcdh", + "rows_inserted", + "column_break_scfk", + "insert_time", + "section_break_tqle", + "rows_updated", + "column_break_mzmi", + "update_time", + "section_break_rdqn", + "rows_deleted", + "column_break_sajh", + "delete_time" + ], + "fields": [ + { + "fieldname": "schema", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Schema", + "read_only": 1 + }, + { + "fieldname": "column_break_shqw", + "fieldtype": "Column Break" + }, + { + "fieldname": "table", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Table", + "read_only": 1 + }, + { + "fieldname": "column_break_wtim", + "fieldtype": "Column Break" + }, + { + "fieldname": "index", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Index", + "read_only": 1 + }, + { + "fieldname": "section_break_aafz", + "fieldtype": "Section Break" + }, + { + "fieldname": "rows_selected", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Rows Selected", + "read_only": 1 + }, + { + "fieldname": "column_break_aeku", + "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_kcdh", + "fieldtype": "Section Break" + }, + { + "fieldname": "rows_inserted", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Rows Inserted", + "read_only": 1 + }, + { + "fieldname": "column_break_scfk", + "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_tqle", + "fieldtype": "Section Break" + }, + { + "fieldname": "rows_updated", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Rows Updated", + "read_only": 1 + }, + { + "fieldname": "column_break_mzmi", + "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_rdqn", + "fieldtype": "Section Break" + }, + { + "fieldname": "rows_deleted", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Rows Deleted", + "read_only": 1 + }, + { + "fieldname": "column_break_sajh", + "fieldtype": "Column Break" + }, + { + "fieldname": "select_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Select Time (us)", + "read_only": 1 + }, + { + "fieldname": "insert_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Insert Time (us)", + "read_only": 1 + }, + { + "fieldname": "update_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Update Time (us)", + "read_only": 1 + }, + { + "fieldname": "delete_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Delete Time (us)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 12:59:18.493459", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Schema Index Statistics", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/schema_index_statistics/schema_index_statistics.py b/press/database_performance_schema/doctype/schema_index_statistics/schema_index_statistics.py new file mode 100644 index 0000000000..765db4732a --- /dev/null +++ b/press/database_performance_schema/doctype/schema_index_statistics/schema_index_statistics.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class SchemaIndexStatistics(Document): + pass diff --git a/press/database_performance_schema/doctype/schema_table_statistics/__init__.py b/press/database_performance_schema/doctype/schema_table_statistics/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/schema_table_statistics/schema_table_statistics.json b/press/database_performance_schema/doctype/schema_table_statistics/schema_table_statistics.json new file mode 100644 index 0000000000..24815bcc75 --- /dev/null +++ b/press/database_performance_schema/doctype/schema_table_statistics/schema_table_statistics.json @@ -0,0 +1,176 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 13:20:15.801990", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "schema", + "table", + "rows_fetched", + "fetch_time", + "rows_inserted", + "insert_time", + "rows_updated", + "update_time", + "rows_deleted", + "delete_time", + "io_read_requests", + "io_read", + "io_read_time", + "io_write_requests", + "io_write", + "io_write_time", + "io_misc_requests", + "io_misc_time" + ], + "fields": [ + { + "fieldname": "schema", + "fieldtype": "Data", + "label": "Schema" + }, + { + "fieldname": "table", + "fieldtype": "Data", + "label": "Table" + }, + { + "fieldname": "rows_fetched", + "fieldtype": "Int", + "label": "Rows Fetched" + }, + { + "fieldname": "rows_inserted", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Rows Inserted", + "read_only": 1 + }, + { + "fieldname": "rows_updated", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Rows Updated", + "read_only": 1 + }, + { + "fieldname": "rows_deleted", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Rows Deleted", + "read_only": 1 + }, + { + "fieldname": "io_read_requests", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "IO Read Requests", + "read_only": 1 + }, + { + "fieldname": "io_write_requests", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "IO Write Requests", + "read_only": 1 + }, + { + "fieldname": "io_misc_requests", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "IO Misc Requests", + "read_only": 1 + }, + { + "fieldname": "fetch_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Fetch Time (us)", + "read_only": 1 + }, + { + "fieldname": "insert_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Insert Time (us)", + "read_only": 1 + }, + { + "fieldname": "update_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Update Time (us)", + "read_only": 1 + }, + { + "fieldname": "delete_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Delete Time (us)", + "read_only": 1 + }, + { + "fieldname": "io_read", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "IO Read (MB)", + "read_only": 1 + }, + { + "fieldname": "io_read_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "IO Read Time (us)", + "read_only": 1 + }, + { + "fieldname": "io_write", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "IO Write (MB)", + "read_only": 1 + }, + { + "fieldname": "io_write_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "IO Write Time (us)", + "read_only": 1 + }, + { + "fieldname": "io_misc_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "IO Misc Time (us)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 13:35:27.096901", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Schema Table Statistics", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/schema_table_statistics/schema_table_statistics.py b/press/database_performance_schema/doctype/schema_table_statistics/schema_table_statistics.py new file mode 100644 index 0000000000..49be290721 --- /dev/null +++ b/press/database_performance_schema/doctype/schema_table_statistics/schema_table_statistics.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class SchemaTableStatistics(Document): + pass diff --git a/press/database_performance_schema/doctype/schema_table_statistics_with_innodb_buffer/__init__.py b/press/database_performance_schema/doctype/schema_table_statistics_with_innodb_buffer/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/schema_table_statistics_with_innodb_buffer/schema_table_statistics_with_innodb_buffer.json b/press/database_performance_schema/doctype/schema_table_statistics_with_innodb_buffer/schema_table_statistics_with_innodb_buffer.json new file mode 100644 index 0000000000..0e8d095137 --- /dev/null +++ b/press/database_performance_schema/doctype/schema_table_statistics_with_innodb_buffer/schema_table_statistics_with_innodb_buffer.json @@ -0,0 +1,246 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 13:39:11.467178", + "default_view": "List", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "schema", + "table", + "rows_fetched", + "fetch_time", + "rows_inserted", + "insert_time", + "rows_updated", + "update_time", + "rows_deleted", + "delete_time", + "io_read_requests", + "io_read", + "io_read_time", + "io_write_requests", + "io_write", + "io_write_time", + "io_misc_requests", + "io_misc_time", + "innodb_buffer_section", + "buffer_allocated", + "buffer_data", + "buffer_free", + "buffer_pages", + "buffer_pages_hashed", + "buffer_pages_old", + "buffer_pages_cached" + ], + "fields": [ + { + "fieldname": "schema", + "fieldtype": "Data", + "label": "Schema" + }, + { + "fieldname": "table", + "fieldtype": "Data", + "label": "Table" + }, + { + "fieldname": "rows_fetched", + "fieldtype": "Int", + "label": "Rows Fetched" + }, + { + "fieldname": "fetch_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Fetch Time (us)", + "read_only": 1 + }, + { + "fieldname": "rows_inserted", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Rows Inserted", + "read_only": 1 + }, + { + "fieldname": "insert_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Insert Time (us)", + "read_only": 1 + }, + { + "fieldname": "rows_updated", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Rows Updated", + "read_only": 1 + }, + { + "fieldname": "update_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Update Time (us)", + "read_only": 1 + }, + { + "fieldname": "rows_deleted", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Rows Deleted", + "read_only": 1 + }, + { + "fieldname": "delete_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Delete Time (us)", + "read_only": 1 + }, + { + "fieldname": "io_read_requests", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "IO Read Requests", + "read_only": 1 + }, + { + "fieldname": "io_read", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "IO Read (MB)", + "read_only": 1 + }, + { + "fieldname": "io_read_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "IO Read Time (us)", + "read_only": 1 + }, + { + "fieldname": "io_write_requests", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "IO Write Requests", + "read_only": 1 + }, + { + "fieldname": "io_write", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "IO Write (MB)", + "read_only": 1 + }, + { + "fieldname": "io_write_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "IO Write Time (us)", + "read_only": 1 + }, + { + "fieldname": "io_misc_requests", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "IO Misc Requests", + "read_only": 1 + }, + { + "fieldname": "io_misc_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "IO Misc Time (us)", + "read_only": 1 + }, + { + "fieldname": "innodb_buffer_section", + "fieldtype": "Section Break", + "label": "InnoDB Buffer" + }, + { + "fieldname": "buffer_pages", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Buffer Pages", + "read_only": 1 + }, + { + "fieldname": "buffer_pages_hashed", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Buffer Pages Hashed", + "read_only": 1 + }, + { + "fieldname": "buffer_pages_old", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Buffer Pages Old", + "read_only": 1 + }, + { + "fieldname": "buffer_pages_cached", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Buffer Pages Cached", + "read_only": 1 + }, + { + "fieldname": "buffer_allocated", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Buffer Allocated (MB)", + "read_only": 1 + }, + { + "fieldname": "buffer_data", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Buffer Data (MB)", + "read_only": 1 + }, + { + "fieldname": "buffer_free", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Buffer Free (MB)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 13:43:56.803785", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Schema Table Statistics With InnoDB Buffer", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/schema_table_statistics_with_innodb_buffer/schema_table_statistics_with_innodb_buffer.py b/press/database_performance_schema/doctype/schema_table_statistics_with_innodb_buffer/schema_table_statistics_with_innodb_buffer.py new file mode 100644 index 0000000000..04ff265cff --- /dev/null +++ b/press/database_performance_schema/doctype/schema_table_statistics_with_innodb_buffer/schema_table_statistics_with_innodb_buffer.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class SchemaTableStatisticsWithInnoDBBuffer(Document): + pass diff --git a/press/database_performance_schema/doctype/statement_analysis/__init__.py b/press/database_performance_schema/doctype/statement_analysis/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/statement_analysis/statement_analysis.json b/press/database_performance_schema/doctype/statement_analysis/statement_analysis.json new file mode 100644 index 0000000000..7f7ed6f014 --- /dev/null +++ b/press/database_performance_schema/doctype/statement_analysis/statement_analysis.json @@ -0,0 +1,167 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 15:26:15.217356", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "query", + "full_table", + "executed_count", + "errors_count", + "warnings_count", + "total_time", + "max_time", + "avg_time", + "rows_sent", + "avg_rows", + "rows_scanned", + "avg_rows_scanned", + "tmp_tables", + "tmp_disk_tables", + "rows_sorted", + "sort_merge_passes" + ], + "fields": [ + { + "fieldname": "query", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Query", + "read_only": 1 + }, + { + "fieldname": "full_table", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Full Table", + "read_only": 1 + }, + { + "fieldname": "executed_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Executed Count", + "read_only": 1 + }, + { + "fieldname": "errors_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Errors Count", + "read_only": 1 + }, + { + "fieldname": "warnings_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Warnings Count", + "read_only": 1 + }, + { + "fieldname": "rows_sent", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Rows Sent", + "read_only": 1 + }, + { + "fieldname": "avg_rows", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Rows", + "read_only": 1 + }, + { + "fieldname": "tmp_tables", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Tmp Tables", + "read_only": 1 + }, + { + "fieldname": "tmp_disk_tables", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Tmp Disk Tables", + "read_only": 1 + }, + { + "fieldname": "rows_sorted", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Rows Sorted", + "read_only": 1 + }, + { + "fieldname": "sort_merge_passes", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Sort Merge Passes", + "read_only": 1 + }, + { + "fieldname": "total_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Time (us)", + "read_only": 1 + }, + { + "fieldname": "max_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Time (us)", + "read_only": 1 + }, + { + "fieldname": "avg_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Time (us)", + "read_only": 1 + }, + { + "fieldname": "rows_scanned", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Rows Scanned", + "read_only": 1 + }, + { + "fieldname": "avg_rows_scanned", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Rows Scanned", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 15:37:32.659433", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Statement Analysis", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/statement_analysis/statement_analysis.py b/press/database_performance_schema/doctype/statement_analysis/statement_analysis.py new file mode 100644 index 0000000000..79640e9f34 --- /dev/null +++ b/press/database_performance_schema/doctype/statement_analysis/statement_analysis.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class StatementAnalysis(Document): + pass diff --git a/press/database_performance_schema/doctype/statements_in_highest_5_percent_by_runtime/__init__.py b/press/database_performance_schema/doctype/statements_in_highest_5_percent_by_runtime/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/statements_in_highest_5_percent_by_runtime/statements_in_highest_5_percent_by_runtime.json b/press/database_performance_schema/doctype/statements_in_highest_5_percent_by_runtime/statements_in_highest_5_percent_by_runtime.json new file mode 100644 index 0000000000..213ea34490 --- /dev/null +++ b/press/database_performance_schema/doctype/statements_in_highest_5_percent_by_runtime/statements_in_highest_5_percent_by_runtime.json @@ -0,0 +1,132 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 15:35:37.965896", + "default_view": "List", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "query", + "full_table", + "executed_count", + "errors_count", + "warnings_count", + "total_time", + "max_time", + "avg_time", + "rows_sent", + "avg_rows", + "rows_scanned", + "avg_rows_scanned" + ], + "fields": [ + { + "fieldname": "query", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Query", + "read_only": 1 + }, + { + "fieldname": "full_table", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Full Table", + "read_only": 1 + }, + { + "fieldname": "executed_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Executed Count", + "read_only": 1 + }, + { + "fieldname": "errors_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Errors Count", + "read_only": 1 + }, + { + "fieldname": "warnings_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Warnings Count", + "read_only": 1 + }, + { + "fieldname": "total_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Time (us)", + "read_only": 1 + }, + { + "fieldname": "max_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Time (us)", + "read_only": 1 + }, + { + "fieldname": "avg_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Time (us)", + "read_only": 1 + }, + { + "fieldname": "rows_sent", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Rows Sent", + "read_only": 1 + }, + { + "fieldname": "avg_rows", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Rows", + "read_only": 1 + }, + { + "fieldname": "rows_scanned", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Rows Scanned", + "read_only": 1 + }, + { + "fieldname": "avg_rows_scanned", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Rows Scanned", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 15:38:29.467507", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Statements in Highest 5 Percent by Runtime", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/statements_in_highest_5_percent_by_runtime/statements_in_highest_5_percent_by_runtime.py b/press/database_performance_schema/doctype/statements_in_highest_5_percent_by_runtime/statements_in_highest_5_percent_by_runtime.py new file mode 100644 index 0000000000..5bc5e77fbd --- /dev/null +++ b/press/database_performance_schema/doctype/statements_in_highest_5_percent_by_runtime/statements_in_highest_5_percent_by_runtime.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class StatementsinHighest5PercentbyRuntime(Document): + pass diff --git a/press/database_performance_schema/doctype/statements_using_temp_tables/__init__.py b/press/database_performance_schema/doctype/statements_using_temp_tables/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/statements_using_temp_tables/statements_using_temp_tables.json b/press/database_performance_schema/doctype/statements_using_temp_tables/statements_using_temp_tables.json new file mode 100644 index 0000000000..f3342b32ef --- /dev/null +++ b/press/database_performance_schema/doctype/statements_using_temp_tables/statements_using_temp_tables.json @@ -0,0 +1,77 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 15:23:29.883101", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "query", + "executed_count", + "tmp_tables_in_memory", + "tmp_tables_in_disk", + "avg_tmp_tables_per_query", + "percent_tmp_tables_to_disk" + ], + "fields": [ + { + "fieldname": "query", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Query", + "read_only": 1 + }, + { + "fieldname": "executed_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Executed Count", + "read_only": 1 + }, + { + "fieldname": "tmp_tables_in_memory", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Tmp Tables in Memory", + "read_only": 1 + }, + { + "fieldname": "tmp_tables_in_disk", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Tmp Tables in Disk", + "read_only": 1 + }, + { + "fieldname": "avg_tmp_tables_per_query", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Tmp Tables Per Query", + "read_only": 1 + }, + { + "fieldname": "percent_tmp_tables_to_disk", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Percent Tmp Tables to Disk (%)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 15:25:39.776832", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Statements Using Temp Tables", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/statements_using_temp_tables/statements_using_temp_tables.py b/press/database_performance_schema/doctype/statements_using_temp_tables/statements_using_temp_tables.py new file mode 100644 index 0000000000..4985fc7b86 --- /dev/null +++ b/press/database_performance_schema/doctype/statements_using_temp_tables/statements_using_temp_tables.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class StatementsUsingTempTables(Document): + pass diff --git a/press/database_performance_schema/doctype/statements_with_error_or_warnings/__init__.py b/press/database_performance_schema/doctype/statements_with_error_or_warnings/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/statements_with_error_or_warnings/statements_with_error_or_warnings.json b/press/database_performance_schema/doctype/statements_with_error_or_warnings/statements_with_error_or_warnings.json new file mode 100644 index 0000000000..b743a07b20 --- /dev/null +++ b/press/database_performance_schema/doctype/statements_with_error_or_warnings/statements_with_error_or_warnings.json @@ -0,0 +1,82 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 15:08:37.466460", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "column_break_onlr", + "query", + "executed_count", + "errors_count", + "warnings_count", + "error_percentage", + "warning_percentage" + ], + "fields": [ + { + "fieldname": "column_break_onlr", + "fieldtype": "Column Break" + }, + { + "fieldname": "query", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Query", + "read_only": 1 + }, + { + "fieldname": "executed_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Executed Count", + "read_only": 1 + }, + { + "fieldname": "errors_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Errors Count", + "read_only": 1 + }, + { + "fieldname": "warnings_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Warnings Count", + "read_only": 1 + }, + { + "fieldname": "error_percentage", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Error Percentage", + "read_only": 1 + }, + { + "fieldname": "warning_percentage", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Warning Percentage", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 15:12:18.273618", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Statements With Error or Warnings", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/statements_with_error_or_warnings/statements_with_error_or_warnings.py b/press/database_performance_schema/doctype/statements_with_error_or_warnings/statements_with_error_or_warnings.py new file mode 100644 index 0000000000..74b83d13fc --- /dev/null +++ b/press/database_performance_schema/doctype/statements_with_error_or_warnings/statements_with_error_or_warnings.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class StatementsWithErrororWarnings(Document): + pass diff --git a/press/database_performance_schema/doctype/statements_with_full_table_scans/__init__.py b/press/database_performance_schema/doctype/statements_with_full_table_scans/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/statements_with_full_table_scans/statements_with_full_table_scans.json b/press/database_performance_schema/doctype/statements_with_full_table_scans/statements_with_full_table_scans.json new file mode 100644 index 0000000000..2f8d4fbf14 --- /dev/null +++ b/press/database_performance_schema/doctype/statements_with_full_table_scans/statements_with_full_table_scans.json @@ -0,0 +1,68 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 15:17:29.456185", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "query", + "executed_count", + "no_index_used_count", + "no_good_index_used_count", + "no_index_used_percentage" + ], + "fields": [ + { + "fieldname": "query", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Query", + "read_only": 1 + }, + { + "fieldname": "executed_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Executed Count", + "read_only": 1 + }, + { + "fieldname": "no_index_used_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "No Index Used Count", + "read_only": 1 + }, + { + "fieldname": "no_good_index_used_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "No Good Index Used Count", + "read_only": 1 + }, + { + "fieldname": "no_index_used_percentage", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "No Index Used Percentage", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 15:19:12.039251", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Statements With Full Table Scans", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/statements_with_full_table_scans/statements_with_full_table_scans.py b/press/database_performance_schema/doctype/statements_with_full_table_scans/statements_with_full_table_scans.py new file mode 100644 index 0000000000..5e2f5453a4 --- /dev/null +++ b/press/database_performance_schema/doctype/statements_with_full_table_scans/statements_with_full_table_scans.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class StatementsWithFullTableScans(Document): + pass diff --git a/press/database_performance_schema/doctype/statements_with_sorting/__init__.py b/press/database_performance_schema/doctype/statements_with_sorting/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/statements_with_sorting/statements_with_sorting.json b/press/database_performance_schema/doctype/statements_with_sorting/statements_with_sorting.json new file mode 100644 index 0000000000..f8bbe1c485 --- /dev/null +++ b/press/database_performance_schema/doctype/statements_with_sorting/statements_with_sorting.json @@ -0,0 +1,95 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 15:19:52.977843", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "query", + "executed_count", + "sort_merge_passes", + "avg_sort_merges", + "sorts_using_scans", + "sort_using_range", + "rows_sorted", + "avg_rows_sorted" + ], + "fields": [ + { + "fieldname": "query", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Query", + "read_only": 1 + }, + { + "fieldname": "executed_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Executed Count", + "read_only": 1 + }, + { + "fieldname": "sort_merge_passes", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Sort Merge Passes", + "read_only": 1 + }, + { + "fieldname": "avg_sort_merges", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Sort Merges", + "read_only": 1 + }, + { + "fieldname": "sorts_using_scans", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Sorts Using Scans", + "read_only": 1 + }, + { + "fieldname": "sort_using_range", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Sort Using Range", + "read_only": 1 + }, + { + "fieldname": "rows_sorted", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Rows Sorted", + "read_only": 1 + }, + { + "fieldname": "avg_rows_sorted", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Rows Sorted", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 15:22:47.842846", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Statements With Sorting", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/statements_with_sorting/statements_with_sorting.py b/press/database_performance_schema/doctype/statements_with_sorting/statements_with_sorting.py new file mode 100644 index 0000000000..1036821ebb --- /dev/null +++ b/press/database_performance_schema/doctype/statements_with_sorting/statements_with_sorting.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class StatementsWithSorting(Document): + pass diff --git a/press/database_performance_schema/doctype/tables_with_full_table_scans/__init__.py b/press/database_performance_schema/doctype/tables_with_full_table_scans/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/tables_with_full_table_scans/tables_with_full_table_scans.json b/press/database_performance_schema/doctype/tables_with_full_table_scans/tables_with_full_table_scans.json new file mode 100644 index 0000000000..3d8605cb12 --- /dev/null +++ b/press/database_performance_schema/doctype/tables_with_full_table_scans/tables_with_full_table_scans.json @@ -0,0 +1,59 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 13:00:23.122105", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "schema", + "object", + "full_scanned_rows", + "time_us" + ], + "fields": [ + { + "fieldname": "schema", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Schema", + "read_only": 1 + }, + { + "fieldname": "object", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Object", + "read_only": 1 + }, + { + "fieldname": "full_scanned_rows", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Full Scanned Rows", + "read_only": 1 + }, + { + "fieldname": "time_us", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Time (us)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 13:09:25.052904", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Tables with Full Table Scans", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/tables_with_full_table_scans/tables_with_full_table_scans.py b/press/database_performance_schema/doctype/tables_with_full_table_scans/tables_with_full_table_scans.py new file mode 100644 index 0000000000..6e878df99d --- /dev/null +++ b/press/database_performance_schema/doctype/tables_with_full_table_scans/tables_with_full_table_scans.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class TableswithFullTableScans(Document): + pass diff --git a/press/database_performance_schema/doctype/top_file_io_activity_report/__init__.py b/press/database_performance_schema/doctype/top_file_io_activity_report/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/top_file_io_activity_report/top_file_io_activity_report.json b/press/database_performance_schema/doctype/top_file_io_activity_report/top_file_io_activity_report.json new file mode 100644 index 0000000000..8a86f8c25a --- /dev/null +++ b/press/database_performance_schema/doctype/top_file_io_activity_report/top_file_io_activity_report.json @@ -0,0 +1,144 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-30 11:58:49.811446", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "file", + "total_io", + "write_percentage", + "read_io_info_section", + "read_requests", + "column_break_ydlk", + "total_read_io", + "column_break_vrkh", + "avg_read_io", + "write_io_info_section", + "write_requests", + "column_break_jlxu", + "total_write_io", + "column_break_vfzt", + "avg_write_io" + ], + "fields": [ + { + "fieldname": "file", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "File", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "total_io", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total IO (MB)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "write_percentage", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Write %", + "read_only": 1 + }, + { + "fieldname": "read_io_info_section", + "fieldtype": "Section Break", + "label": "Read IO Info" + }, + { + "columns": 1, + "fieldname": "read_requests", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Read Requests", + "read_only": 1 + }, + { + "fieldname": "column_break_ydlk", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "total_read_io", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Read IO (MB)", + "read_only": 1 + }, + { + "fieldname": "column_break_vrkh", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "avg_read_io", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Read IO (MB)", + "read_only": 1 + }, + { + "fieldname": "write_io_info_section", + "fieldtype": "Section Break", + "label": "Write IO Info" + }, + { + "columns": 1, + "fieldname": "write_requests", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Write Requests", + "read_only": 1 + }, + { + "fieldname": "column_break_jlxu", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "total_write_io", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Write IO (MB)", + "read_only": 1 + }, + { + "fieldname": "column_break_vfzt", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "avg_write_io", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Write IO (MB)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 12:46:40.609722", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Top File IO Activity Report", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/top_file_io_activity_report/top_file_io_activity_report.py b/press/database_performance_schema/doctype/top_file_io_activity_report/top_file_io_activity_report.py new file mode 100644 index 0000000000..5b4605812f --- /dev/null +++ b/press/database_performance_schema/doctype/top_file_io_activity_report/top_file_io_activity_report.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class TopFileIOActivityReport(Document): + pass diff --git a/press/database_performance_schema/doctype/top_io_by_event_category/__init__.py b/press/database_performance_schema/doctype/top_io_by_event_category/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/top_io_by_event_category/top_io_by_event_category.json b/press/database_performance_schema/doctype/top_io_by_event_category/top_io_by_event_category.json new file mode 100644 index 0000000000..d53ae71082 --- /dev/null +++ b/press/database_performance_schema/doctype/top_io_by_event_category/top_io_by_event_category.json @@ -0,0 +1,207 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-30 16:37:12.860618", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "event_type", + "total_requested", + "section_break_aszx", + "total_io", + "column_break_vcjy", + "read_count", + "column_break_owft", + "write_count", + "section_break_xlar", + "total_read", + "column_break_smtc", + "avg_read", + "section_break_cwqk", + "total_written", + "column_break_mwut", + "avg_written", + "section_break_tjsh", + "total_time", + "column_break_iaaq", + "min_time", + "column_break_hevz", + "avg_time", + "column_break_nqej", + "max_time" + ], + "fields": [ + { + "fieldname": "event_type", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Event Type", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "total_requested", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Requested (MB)", + "read_only": 1 + }, + { + "fieldname": "section_break_aszx", + "fieldtype": "Section Break" + }, + { + "columns": 1, + "fieldname": "total_io", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Total IO", + "read_only": 1 + }, + { + "fieldname": "column_break_vcjy", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "read_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Read Count", + "read_only": 1 + }, + { + "fieldname": "column_break_owft", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "write_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Write Count", + "read_only": 1 + }, + { + "fieldname": "section_break_xlar", + "fieldtype": "Section Break" + }, + { + "columns": 1, + "fieldname": "total_read", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Read", + "read_only": 1 + }, + { + "fieldname": "column_break_smtc", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "avg_read", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Read", + "read_only": 1 + }, + { + "fieldname": "section_break_cwqk", + "fieldtype": "Section Break" + }, + { + "columns": 1, + "fieldname": "total_written", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Written", + "read_only": 1 + }, + { + "fieldname": "column_break_mwut", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "avg_written", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Written", + "read_only": 1 + }, + { + "fieldname": "section_break_tjsh", + "fieldtype": "Section Break" + }, + { + "columns": 1, + "fieldname": "total_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Time (us)", + "read_only": 1 + }, + { + "fieldname": "column_break_iaaq", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "min_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Min Time (us)", + "read_only": 1 + }, + { + "fieldname": "column_break_hevz", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "avg_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Time (us)", + "read_only": 1 + }, + { + "fieldname": "column_break_nqej", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "max_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Time (us)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 12:46:54.870449", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Top IO by Event Category", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/top_io_by_event_category/top_io_by_event_category.py b/press/database_performance_schema/doctype/top_io_by_event_category/top_io_by_event_category.py new file mode 100644 index 0000000000..36cd03a607 --- /dev/null +++ b/press/database_performance_schema/doctype/top_io_by_event_category/top_io_by_event_category.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class TopIObyEventCategory(Document): + pass diff --git a/press/database_performance_schema/doctype/top_io_by_file_by_time/__init__.py b/press/database_performance_schema/doctype/top_io_by_file_by_time/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/top_io_by_file_by_time/top_io_by_file_by_time.json b/press/database_performance_schema/doctype/top_io_by_file_by_time/top_io_by_file_by_time.json new file mode 100644 index 0000000000..8ae5c29e6d --- /dev/null +++ b/press/database_performance_schema/doctype/top_io_by_file_by_time/top_io_by_file_by_time.json @@ -0,0 +1,154 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-30 15:29:04.944737", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "file", + "io_count_section", + "total_io", + "column_break_xxhq", + "read_requests", + "column_break_rzrc", + "write_requests", + "column_break_qckc", + "misc_requests", + "request_time_section", + "total_time", + "column_break_xkyd", + "read_time", + "column_break_bmbz", + "write_time", + "column_break_hfre", + "misc_time" + ], + "fields": [ + { + "fieldname": "file", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "File", + "read_only": 1 + }, + { + "fieldname": "io_count_section", + "fieldtype": "Section Break", + "label": "IO Count" + }, + { + "columns": 1, + "fieldname": "total_io", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Total IO Count", + "read_only": 1 + }, + { + "fieldname": "column_break_xxhq", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "read_requests", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Read Request Count", + "read_only": 1 + }, + { + "fieldname": "column_break_rzrc", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "write_requests", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Write Request Count", + "read_only": 1 + }, + { + "fieldname": "column_break_qckc", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "misc_requests", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Misc Request Count", + "read_only": 1 + }, + { + "fieldname": "request_time_section", + "fieldtype": "Section Break", + "label": "Request Time" + }, + { + "columns": 1, + "fieldname": "total_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Time (us)", + "read_only": 1 + }, + { + "fieldname": "column_break_xkyd", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "read_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Read Time (us)", + "read_only": 1 + }, + { + "fieldname": "column_break_bmbz", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "write_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Write Time (us)", + "read_only": 1 + }, + { + "fieldname": "column_break_hfre", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "misc_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Misc Time (us)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 12:46:47.759517", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Top IO by File by Time", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/top_io_by_file_by_time/top_io_by_file_by_time.py b/press/database_performance_schema/doctype/top_io_by_file_by_time/top_io_by_file_by_time.py new file mode 100644 index 0000000000..496282d813 --- /dev/null +++ b/press/database_performance_schema/doctype/top_io_by_file_by_time/top_io_by_file_by_time.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class TopIObyFilebyTime(Document): + pass diff --git a/press/database_performance_schema/doctype/top_io_in_time_by_event_category/__init__.py b/press/database_performance_schema/doctype/top_io_in_time_by_event_category/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.json b/press/database_performance_schema/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.json new file mode 100644 index 0000000000..81739129a1 --- /dev/null +++ b/press/database_performance_schema/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.json @@ -0,0 +1,226 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 12:20:17.501670", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "event_type", + "section_break_ykxd", + "total_io", + "column_break_eqhz", + "read_count", + "column_break_kkkj", + "write_count", + "section_break_ebwe", + "total_read", + "column_break_nsap", + "avg_read", + "section_break_nygy", + "total_write", + "column_break_mvhi", + "avg_write", + "section_break_mcgu", + "total_time", + "column_break_vzzx", + "avg_time", + "column_break_hqbj", + "max_time", + "column_break_oflx", + "read_time", + "column_break_lyxq", + "write_time", + "column_break_vbds", + "misc_time" + ], + "fields": [ + { + "fieldname": "event_type", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Event Type", + "read_only": 1 + }, + { + "fieldname": "section_break_ykxd", + "fieldtype": "Section Break" + }, + { + "fieldname": "total_io", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Total IO", + "read_only": 1 + }, + { + "fieldname": "column_break_eqhz", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "read_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Read Count", + "read_only": 1 + }, + { + "fieldname": "column_break_kkkj", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "write_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Write Count", + "read_only": 1 + }, + { + "fieldname": "section_break_ebwe", + "fieldtype": "Section Break" + }, + { + "columns": 1, + "fieldname": "total_read", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Read (MB)", + "read_only": 1 + }, + { + "fieldname": "column_break_nsap", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "avg_read", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Read (MB)", + "read_only": 1 + }, + { + "fieldname": "section_break_nygy", + "fieldtype": "Section Break" + }, + { + "columns": 1, + "fieldname": "total_write", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Write (MB)", + "read_only": 1 + }, + { + "fieldname": "column_break_mvhi", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "avg_write", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Write (MB)", + "read_only": 1 + }, + { + "fieldname": "section_break_mcgu", + "fieldtype": "Section Break" + }, + { + "columns": 1, + "fieldname": "total_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Time (us)", + "read_only": 1 + }, + { + "fieldname": "column_break_vzzx", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "avg_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Time (us)", + "read_only": 1 + }, + { + "fieldname": "column_break_hqbj", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "max_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Time (us)", + "read_only": 1 + }, + { + "fieldname": "column_break_oflx", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "read_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Read Time (us)", + "read_only": 1 + }, + { + "fieldname": "column_break_lyxq", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "write_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Write Time (us)", + "read_only": 1 + }, + { + "fieldname": "column_break_vbds", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "misc_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Misc Time (us)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 12:47:00.628010", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Top IO in Time by Event Category", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.py b/press/database_performance_schema/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.py new file mode 100644 index 0000000000..6fc6f0cd59 --- /dev/null +++ b/press/database_performance_schema/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class TopIOinTimebyEventCategory(Document): + pass diff --git a/press/database_performance_schema/doctype/top_io_time_by_user_thread/__init__.py b/press/database_performance_schema/doctype/top_io_time_by_user_thread/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.json b/press/database_performance_schema/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.json new file mode 100644 index 0000000000..92095142ed --- /dev/null +++ b/press/database_performance_schema/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.json @@ -0,0 +1,137 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 12:30:44.658579", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "user", + "column_break_bwkb", + "thread_id", + "column_break_wpmq", + "process_list_id", + "section_break_jvyi", + "total_io", + "section_break_fkmu", + "total_time_us", + "column_break_wwye", + "avg_time_us", + "column_break_qbkg", + "min_time_us", + "column_break_qicb", + "max_time_us" + ], + "fields": [ + { + "fieldname": "user", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "User", + "read_only": 1 + }, + { + "fieldname": "column_break_bwkb", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "thread_id", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Thread Id", + "read_only": 1 + }, + { + "fieldname": "column_break_wpmq", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "process_list_id", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Process List Id", + "read_only": 1 + }, + { + "fieldname": "section_break_jvyi", + "fieldtype": "Section Break" + }, + { + "columns": 1, + "fieldname": "total_io", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Total IO", + "read_only": 1 + }, + { + "fieldname": "section_break_fkmu", + "fieldtype": "Section Break" + }, + { + "columns": 1, + "fieldname": "total_time_us", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Time (us)", + "read_only": 1 + }, + { + "fieldname": "column_break_wwye", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "avg_time_us", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Time (us)", + "read_only": 1 + }, + { + "fieldname": "column_break_qbkg", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "min_time_us", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Min Time (us)", + "read_only": 1 + }, + { + "fieldname": "column_break_qicb", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "max_time_us", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Time (us)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 12:47:06.821334", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Top IO Time by User Thread", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.py b/press/database_performance_schema/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.py new file mode 100644 index 0000000000..e3c3910c1d --- /dev/null +++ b/press/database_performance_schema/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class TopIOTimebyUserThread(Document): + pass diff --git a/press/database_performance_schema/doctype/top_memory_by_event/__init__.py b/press/database_performance_schema/doctype/top_memory_by_event/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/top_memory_by_event/top_memory_by_event.json b/press/database_performance_schema/doctype/top_memory_by_event/top_memory_by_event.json new file mode 100644 index 0000000000..44f0cf73a9 --- /dev/null +++ b/press/database_performance_schema/doctype/top_memory_by_event/top_memory_by_event.json @@ -0,0 +1,93 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-26 16:57:53.388269", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "event_type", + "count", + "max_count", + "memory", + "avg_memory", + "max_memory", + "max_avg_memory" + ], + "fields": [ + { + "columns": 4, + "fieldname": "event_type", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Event Type", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Count", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "max_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Count", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Memory (MB)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "avg_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Memory (MB)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "max_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Memory (MB)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "max_avg_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Avg Memory (MB)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 12:46:10.194218", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Top Memory By Event", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/top_memory_by_event/top_memory_by_event.py b/press/database_performance_schema/doctype/top_memory_by_event/top_memory_by_event.py new file mode 100644 index 0000000000..b1df8a8f16 --- /dev/null +++ b/press/database_performance_schema/doctype/top_memory_by_event/top_memory_by_event.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class TopMemoryByEvent(Document): + pass diff --git a/press/database_performance_schema/doctype/top_memory_by_host/__init__.py b/press/database_performance_schema/doctype/top_memory_by_host/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/top_memory_by_host/top_memory_by_host.json b/press/database_performance_schema/doctype/top_memory_by_host/top_memory_by_host.json new file mode 100644 index 0000000000..fde087d36a --- /dev/null +++ b/press/database_performance_schema/doctype/top_memory_by_host/top_memory_by_host.json @@ -0,0 +1,82 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-26 16:56:11.211639", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "host", + "count", + "memory", + "avg_memory", + "total_memory", + "max_memory" + ], + "fields": [ + { + "fieldname": "host", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Host", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Count", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "memory", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Memory (MB)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "avg_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Memory (MB)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "total_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Memory (MB)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "max_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Memory (MB)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 12:46:26.406050", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Top Memory By Host", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/top_memory_by_host/top_memory_by_host.py b/press/database_performance_schema/doctype/top_memory_by_host/top_memory_by_host.py new file mode 100644 index 0000000000..f578982781 --- /dev/null +++ b/press/database_performance_schema/doctype/top_memory_by_host/top_memory_by_host.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class TopMemoryByHost(Document): + pass diff --git a/press/database_performance_schema/doctype/top_memory_by_thread/__init__.py b/press/database_performance_schema/doctype/top_memory_by_thread/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/top_memory_by_thread/top_memory_by_thread.json b/press/database_performance_schema/doctype/top_memory_by_thread/top_memory_by_thread.json new file mode 100644 index 0000000000..8c9d9dd71f --- /dev/null +++ b/press/database_performance_schema/doctype/top_memory_by_thread/top_memory_by_thread.json @@ -0,0 +1,92 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-26 17:01:34.463177", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "thread_id", + "user", + "count", + "memory", + "avg_memory", + "max_memory", + "total_memory" + ], + "fields": [ + { + "columns": 1, + "fieldname": "thread_id", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Thread ID", + "read_only": 1 + }, + { + "fieldname": "user", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "User", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Count", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Memory (MB)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "avg_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Memory (MB)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "max_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Memory (MB)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "total_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Memory (MB)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 12:46:33.088342", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Top Memory By Thread", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/top_memory_by_thread/top_memory_by_thread.py b/press/database_performance_schema/doctype/top_memory_by_thread/top_memory_by_thread.py new file mode 100644 index 0000000000..cd3c77b1cd --- /dev/null +++ b/press/database_performance_schema/doctype/top_memory_by_thread/top_memory_by_thread.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class TopMemoryByThread(Document): + pass diff --git a/press/database_performance_schema/doctype/top_memory_by_user/__init__.py b/press/database_performance_schema/doctype/top_memory_by_user/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/top_memory_by_user/top_memory_by_user.json b/press/database_performance_schema/doctype/top_memory_by_user/top_memory_by_user.json new file mode 100644 index 0000000000..6d10f4d9b5 --- /dev/null +++ b/press/database_performance_schema/doctype/top_memory_by_user/top_memory_by_user.json @@ -0,0 +1,87 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-26 16:52:53.037283", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "section_break_rpkk", + "user", + "count", + "memory", + "avg_memory", + "total_memory", + "max_memory" + ], + "fields": [ + { + "fieldname": "user", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "User", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Count", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Memory (MB)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "avg_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Memory (MB)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "total_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Memory (MB)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "max_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Memory (MB)", + "read_only": 1 + }, + { + "fieldname": "section_break_rpkk", + "fieldtype": "Section Break" + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 15:39:50.494418", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Top Memory By User", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/top_memory_by_user/top_memory_by_user.py b/press/database_performance_schema/doctype/top_memory_by_user/top_memory_by_user.py new file mode 100644 index 0000000000..53b6026784 --- /dev/null +++ b/press/database_performance_schema/doctype/top_memory_by_user/top_memory_by_user.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class TopMemoryByUser(Document): + pass diff --git a/press/database_performance_schema/doctype/unused_indexes/__init__.py b/press/database_performance_schema/doctype/unused_indexes/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/unused_indexes/unused_indexes.json b/press/database_performance_schema/doctype/unused_indexes/unused_indexes.json new file mode 100644 index 0000000000..bb6b38c6a1 --- /dev/null +++ b/press/database_performance_schema/doctype/unused_indexes/unused_indexes.json @@ -0,0 +1,50 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 13:08:26.433448", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "schema", + "object", + "index" + ], + "fields": [ + { + "fieldname": "schema", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Schema", + "read_only": 1 + }, + { + "fieldname": "object", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Object", + "read_only": 1 + }, + { + "fieldname": "index", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Index", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 13:09:04.485183", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Unused Indexes", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/unused_indexes/unused_indexes.py b/press/database_performance_schema/doctype/unused_indexes/unused_indexes.py new file mode 100644 index 0000000000..021de3d6f0 --- /dev/null +++ b/press/database_performance_schema/doctype/unused_indexes/unused_indexes.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class UnusedIndexes(Document): + pass diff --git a/press/database_performance_schema/doctype/user_resource_use_io_statistics/__init__.py b/press/database_performance_schema/doctype/user_resource_use_io_statistics/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/user_resource_use_io_statistics/user_resource_use_io_statistics.json b/press/database_performance_schema/doctype/user_resource_use_io_statistics/user_resource_use_io_statistics.json new file mode 100644 index 0000000000..e287dcd7c3 --- /dev/null +++ b/press/database_performance_schema/doctype/user_resource_use_io_statistics/user_resource_use_io_statistics.json @@ -0,0 +1,68 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 14:03:11.480271", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "user", + "event_type", + "total_io", + "total_time", + "max_time" + ], + "fields": [ + { + "fieldname": "user", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "User", + "read_only": 1 + }, + { + "fieldname": "total_io", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Total IO", + "read_only": 1 + }, + { + "fieldname": "event_type", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "IO Event Type", + "read_only": 1 + }, + { + "fieldname": "total_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Time (us)", + "read_only": 1 + }, + { + "fieldname": "max_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Time (us)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 14:06:08.553204", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "User Resource Use IO Statistics", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/user_resource_use_io_statistics/user_resource_use_io_statistics.py b/press/database_performance_schema/doctype/user_resource_use_io_statistics/user_resource_use_io_statistics.py new file mode 100644 index 0000000000..4de8702016 --- /dev/null +++ b/press/database_performance_schema/doctype/user_resource_use_io_statistics/user_resource_use_io_statistics.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class UserResourceUseIOStatistics(Document): + pass diff --git a/press/database_performance_schema/doctype/user_resource_use_overview/__init__.py b/press/database_performance_schema/doctype/user_resource_use_overview/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/user_resource_use_overview/user_resource_use_overview.json b/press/database_performance_schema/doctype/user_resource_use_overview/user_resource_use_overview.json new file mode 100644 index 0000000000..30ffa7d61d --- /dev/null +++ b/press/database_performance_schema/doctype/user_resource_use_overview/user_resource_use_overview.json @@ -0,0 +1,131 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 13:58:41.431317", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "user", + "statements", + "statement_total_time", + "statement_avg_time", + "table_scans", + "file_ios", + "total_file_io_time", + "current_connections", + "total_connections", + "unique_hosts", + "current_memory", + "total_memory" + ], + "fields": [ + { + "fieldname": "user", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "User", + "read_only": 1 + }, + { + "fieldname": "statements", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Statements", + "read_only": 1 + }, + { + "fieldname": "table_scans", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Table Scans", + "read_only": 1 + }, + { + "fieldname": "file_ios", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "File IOs", + "read_only": 1 + }, + { + "fieldname": "current_connections", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Current Connections", + "read_only": 1 + }, + { + "fieldname": "total_connections", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Connections", + "read_only": 1 + }, + { + "fieldname": "unique_hosts", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Unique Hosts", + "read_only": 1 + }, + { + "fieldname": "statement_total_time", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Statement Total Time (us)", + "read_only": 1 + }, + { + "fieldname": "statement_avg_time", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Statement Avg Time (us)", + "read_only": 1 + }, + { + "fieldname": "total_file_io_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total File IO Time (us)", + "read_only": 1 + }, + { + "fieldname": "current_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Current Memory (MB)", + "read_only": 1 + }, + { + "fieldname": "total_memory", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Memory (MB)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 14:02:30.428670", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "User Resource Use Overview", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/user_resource_use_overview/user_resource_use_overview.py b/press/database_performance_schema/doctype/user_resource_use_overview/user_resource_use_overview.py new file mode 100644 index 0000000000..7b520e0e4b --- /dev/null +++ b/press/database_performance_schema/doctype/user_resource_use_overview/user_resource_use_overview.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class UserResourceUseOverview(Document): + pass diff --git a/press/database_performance_schema/doctype/user_resource_use_statement_statistics/__init__.py b/press/database_performance_schema/doctype/user_resource_use_statement_statistics/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/user_resource_use_statement_statistics/user_resource_use_statement_statistics.json b/press/database_performance_schema/doctype/user_resource_use_statement_statistics/user_resource_use_statement_statistics.json new file mode 100644 index 0000000000..5858b9d09a --- /dev/null +++ b/press/database_performance_schema/doctype/user_resource_use_statement_statistics/user_resource_use_statement_statistics.json @@ -0,0 +1,122 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 14:08:24.840956", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "user", + "statement", + "total_occurances", + "total_time_us", + "max_time_us", + "lock_time_us", + "cpu_time_us", + "rows_sent", + "rows_examined", + "rows_affected", + "full_scans" + ], + "fields": [ + { + "fieldname": "user", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "User", + "read_only": 1 + }, + { + "fieldname": "statement", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Statement", + "read_only": 1 + }, + { + "fieldname": "total_occurances", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Occurances", + "read_only": 1 + }, + { + "fieldname": "total_time_us", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Time (us)", + "read_only": 1 + }, + { + "fieldname": "max_time_us", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Time (us)", + "read_only": 1 + }, + { + "fieldname": "lock_time_us", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Lock Time (us)", + "read_only": 1 + }, + { + "fieldname": "cpu_time_us", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "CPU Time (us)", + "read_only": 1 + }, + { + "fieldname": "rows_sent", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Rows Sent", + "read_only": 1 + }, + { + "fieldname": "rows_examined", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Rows Examined", + "read_only": 1 + }, + { + "fieldname": "rows_affected", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Rows Affected", + "read_only": 1 + }, + { + "fieldname": "full_scans", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Full Scans", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 14:10:31.368143", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "User Resource Use Statement Statistics", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/user_resource_use_statement_statistics/user_resource_use_statement_statistics.py b/press/database_performance_schema/doctype/user_resource_use_statement_statistics/user_resource_use_statement_statistics.py new file mode 100644 index 0000000000..de03da2ed5 --- /dev/null +++ b/press/database_performance_schema/doctype/user_resource_use_statement_statistics/user_resource_use_statement_statistics.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class UserResourceUseStatementStatistics(Document): + pass diff --git a/press/database_performance_schema/doctype/wait_classes_by_average_time/__init__.py b/press/database_performance_schema/doctype/wait_classes_by_average_time/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/wait_classes_by_average_time/wait_classes_by_average_time.json b/press/database_performance_schema/doctype/wait_classes_by_average_time/wait_classes_by_average_time.json new file mode 100644 index 0000000000..93c4ab0805 --- /dev/null +++ b/press/database_performance_schema/doctype/wait_classes_by_average_time/wait_classes_by_average_time.json @@ -0,0 +1,78 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 13:51:58.971427", + "default_view": "List", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "event_class", + "total_occurances", + "total_time", + "avg_time", + "max_time", + "min_time" + ], + "fields": [ + { + "fieldname": "event_class", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Event Class", + "read_only": 1 + }, + { + "fieldname": "total_occurances", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Occurances", + "read_only": 1 + }, + { + "fieldname": "total_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Time (us)", + "read_only": 1 + }, + { + "fieldname": "avg_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Time (us)", + "read_only": 1 + }, + { + "fieldname": "max_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Time (us)", + "read_only": 1 + }, + { + "fieldname": "min_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Min Time (us)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 13:51:58.971427", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Wait Classes by Average Time", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/wait_classes_by_average_time/wait_classes_by_average_time.py b/press/database_performance_schema/doctype/wait_classes_by_average_time/wait_classes_by_average_time.py new file mode 100644 index 0000000000..599bbba725 --- /dev/null +++ b/press/database_performance_schema/doctype/wait_classes_by_average_time/wait_classes_by_average_time.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class WaitClassesbyAverageTime(Document): + pass diff --git a/press/database_performance_schema/doctype/wait_classes_by_time/__init__.py b/press/database_performance_schema/doctype/wait_classes_by_time/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/wait_classes_by_time/wait_classes_by_time.json b/press/database_performance_schema/doctype/wait_classes_by_time/wait_classes_by_time.json new file mode 100644 index 0000000000..5d2c8ca1d2 --- /dev/null +++ b/press/database_performance_schema/doctype/wait_classes_by_time/wait_classes_by_time.json @@ -0,0 +1,78 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 13:50:19.797529", + "default_view": "List", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "event_class", + "total_occurances", + "total_time", + "avg_time", + "max_time", + "min_time" + ], + "fields": [ + { + "fieldname": "event_class", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Event Class", + "read_only": 1 + }, + { + "fieldname": "total_occurances", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Occurances", + "read_only": 1 + }, + { + "fieldname": "total_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Time (us)", + "read_only": 1 + }, + { + "fieldname": "avg_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Time (us)", + "read_only": 1 + }, + { + "fieldname": "max_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Time (us)", + "read_only": 1 + }, + { + "fieldname": "min_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Min Time (us)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 13:50:54.265486", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Wait Classes by Time", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/wait_classes_by_time/wait_classes_by_time.py b/press/database_performance_schema/doctype/wait_classes_by_time/wait_classes_by_time.py new file mode 100644 index 0000000000..8bfa513d27 --- /dev/null +++ b/press/database_performance_schema/doctype/wait_classes_by_time/wait_classes_by_time.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class WaitClassesbyTime(Document): + pass diff --git a/press/database_performance_schema/doctype/waits_by_user_by_time/__init__.py b/press/database_performance_schema/doctype/waits_by_user_by_time/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/database_performance_schema/doctype/waits_by_user_by_time/waits_by_user_by_time.json b/press/database_performance_schema/doctype/waits_by_user_by_time/waits_by_user_by_time.json new file mode 100644 index 0000000000..532403b84c --- /dev/null +++ b/press/database_performance_schema/doctype/waits_by_user_by_time/waits_by_user_by_time.json @@ -0,0 +1,78 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 13:49:14.097193", + "default_view": "List", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "user", + "event", + "total_occurances", + "total_time", + "avg_time", + "max_time" + ], + "fields": [ + { + "fieldname": "total_occurances", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Occurances", + "read_only": 1 + }, + { + "fieldname": "user", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "User", + "read_only": 1 + }, + { + "fieldname": "event", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Event", + "read_only": 1 + }, + { + "fieldname": "total_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Time (us)", + "read_only": 1 + }, + { + "fieldname": "avg_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Time (us)", + "read_only": 1 + }, + { + "fieldname": "max_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Time (us)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 13:52:35.506954", + "modified_by": "Administrator", + "module": "Database Performance Schema", + "name": "Waits by User by Time", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/database_performance_schema/doctype/waits_by_user_by_time/waits_by_user_by_time.py b/press/database_performance_schema/doctype/waits_by_user_by_time/waits_by_user_by_time.py new file mode 100644 index 0000000000..bd89418136 --- /dev/null +++ b/press/database_performance_schema/doctype/waits_by_user_by_time/waits_by_user_by_time.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class WaitsbyUserbyTime(Document): + pass diff --git a/press/modules.txt b/press/modules.txt index c93a0f307e..8081cca74e 100644 --- a/press/modules.txt +++ b/press/modules.txt @@ -2,4 +2,5 @@ Press Experimental Marketplace SaaS -Partner \ No newline at end of file +Partner +Database Performance Schema \ No newline at end of file diff --git a/press/press/doctype/database_server/database_server.py b/press/press/doctype/database_server/database_server.py index 3593d3c7e2..fb423d76f6 100644 --- a/press/press/doctype/database_server/database_server.py +++ b/press/press/doctype/database_server/database_server.py @@ -658,6 +658,7 @@ def get_performance_report(self): -innodb_buffer_stats_by_table -user_resource_use_overview -user_resource_use_io_statistics + -user_resource_use_statement_statistics """ return self.agent.post("database/performance_report", { "private_ip": self.private_ip, diff --git a/press/press/doctype/top_io_by_event_category/top_io_by_event_category.json b/press/press/doctype/top_io_by_event_category/top_io_by_event_category.json index 85d4556d78..a9f5861c02 100644 --- a/press/press/doctype/top_io_by_event_category/top_io_by_event_category.json +++ b/press/press/doctype/top_io_by_event_category/top_io_by_event_category.json @@ -5,18 +5,197 @@ "doctype": "DocType", "engine": "InnoDB", "field_order": [ - "section_break_hlgh" + "event_type", + "total_requested", + "section_break_aszx", + "total_io", + "column_break_vcjy", + "read_count", + "column_break_owft", + "write_count", + "section_break_xlar", + "total_read", + "column_break_smtc", + "avg_read", + "section_break_cwqk", + "total_written", + "column_break_mwut", + "avg_written", + "section_break_tjsh", + "total_time", + "column_break_iaaq", + "min_time", + "column_break_hevz", + "avg_time", + "column_break_nqej", + "max_time" ], "fields": [ { - "fieldname": "section_break_hlgh", + "fieldname": "event_type", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Event Type", + "read_only": 1 + }, + { + "fieldname": "section_break_aszx", + "fieldtype": "Section Break" + }, + { + "columns": 1, + "fieldname": "total_io", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Total IO", + "read_only": 1 + }, + { + "fieldname": "column_break_vcjy", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "read_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Read Count", + "read_only": 1 + }, + { + "fieldname": "column_break_owft", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "write_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Write Count", + "read_only": 1 + }, + { + "fieldname": "section_break_xlar", + "fieldtype": "Section Break" + }, + { + "columns": 1, + "fieldname": "total_read", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Read", + "read_only": 1 + }, + { + "fieldname": "column_break_smtc", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "avg_read", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Read", + "read_only": 1 + }, + { + "fieldname": "section_break_cwqk", "fieldtype": "Section Break" + }, + { + "columns": 1, + "fieldname": "total_written", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Written", + "read_only": 1 + }, + { + "fieldname": "column_break_mwut", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "avg_written", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Written", + "read_only": 1 + }, + { + "fieldname": "section_break_tjsh", + "fieldtype": "Section Break" + }, + { + "fieldname": "column_break_iaaq", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_hevz", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_nqej", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "total_requested", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Requested (MB)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "total_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Time (us)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "min_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Min Time (us)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "avg_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Time (us)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "max_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Time (us)", + "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-30 16:37:12.860618", + "modified": "2024-01-31 12:19:44.036269", "modified_by": "Administrator", "module": "Press", "name": "Top IO by Event Category", diff --git a/press/press/doctype/top_io_in_time_by_event_category/__init__.py b/press/press/doctype/top_io_in_time_by_event_category/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/press/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.json b/press/press/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.json new file mode 100644 index 0000000000..aa19e6e1c4 --- /dev/null +++ b/press/press/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.json @@ -0,0 +1,226 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 12:20:17.501670", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "event_type", + "section_break_ykxd", + "total_io", + "column_break_eqhz", + "read_count", + "column_break_kkkj", + "write_count", + "section_break_ebwe", + "total_read", + "column_break_nsap", + "avg_read", + "section_break_nygy", + "total_write", + "column_break_mvhi", + "avg_write", + "section_break_mcgu", + "total_time", + "column_break_vzzx", + "avg_time", + "column_break_hqbj", + "max_time", + "column_break_oflx", + "read_time", + "column_break_lyxq", + "write_time", + "column_break_vbds", + "misc_time" + ], + "fields": [ + { + "fieldname": "event_type", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Event Type", + "read_only": 1 + }, + { + "fieldname": "section_break_ykxd", + "fieldtype": "Section Break" + }, + { + "fieldname": "total_io", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Total IO", + "read_only": 1 + }, + { + "fieldname": "column_break_eqhz", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "read_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Read Count", + "read_only": 1 + }, + { + "fieldname": "column_break_kkkj", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "write_count", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Write Count", + "read_only": 1 + }, + { + "fieldname": "section_break_ebwe", + "fieldtype": "Section Break" + }, + { + "fieldname": "column_break_nsap", + "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_nygy", + "fieldtype": "Section Break" + }, + { + "fieldname": "column_break_mvhi", + "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_mcgu", + "fieldtype": "Section Break" + }, + { + "fieldname": "column_break_vzzx", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_hqbj", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_oflx", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_lyxq", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_vbds", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "total_read", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Read (MB)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "avg_read", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Read (MB)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "total_write", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Write (MB)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "avg_write", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Write (MB)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "total_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Time (us)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "avg_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Time (us)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "max_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Time (us)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "read_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Read Time (us)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "write_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Write Time (us)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "misc_time", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Misc Time (us)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 12:29:40.943335", + "modified_by": "Administrator", + "module": "Press", + "name": "Top IO in Time by Event Category", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/press/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.py b/press/press/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.py new file mode 100644 index 0000000000..6fc6f0cd59 --- /dev/null +++ b/press/press/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class TopIOinTimebyEventCategory(Document): + pass diff --git a/press/press/doctype/top_io_time_by_user_thread/__init__.py b/press/press/doctype/top_io_time_by_user_thread/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/press/press/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.json b/press/press/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.json new file mode 100644 index 0000000000..d981892110 --- /dev/null +++ b/press/press/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.json @@ -0,0 +1,137 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-31 12:30:44.658579", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "user", + "column_break_bwkb", + "thread_id", + "column_break_wpmq", + "process_list_id", + "section_break_jvyi", + "total_io", + "section_break_fkmu", + "total_time_us", + "column_break_wwye", + "avg_time_us", + "column_break_qbkg", + "min_time_us", + "column_break_qicb", + "max_time_us" + ], + "fields": [ + { + "fieldname": "user", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "User", + "read_only": 1 + }, + { + "fieldname": "column_break_bwkb", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "thread_id", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Thread Id", + "read_only": 1 + }, + { + "fieldname": "column_break_wpmq", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "process_list_id", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Process List Id", + "read_only": 1 + }, + { + "fieldname": "section_break_jvyi", + "fieldtype": "Section Break" + }, + { + "columns": 1, + "fieldname": "total_io", + "fieldtype": "Int", + "in_list_view": 1, + "in_preview": 1, + "label": "Total IO", + "read_only": 1 + }, + { + "fieldname": "section_break_fkmu", + "fieldtype": "Section Break" + }, + { + "columns": 1, + "fieldname": "total_time_us", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Time (us)", + "read_only": 1 + }, + { + "fieldname": "column_break_wwye", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "avg_time_us", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Avg Time (us)", + "read_only": 1 + }, + { + "fieldname": "column_break_qbkg", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "min_time_us", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Min Time (us)", + "read_only": 1 + }, + { + "fieldname": "column_break_qicb", + "fieldtype": "Column Break" + }, + { + "columns": 1, + "fieldname": "max_time_us", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Max Time (us)", + "read_only": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-01-31 12:40:21.527146", + "modified_by": "Administrator", + "module": "Press", + "name": "Top IO Time by User Thread", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/press/press/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.py b/press/press/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.py new file mode 100644 index 0000000000..e3c3910c1d --- /dev/null +++ b/press/press/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class TopIOTimebyUserThread(Document): + pass From 7b3bc0689044e309aca82d3877c3c8fc12c346d8 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Wed, 31 Jan 2024 16:57:09 +0530 Subject: [PATCH 08/31] chore: rename --- .../database_server/database_server.json | 225 +++++++++++++++++- .../database_server/database_server.py | 2 +- 2 files changed, 224 insertions(+), 3 deletions(-) diff --git a/press/press/doctype/database_server/database_server.json b/press/press/doctype/database_server/database_server.json index bb29a93c43..a6fc878b59 100644 --- a/press/press/doctype/database_server/database_server.json +++ b/press/press/doctype/database_server/database_server.json @@ -61,7 +61,39 @@ "memory_swap_max", "section_break_ladc", "is_performance_schema_enabled", - "mariadb_system_variables" + "mariadb_system_variables", + "performance_schema_report_section", + "is_total_allocated_memory_perf_report_enabled", + "is_top_memory_by_event_perf_report_enabled", + "is_top_memory_by_user_perf_report_enabled", + "is_top_memory_by_host_perf_report_enabled", + "is_top_memory_by_thread_perf_report_enabled", + "is_top_io_by_file_activity_report_perf_report_enabled", + "is_top_io_by_file_by_time_perf_report_enabled", + "is_top_io_by_event_category_perf_report_enabled", + "is_top_io_in_time_by_event_category_perf_report_enabled", + "is_top_io_by_user_or_thread_perf_report_enabled", + "is_statement_analysis_perf_report_enabled", + "is_statements_in_highest_5_percentile_perf_report_enabled", + "is_statements_using_temp_tables_perf_report_enabled", + "is_statements_with_sorting_perf_report_enabled", + "is_statements_with_full_table_scans_perf_report_enabled", + "is_statements_with_errors_or_warnings_perf_report_enabled", + "column_break_ggah", + "is_schema_index_statistics_perf_report_enabled", + "is_schema_table_statistics_perf_report_enabled", + "is_schema_table_statistics_with_innodb_perf_report_enabled", + "is_schema_tables_with_full_table_scans_perf_report_enabled", + "is_schema_unused_indexes_perf_report_enabled", + "is_global_waits_by_time_perf_report_enabled", + "is_waits_by_user_by_time_perf_report_enabled", + "is_wait_classes_by_time_perf_report_enabled", + "is_waits_classes_by_avg_time_perf_report_enabled", + "is_innodb_buffer_stats_by_schema_perf_report_enabled", + "is_innodb_buffer_stats_by_table_perf_report_enabled", + "is_user_resource_use_overview_perf_report_enabled", + "is_user_resource_use_io_statistics_perf_report_enabled", + "is_user_resource_use_statement_statistics_perf_report_enabled" ], "fields": [ { @@ -407,11 +439,200 @@ "fieldtype": "Check", "label": "Is Stalk Setup", "read_only": 1 + }, + { + "fieldname": "performance_schema_report_section", + "fieldtype": "Section Break", + "label": "Performance Schema Report" + }, + { + "fieldname": "column_break_ggah", + "fieldtype": "Column Break" + }, + { + "default": "1", + "fieldname": "is_total_allocated_memory_perf_report_enabled", + "fieldtype": "Check", + "label": "Total Allocated Memory" + }, + { + "default": "1", + "fieldname": "is_top_memory_by_event_perf_report_enabled", + "fieldtype": "Check", + "label": "Top Memory By Event" + }, + { + "default": "1", + "fieldname": "is_top_memory_by_user_perf_report_enabled", + "fieldtype": "Check", + "label": "Top Memory By User" + }, + { + "default": "1", + "fieldname": "is_top_memory_by_host_perf_report_enabled", + "fieldtype": "Check", + "label": "Top Memory By Host" + }, + { + "default": "1", + "fieldname": "is_top_memory_by_thread_perf_report_enabled", + "fieldtype": "Check", + "label": "Top Memory By Thread" + }, + { + "default": "1", + "fieldname": "is_top_io_by_file_activity_report_perf_report_enabled", + "fieldtype": "Check", + "label": "Top File I/O Activity Report" + }, + { + "default": "1", + "fieldname": "is_top_io_by_file_by_time_perf_report_enabled", + "fieldtype": "Check", + "label": "Top I/O by File by Time" + }, + { + "default": "1", + "fieldname": "is_top_io_by_event_category_perf_report_enabled", + "fieldtype": "Check", + "label": "Top I/O by Event Category" + }, + { + "default": "1", + "fieldname": "is_top_io_in_time_by_event_category_perf_report_enabled", + "fieldtype": "Check", + "label": "Top I/O in Time by Event Category" + }, + { + "default": "1", + "fieldname": "is_top_io_by_user_or_thread_perf_report_enabled", + "fieldtype": "Check", + "label": "Top I/O Time by User/Thread" + }, + { + "default": "1", + "fieldname": "is_statement_analysis_perf_report_enabled", + "fieldtype": "Check", + "label": "Statement Analysis" + }, + { + "default": "1", + "fieldname": "is_statements_in_highest_5_percentile_perf_report_enabled", + "fieldtype": "Check", + "label": "Statements in Highest 5 Percent by Runtime" + }, + { + "default": "1", + "fieldname": "is_statements_using_temp_tables_perf_report_enabled", + "fieldtype": "Check", + "label": "Statements using Temp Tables" + }, + { + "default": "1", + "fieldname": "is_statements_with_sorting_perf_report_enabled", + "fieldtype": "Check", + "label": "Statements with Sorting" + }, + { + "default": "1", + "fieldname": "is_statements_with_full_table_scans_perf_report_enabled", + "fieldtype": "Check", + "label": "Statements With Full Table Scans" + }, + { + "default": "1", + "fieldname": "is_statements_with_errors_or_warnings_perf_report_enabled", + "fieldtype": "Check", + "label": "Statements With Errors or Warnings" + }, + { + "default": "1", + "fieldname": "is_schema_index_statistics_perf_report_enabled", + "fieldtype": "Check", + "label": "Schema Index Statistics" + }, + { + "default": "1", + "fieldname": "is_schema_table_statistics_perf_report_enabled", + "fieldtype": "Check", + "label": "Schema Table Statistics" + }, + { + "default": "1", + "fieldname": "is_schema_table_statistics_with_innodb_perf_report_enabled", + "fieldtype": "Check", + "label": "Schema Table Statistics (With InnoDB buffer)" + }, + { + "default": "1", + "fieldname": "is_schema_tables_with_full_table_scans_perf_report_enabled", + "fieldtype": "Check", + "label": "Tables with Full Table Scans" + }, + { + "default": "1", + "fieldname": "is_schema_unused_indexes_perf_report_enabled", + "fieldtype": "Check", + "label": "Unused Indexes" + }, + { + "default": "1", + "fieldname": "is_global_waits_by_time_perf_report_enabled", + "fieldtype": "Check", + "label": "Global Waits by Time" + }, + { + "default": "1", + "fieldname": "is_waits_by_user_by_time_perf_report_enabled", + "fieldtype": "Check", + "label": "Waits by User by Time" + }, + { + "default": "1", + "fieldname": "is_wait_classes_by_time_perf_report_enabled", + "fieldtype": "Check", + "label": "Wait Classes by Time" + }, + { + "default": "1", + "fieldname": "is_waits_classes_by_avg_time_perf_report_enabled", + "fieldtype": "Check", + "label": "Waits Classes by Average Time" + }, + { + "default": "0", + "fieldname": "is_innodb_buffer_stats_by_schema_perf_report_enabled", + "fieldtype": "Check", + "label": "InnoDB Buffer Stats by Schema" + }, + { + "default": "0", + "fieldname": "is_innodb_buffer_stats_by_table_perf_report_enabled", + "fieldtype": "Check", + "label": "InnoDB Buffer Stats by Table" + }, + { + "default": "1", + "fieldname": "is_user_resource_use_overview_perf_report_enabled", + "fieldtype": "Check", + "label": "User Resource Use Overview" + }, + { + "default": "1", + "fieldname": "is_user_resource_use_io_statistics_perf_report_enabled", + "fieldtype": "Check", + "label": "User Resource Use I/O Statistics" + }, + { + "default": "1", + "fieldname": "is_user_resource_use_statement_statistics_perf_report_enabled", + "fieldtype": "Check", + "label": "User Resource Use Statement Statistics" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2023-12-21 19:00:35.047273", + "modified": "2024-01-31 16:56:02.827370", "modified_by": "Administrator", "module": "Press", "name": "Database Server", diff --git a/press/press/doctype/database_server/database_server.py b/press/press/doctype/database_server/database_server.py index fb423d76f6..df8e8728af 100644 --- a/press/press/doctype/database_server/database_server.py +++ b/press/press/doctype/database_server/database_server.py @@ -647,7 +647,7 @@ def get_performance_report(self): -statements_with_errors_or_warnings -schema_index_statistics -schema_table_statistics - -schema_table_statistics_with_buffer + -schema_table_statistics_with_innodb_buffer -schema_tables_with_full_table_scans -schema_unused_indexes -global_waits_by_time From 76a0d0ea52a1d3d2f4be906d8c7aedd7eb6f6779 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Thu, 1 Feb 2024 12:19:41 +0530 Subject: [PATCH 09/31] feat: hotspot section completed --- .../performance_report.json | 16 +- .../top_io_time_by_user_thread.json | 42 +- .../database_server/database_server.py | 390 +++++++++++------- 3 files changed, 269 insertions(+), 179 deletions(-) diff --git a/press/database_performance_schema/doctype/performance_report/performance_report.json b/press/database_performance_schema/doctype/performance_report/performance_report.json index 91affe8c3d..4399d86cb8 100644 --- a/press/database_performance_schema/doctype/performance_report/performance_report.json +++ b/press/database_performance_schema/doctype/performance_report/performance_report.json @@ -48,7 +48,7 @@ "schema_table_statistics_section", "schema_table_statistics", "schema_table_statistics_with_innodb_buffer_section", - "schema_table_statistics_with_buffer", + "schema_table_statistics_with_innodb_buffer", "tables_with_full_table_scans_section", "schema_tables_with_full_table_scans", "unused_indexes_section", @@ -383,12 +383,6 @@ "fieldtype": "Section Break", "label": "Schema Table Statistics (with InnoDB Buffer)" }, - { - "fieldname": "schema_table_statistics_with_buffer", - "fieldtype": "Table", - "options": "Schema Table Statistics With InnoDB Buffer", - "read_only": 1 - }, { "collapsible": 1, "collapsible_depends_on": "true", @@ -540,12 +534,18 @@ "fieldtype": "Table", "options": "User Resource Use Statement Statistics", "read_only": 1 + }, + { + "fieldname": "schema_table_statistics_with_innodb_buffer", + "fieldtype": "Table", + "options": "Schema Table Statistics With InnoDB Buffer", + "read_only": 1 } ], "in_create": 1, "index_web_pages_for_search": 1, "links": [], - "modified": "2024-01-31 16:27:23.359378", + "modified": "2024-02-01 11:33:37.491652", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Performance Report", diff --git a/press/database_performance_schema/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.json b/press/database_performance_schema/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.json index 92095142ed..65b918ff10 100644 --- a/press/database_performance_schema/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.json +++ b/press/database_performance_schema/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.json @@ -13,13 +13,13 @@ "section_break_jvyi", "total_io", "section_break_fkmu", - "total_time_us", + "total_time", "column_break_wwye", - "avg_time_us", + "avg_time", "column_break_qbkg", - "min_time_us", + "min_time", "column_break_qicb", - "max_time_us" + "max_time" ], "fields": [ { @@ -73,48 +73,48 @@ "fieldname": "section_break_fkmu", "fieldtype": "Section Break" }, + { + "fieldname": "column_break_wwye", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_qbkg", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_qicb", + "fieldtype": "Column Break" + }, { "columns": 1, - "fieldname": "total_time_us", + "fieldname": "total_time", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, "label": "Total Time (us)", "read_only": 1 }, - { - "fieldname": "column_break_wwye", - "fieldtype": "Column Break" - }, { "columns": 1, - "fieldname": "avg_time_us", + "fieldname": "avg_time", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, "label": "Avg Time (us)", "read_only": 1 }, - { - "fieldname": "column_break_qbkg", - "fieldtype": "Column Break" - }, { "columns": 1, - "fieldname": "min_time_us", + "fieldname": "min_time", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, "label": "Min Time (us)", "read_only": 1 }, - { - "fieldname": "column_break_qicb", - "fieldtype": "Column Break" - }, { "columns": 1, - "fieldname": "max_time_us", + "fieldname": "max_time", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, @@ -125,7 +125,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 12:47:06.821334", + "modified": "2024-02-01 12:15:22.724869", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Top IO Time by User Thread", diff --git a/press/press/doctype/database_server/database_server.py b/press/press/doctype/database_server/database_server.py index df8e8728af..1844338e21 100644 --- a/press/press/doctype/database_server/database_server.py +++ b/press/press/doctype/database_server/database_server.py @@ -532,156 +532,6 @@ def disable_performance_schema(self): self.is_performance_schema_enabled = False self.save() - @frappe.whitelist() - def fetch_performance_report(self): - if self.is_performance_schema_enabled: - frappe.enqueue_doc( - self.doctype, - self.name, - "_fetch_performance_report", - queue="long", - timeout=1200, - ) - frappe.msgprint("Performance Schema Report Fetching Started") - else: - frappe.throw("Performance Schema is not enabled") - - def _fetch_performance_report(self): - try: - reports = self.get_performance_report() - record = frappe.new_doc("Performance Report") - record.server = self.name - record.recorded_on = frappe.utils.now_datetime() - record.total_allocated_memory = self._bytes_to_mb(reports.get("total_allocated_memory")) - record.top_memory_by_user = [] - for r in reports.get("top_memory_by_user", []): - record.append("top_memory_by_user", { - "user": r.get("user"), - "count": r.get("current_count_used"), - "memory": self._bytes_to_mb(r.get("current_allocated")), - "avg_memory": self._bytes_to_mb(r.get("current_avg_alloc")), - "total_memory": self._bytes_to_mb(r.get("total_allocated")), - "max_memory": self._bytes_to_mb(r.get("current_max_alloc")), - }) - record.top_memory_by_host = [] - for r in reports.get("top_memory_by_host", []): - record.append("top_memory_by_host", { - "host": r.get("host"), - "count": r.get("current_count_used"), - "memory": self._bytes_to_mb(r.get("current_allocated")), - "avg_memory": self._bytes_to_mb(r.get("current_avg_alloc")), - "total_memory": self._bytes_to_mb(r.get("total_allocated")), - "max_memory": self._bytes_to_mb(r.get("current_max_alloc")), - }) - record.top_memory_by_event = [] - for r in reports.get("top_memory_by_event", []): - record.append("top_memory_by_event", { - "event_type": r.get("event_name"), - "count": r.get("current_count"), - "max_count": r.get("high_count"), - "memory": self._bytes_to_mb(r.get("current_alloc")), - "avg_memory": self._bytes_to_mb(r.get("current_avg_alloc")), - "max_memory": self._bytes_to_mb(r.get("high_alloc")), - "max_avg_memory": self._bytes_to_mb(r.get("high_avg_alloc")), - }) - record.top_memory_by_thread = [] - for r in reports.get("top_memory_by_thread", []): - record.append("top_memory_by_thread", { - "thread_id": r.get("thread_id"), - "user": r.get("user"), - "count": r.get("current_count_used"), - "memory": self._bytes_to_mb(r.get("current_allocated")), - "avg_memory": self._bytes_to_mb(r.get("current_avg_alloc")), - "total_memory": self._bytes_to_mb(r.get("total_allocated")), - "max_memory": self._bytes_to_mb(r.get("current_max_alloc")), - }) - record.top_io_by_file_activity_report = [] - for r in reports.get("top_io_by_file_activity_report", []): - record.append("top_io_by_file_activity_report", { - "file": r.get("file"), - "total_io": self._bytes_to_mb(r.get("total")), - "read_requests": r.get("count_read"), - "total_read_io": self._bytes_to_mb(r.get("total_read")), - "avg_read_io": self._bytes_to_mb(r.get("avg_read")), - "write_requests": r.get("count_write"), - "total_write_io": self._bytes_to_mb(r.get("total_written")), - "avg_write_io": self._bytes_to_mb(r.get("avg_write")), - "write_percentage": r.get("write_pct"), - }) - record.top_io_by_file_by_time = [] - for r in reports.get("top_io_by_file_by_time", []): - record.append("top_io_by_file_by_time", { - "file": r.get("file"), - "total_io": self._bytes_to_mb(r.get("total")), - "read_requests": r.get("count_read"), - "write_requests": r.get("count_write"), - "misc_requests": r.get("count_misc"), - "total_time": self._convert_to_us(r.get("total_latency")), - "read_time": self._convert_to_us(r.get("read_latency")), - "write_time": self._convert_to_us(r.get("write_latency")), - "misc_time": self._convert_to_us(r.get("misc_latency")), - }) - record.save() - except Exception: - log_error("Performance Schema Report Fetch Exception", server=self.as_dict()) - raise - - def get_performance_report(self): - """ - Available Reports: - -total_allocated_memory - -top_memory_by_event - -top_memory_by_user - -top_memory_by_host - -top_memory_by_thread - -top_io_by_file_activity_report - -top_io_by_file_by_time - -top_io_by_event_category - -top_io_in_time_by_event_category - -top_io_by_user_or_thread - -statement_analysis - -statements_in_highest_5_percentile - -statements_using_temp_tables - -statements_with_sorting - -statements_with_full_table_scans - -statements_with_errors_or_warnings - -schema_index_statistics - -schema_table_statistics - -schema_table_statistics_with_innodb_buffer - -schema_tables_with_full_table_scans - -schema_unused_indexes - -global_waits_by_time - -waits_by_user_by_time - -wait_classes_by_time - -waits_classes_by_avg_time - -innodb_buffer_stats_by_schema - -innodb_buffer_stats_by_table - -user_resource_use_overview - -user_resource_use_io_statistics - -user_resource_use_statement_statistics - """ - return self.agent.post("database/performance_report", { - "private_ip": self.private_ip, - "mariadb_root_password": self.get_password("mariadb_root_password"), - "reports": [ - "total_allocated_memory", - "top_memory_by_event", - "top_memory_by_user", - "top_memory_by_host", - "top_memory_by_thread", - "top_io_by_file_activity_report", - "top_io_by_file_by_time", - "top_io_by_event_category", - "top_io_in_time_by_event_category", - ] - }) or {} - - def _bytes_to_mb(self, bytes_val): - return round(bytes_val / 1024 / 1024, 2) - - def _convert_to_us(self, duration): - return round(duration / 1000000, 2) - def reset_root_password_secondary(self): primary = frappe.get_doc("Database Server", self.primary) self.mariadb_root_password = primary.get_password("mariadb_root_password") @@ -850,6 +700,246 @@ def _reconfigure_mariadb_exporter(self): "Database Server MariaDB Exporter Reconfigure Exception", server=self.as_dict() ) + @frappe.whitelist() + def fetch_performance_report(self): + if self.is_performance_schema_enabled: + frappe.enqueue_doc( + self.doctype, + self.name, + "_fetch_performance_report", + queue="long", + timeout=1200, + ) + frappe.msgprint("Performance Schema Report Fetching Started") + else: + frappe.throw("Performance Schema is not enabled") + + def _fetch_performance_report(self): + try: + reports = self.get_performance_report() + record = frappe.new_doc("Performance Report") + record.server = self.name + record.recorded_on = frappe.utils.now_datetime() + record.total_allocated_memory = self._bytes_to_mb(reports.get("total_allocated_memory", 0)) + record.top_memory_by_user = [] + for r in reports.get("top_memory_by_user", []): + record.append("top_memory_by_user", { + "user": r.get("user"), + "count": r.get("current_count_used"), + "memory": self._bytes_to_mb(r.get("current_allocated")), + "avg_memory": self._bytes_to_mb(r.get("current_avg_alloc")), + "total_memory": self._bytes_to_mb(r.get("total_allocated")), + "max_memory": self._bytes_to_mb(r.get("current_max_alloc")), + }) + record.top_memory_by_host = [] + for r in reports.get("top_memory_by_host", []): + record.append("top_memory_by_host", { + "host": r.get("host"), + "count": r.get("current_count_used"), + "memory": self._bytes_to_mb(r.get("current_allocated")), + "avg_memory": self._bytes_to_mb(r.get("current_avg_alloc")), + "total_memory": self._bytes_to_mb(r.get("total_allocated")), + "max_memory": self._bytes_to_mb(r.get("current_max_alloc")), + }) + record.top_memory_by_event = [] + for r in reports.get("top_memory_by_event", []): + record.append("top_memory_by_event", { + "event_type": r.get("event_name"), + "count": r.get("current_count"), + "max_count": r.get("high_count"), + "memory": self._bytes_to_mb(r.get("current_alloc")), + "avg_memory": self._bytes_to_mb(r.get("current_avg_alloc")), + "max_memory": self._bytes_to_mb(r.get("high_alloc")), + "max_avg_memory": self._bytes_to_mb(r.get("high_avg_alloc")), + }) + record.top_memory_by_thread = [] + for r in reports.get("top_memory_by_thread", []): + record.append("top_memory_by_thread", { + "thread_id": r.get("thread_id"), + "user": r.get("user"), + "count": r.get("current_count_used"), + "memory": self._bytes_to_mb(r.get("current_allocated")), + "avg_memory": self._bytes_to_mb(r.get("current_avg_alloc")), + "total_memory": self._bytes_to_mb(r.get("total_allocated")), + "max_memory": self._bytes_to_mb(r.get("current_max_alloc")), + }) + record.top_io_by_file_activity_report = [] + for r in reports.get("top_io_by_file_activity_report", []): + record.append("top_io_by_file_activity_report", { + "file": r.get("file"), + "total_io": self._bytes_to_mb(r.get("total")), + "read_requests": r.get("count_read"), + "total_read_io": self._bytes_to_mb(r.get("total_read")), + "avg_read_io": self._bytes_to_mb(r.get("avg_read")), + "write_requests": r.get("count_write"), + "total_write_io": self._bytes_to_mb(r.get("total_written")), + "avg_write_io": self._bytes_to_mb(r.get("avg_write")), + "write_percentage": r.get("write_pct"), + }) + record.top_io_by_file_by_time = [] + for r in reports.get("top_io_by_file_by_time", []): + record.append("top_io_by_file_by_time", { + "file": r.get("file"), + "total_io": self._bytes_to_mb(r.get("total")), + "read_requests": r.get("count_read"), + "write_requests": r.get("count_write"), + "misc_requests": r.get("count_misc"), + "total_time": self._convert_to_us(r.get("total_latency")), + "read_time": self._convert_to_us(r.get("read_latency")), + "write_time": self._convert_to_us(r.get("write_latency")), + "misc_time": self._convert_to_us(r.get("misc_latency")), + }) + record.top_io_by_event_category = [] + for r in reports.get("top_io_by_event_category", []): + record.append("top_io_by_event_category", { + "event_type": r.get("event_name"), + "total_requested": self._bytes_to_mb(r.get("total_requested")), + "total_io": self._bytes_to_mb(r.get("total")), + "read_count": r.get("count_read"), + "write_count": r.get("count_write"), + "total_read": self._bytes_to_mb(r.get("total_read")), + "avg_read": self._bytes_to_mb(r.get("avg_read")), + "total_written": self._bytes_to_mb(r.get("total_written")), + "avg_written": self._bytes_to_mb(r.get("avg_written")), + "total_time": self._convert_to_us(r.get("total_latency")), + "min_time": self._convert_to_us(r.get("min_latency")), + "avg_time": self._convert_to_us(r.get("avg_latency")), + "max_time": self._convert_to_us(r.get("max_latency")), + }) + record.top_io_in_time_by_event_category = [] + for r in reports.get("top_io_in_time_by_event_category", []): + record.append("top_io_in_time_by_event_category", { + "event_type": r.get("event_name"), + "total_requested": self._bytes_to_mb(r.get("total_requested")), + "total_io": self._bytes_to_mb(r.get("total")), + "read_count": r.get("count_read"), + "write_count": r.get("count_write"), + "total_read": self._bytes_to_mb(r.get("total_read")), + "avg_read": self._bytes_to_mb(r.get("avg_read")), + "total_written": self._bytes_to_mb(r.get("total_written")), + "avg_written": self._bytes_to_mb(r.get("avg_written")), + "total_time": self._convert_to_us(r.get("total_latency")), + "min_time": self._convert_to_us(r.get("min_latency")), + "avg_time": self._convert_to_us(r.get("avg_latency")), + "max_time": self._convert_to_us(r.get("max_latency")), + }) + record.top_io_by_user_or_thread = [] + for r in reports.get("top_io_by_user_or_thread", []): + record.append("top_io_by_user_or_thread", { + "user": r.get("user"), + "thread_id": r.get("thread_id"), + "process_list_id": r.get("processlist_id"), + "total_io": self._bytes_to_mb(r.get("total")), + "total_time": self._convert_to_us(r.get("total_latency")), + "avg_time": self._convert_to_us(r.get("avg_latency")), + "max_time": self._convert_to_us(r.get("max_latency")), + "min_time": self._convert_to_us(r.get("min_latency")), + }) + record.statement_analysis = [] + record.statements_in_highest_5_percentile = [] + record.statements_using_temp_tables = [] + record.statements_with_sorting = [] + record.statements_with_full_table_scans = [] + record.statements_with_errors_or_warnings = [] + record.schema_index_statistics = [] + record.schema_table_statistics = [] + record.schema_table_statistics_with_innodb_buffer = [] + record.schema_tables_with_full_table_scans = [] + record.schema_unused_indexes = [] + record.global_waits_by_time = [] + record.waits_by_user_by_time = [] + record.wait_classes_by_time = [] + record.waits_classes_by_avg_time = [] + record.innodb_buffer_stats_by_schema = [] + record.innodb_buffer_stats_by_table = [] + record.user_resource_use_overview = [] + record.user_resource_use_io_statistics = [] + record.user_resource_use_statement_statistics = [] + record.save() + except Exception: + log_error("Performance Schema Report Fetch Exception", server=self.as_dict()) + raise + + def get_performance_report(self): + """ + Available Reports: + -total_allocated_memory + -top_memory_by_event + -top_memory_by_user + -top_memory_by_host + -top_memory_by_thread + -top_io_by_file_activity_report + -top_io_by_file_by_time + -top_io_by_event_category + -top_io_in_time_by_event_category + -top_io_by_user_or_thread + -statement_analysis + -statements_in_highest_5_percentile + -statements_using_temp_tables + -statements_with_sorting + -statements_with_full_table_scans + -statements_with_errors_or_warnings + -schema_index_statistics + -schema_table_statistics + -schema_table_statistics_with_innodb_buffer + -schema_tables_with_full_table_scans + -schema_unused_indexes + -global_waits_by_time + -waits_by_user_by_time + -wait_classes_by_time + -waits_classes_by_avg_time + -innodb_buffer_stats_by_schema + -innodb_buffer_stats_by_table + -user_resource_use_overview + -user_resource_use_io_statistics + -user_resource_use_statement_statistics + """ + return self.agent.post("database/performance_report", { + "private_ip": self.private_ip, + "mariadb_root_password": self.get_password("mariadb_root_password"), + "reports": [ + "total_allocated_memory", + "top_memory_by_event", + "top_memory_by_user", + "top_memory_by_host", + "top_memory_by_thread", + "top_io_by_file_activity_report", + "top_io_by_file_by_time", + "top_io_by_event_category", + "top_io_in_time_by_event_category", + "top_io_by_user_or_thread", + "statement_analysis", + "statements_in_highest_5_percentile", + "statements_using_temp_tables", + "statements_with_sorting", + "statements_with_full_table_scans", + "statements_with_errors_or_warnings", + "schema_index_statistics", + "schema_table_statistics", + "schema_table_statistics_with_innodb_buffer", + "schema_tables_with_full_table_scans", + "schema_unused_indexes", + "global_waits_by_time", + "waits_by_user_by_time", + "wait_classes_by_time", + "waits_classes_by_avg_time", + "innodb_buffer_stats_by_schema", + "innodb_buffer_stats_by_table", + "user_resource_use_overview", + "user_resource_use_io_statistics", + "user_resource_use_statement_statistics", + ] + }) or {} + + def _bytes_to_mb(self, bytes_val): + if bytes_val is None: + return None + return round(bytes_val / 1024 / 1024, 2) + + def _convert_to_us(self, duration): + if duration is None: + return None + return round(duration / 1000000, 2) get_permission_query_conditions = get_permission_query_conditions_for_doctype( "Database Server" From 4bb8a03abfacfeb3c13a20889cd01994affbb5c0 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Thu, 1 Feb 2024 12:23:08 +0530 Subject: [PATCH 10/31] feat: make child table readonly --- .../doctype/performance_report/performance_report.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/press/database_performance_schema/doctype/performance_report/performance_report.json b/press/database_performance_schema/doctype/performance_report/performance_report.json index 4399d86cb8..243d13bf18 100644 --- a/press/database_performance_schema/doctype/performance_report/performance_report.json +++ b/press/database_performance_schema/doctype/performance_report/performance_report.json @@ -435,7 +435,8 @@ { "fieldname": "waits_by_user_by_time", "fieldtype": "Table", - "options": "Waits by User by Time" + "options": "Waits by User by Time", + "read_only": 1 }, { "collapsible": 1, @@ -545,7 +546,7 @@ "in_create": 1, "index_web_pages_for_search": 1, "links": [], - "modified": "2024-02-01 11:33:37.491652", + "modified": "2024-02-01 12:22:15.901845", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Performance Report", From 2881dcced82214b7be2c60b1d8ccb97bd9214cfd Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Fri, 2 Feb 2024 15:46:51 +0530 Subject: [PATCH 11/31] feat: all section completed --- .../global_waits_by_time.json | 26 +- .../innodb_buffer_stats_by_schema.json | 49 ++- .../innodb_buffer_stats_by_table.json | 53 ++- .../schema_index_statistics.json | 92 ++--- .../schema_table_statistics.json | 112 +++--- ...a_table_statistics_with_innodb_buffer.json | 168 ++++---- .../statement_analysis.json | 116 +++--- ...ments_in_highest_5_percent_by_runtime.json | 74 ++-- .../statements_using_temp_tables.json | 34 +- .../statements_with_error_or_warnings.json | 36 +- .../statements_with_full_table_scans.json | 32 +- .../statements_with_sorting.json | 56 +-- .../tables_with_full_table_scans.json | 17 +- .../top_file_io_activity_report.json | 96 ++--- .../top_io_by_event_category.json | 160 ++++---- .../top_io_by_file_by_time.json | 110 ++--- .../top_io_in_time_by_event_category.json | 175 ++++---- .../top_io_time_by_user_thread.json | 47 +-- .../top_memory_by_event.json | 34 +- .../top_memory_by_host.json | 26 +- .../top_memory_by_thread.json | 26 +- .../top_memory_by_user.json | 22 +- .../user_resource_use_io_statistics.json | 28 +- .../user_resource_use_overview.json | 82 ++-- ...ser_resource_use_statement_statistics.json | 66 +-- .../wait_classes_by_average_time.json | 34 +- .../wait_classes_by_time.json | 34 +- .../waits_by_user_by_time.json | 36 +- .../database_server/database_server.py | 377 ++++++++++++++---- 29 files changed, 1235 insertions(+), 983 deletions(-) diff --git a/press/database_performance_schema/doctype/global_waits_by_time/global_waits_by_time.json b/press/database_performance_schema/doctype/global_waits_by_time/global_waits_by_time.json index 168a00182a..9ad4edaec6 100644 --- a/press/database_performance_schema/doctype/global_waits_by_time/global_waits_by_time.json +++ b/press/database_performance_schema/doctype/global_waits_by_time/global_waits_by_time.json @@ -6,10 +6,10 @@ "engine": "InnoDB", "field_order": [ "event_class", - "total_occurances", - "total_time", - "avg_time", - "max_time" + "total_occurances_count_billion", + "total_time_billion_ps", + "avg_time_billion_ps", + "max_time_billion_ps" ], "fields": [ { @@ -21,42 +21,42 @@ "read_only": 1 }, { - "fieldname": "total_occurances", + "fieldname": "total_occurances_count_billion", "fieldtype": "Data", "in_list_view": 1, "in_preview": 1, - "label": "Total Occurances", + "label": "Total Occurances Count (Billion)", "read_only": 1 }, { - "fieldname": "total_time", + "fieldname": "total_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Total Time (us)", + "label": "Total Time (billion ps)", "read_only": 1 }, { - "fieldname": "avg_time", + "fieldname": "avg_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Avg Time (us)", + "label": "Avg Time (billion ps)", "read_only": 1 }, { - "fieldname": "max_time", + "fieldname": "max_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Max Time (us)", + "label": "Max Time (billion ps)", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 13:52:43.120022", + "modified": "2024-02-02 14:44:01.706320", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Global Waits By Time", diff --git a/press/database_performance_schema/doctype/innodb_buffer_stats_by_schema/innodb_buffer_stats_by_schema.json b/press/database_performance_schema/doctype/innodb_buffer_stats_by_schema/innodb_buffer_stats_by_schema.json index 6d278fa238..a77f45f84f 100644 --- a/press/database_performance_schema/doctype/innodb_buffer_stats_by_schema/innodb_buffer_stats_by_schema.json +++ b/press/database_performance_schema/doctype/innodb_buffer_stats_by_schema/innodb_buffer_stats_by_schema.json @@ -6,66 +6,75 @@ "engine": "InnoDB", "field_order": [ "schema", - "allocated", - "data", - "pages_hashed", - "pages_old", - "rows_cached" + "allocated_mb", + "data_mb", + "pages_count_billion", + "pages_hashed_count_billion", + "pages_old_count_billion", + "rows_cached_count_billion" ], "fields": [ { "fieldname": "schema", - "fieldtype": "Data", + "fieldtype": "Small Text", "in_list_view": 1, "in_preview": 1, "label": "Schema", "read_only": 1 }, { - "fieldname": "allocated", + "fieldname": "pages_hashed_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Allocated", + "label": "Pages Hashed Count (Billion)", "read_only": 1 }, { - "fieldname": "data", + "fieldname": "pages_old_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Data", + "label": "Pages Old Count (Billion)", "read_only": 1 }, { - "fieldname": "pages_hashed", - "fieldtype": "Int", + "fieldname": "rows_cached_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Pages Hashed", + "label": "Rows Cached Count (Billion)", "read_only": 1 }, { - "fieldname": "pages_old", - "fieldtype": "Int", + "fieldname": "pages_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Pages Old", + "label": "Pages Count (Billion)", "read_only": 1 }, { - "fieldname": "rows_cached", - "fieldtype": "Int", + "fieldname": "allocated_mb", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Allocated (MB)", + "read_only": 1 + }, + { + "fieldname": "data_mb", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Rows Cached", + "label": "Data (MB)", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 13:55:37.644301", + "modified": "2024-02-02 14:57:55.770131", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "InnoDB Buffer Stats by Schema", diff --git a/press/database_performance_schema/doctype/innodb_buffer_stats_by_table/innodb_buffer_stats_by_table.json b/press/database_performance_schema/doctype/innodb_buffer_stats_by_table/innodb_buffer_stats_by_table.json index fc6eee508e..a55ee520e8 100644 --- a/press/database_performance_schema/doctype/innodb_buffer_stats_by_table/innodb_buffer_stats_by_table.json +++ b/press/database_performance_schema/doctype/innodb_buffer_stats_by_table/innodb_buffer_stats_by_table.json @@ -8,11 +8,12 @@ "field_order": [ "schema", "table", - "allocated", - "data", - "pages_hashed", - "pages_old", - "rows_cached" + "allocated_mb", + "data_mb", + "pages_count_billion", + "pages_hashed_count_billion", + "pages_old_count_billion", + "rows_cached_count_billion" ], "fields": [ { @@ -24,58 +25,66 @@ "read_only": 1 }, { - "fieldname": "allocated", + "fieldname": "table", + "fieldtype": "Data", + "in_list_view": 1, + "in_preview": 1, + "label": "Table", + "read_only": 1 + }, + { + "fieldname": "allocated_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Allocated", + "label": "Allocated (MB)", "read_only": 1 }, { - "fieldname": "data", + "fieldname": "data_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Data", + "label": "Data (MB)", "read_only": 1 }, { - "fieldname": "pages_hashed", - "fieldtype": "Int", + "fieldname": "pages_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Pages Hashed", + "label": "Pages Count (Billion)", "read_only": 1 }, { - "fieldname": "pages_old", - "fieldtype": "Int", + "fieldname": "pages_hashed_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Pages Old", + "label": "Pages Hashed Count (Billion)", "read_only": 1 }, { - "fieldname": "rows_cached", - "fieldtype": "Int", + "fieldname": "pages_old_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Rows Cached", + "label": "Pages Old Count (Billion)", "read_only": 1 }, { - "fieldname": "table", - "fieldtype": "Data", + "fieldname": "rows_cached_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Table", + "label": "Rows Cached Count (Billion)", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 13:56:16.546295", + "modified": "2024-02-02 14:58:55.613314", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "InnoDB Buffer Stats by Table", diff --git a/press/database_performance_schema/doctype/schema_index_statistics/schema_index_statistics.json b/press/database_performance_schema/doctype/schema_index_statistics/schema_index_statistics.json index 26f15acbce..7726ed128d 100644 --- a/press/database_performance_schema/doctype/schema_index_statistics/schema_index_statistics.json +++ b/press/database_performance_schema/doctype/schema_index_statistics/schema_index_statistics.json @@ -11,21 +11,21 @@ "column_break_wtim", "index", "section_break_aafz", - "rows_selected", + "rows_selected_count_billion", "column_break_aeku", - "select_time", + "select_time_billion_ps", "section_break_kcdh", - "rows_inserted", + "rows_inserted_count_billion", "column_break_scfk", - "insert_time", + "insert_time_billion_ps", "section_break_tqle", - "rows_updated", + "rows_updated_count_billion", "column_break_mzmi", - "update_time", + "update_time_billion_ps", "section_break_rdqn", - "rows_deleted", + "rows_deleted_count_billion", "column_break_sajh", - "delete_time" + "delete_time_billion_ps" ], "fields": [ { @@ -64,14 +64,6 @@ "fieldname": "section_break_aafz", "fieldtype": "Section Break" }, - { - "fieldname": "rows_selected", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Rows Selected", - "read_only": 1 - }, { "fieldname": "column_break_aeku", "fieldtype": "Column Break" @@ -80,14 +72,6 @@ "fieldname": "section_break_kcdh", "fieldtype": "Section Break" }, - { - "fieldname": "rows_inserted", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Rows Inserted", - "read_only": 1 - }, { "fieldname": "column_break_scfk", "fieldtype": "Column Break" @@ -96,14 +80,6 @@ "fieldname": "section_break_tqle", "fieldtype": "Section Break" }, - { - "fieldname": "rows_updated", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Rows Updated", - "read_only": 1 - }, { "fieldname": "column_break_mzmi", "fieldtype": "Column Break" @@ -113,54 +89,78 @@ "fieldtype": "Section Break" }, { - "fieldname": "rows_deleted", - "fieldtype": "Int", + "fieldname": "column_break_sajh", + "fieldtype": "Column Break" + }, + { + "fieldname": "rows_selected_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Rows Deleted", + "label": "Rows Selected Count (Billion)", "read_only": 1 }, { - "fieldname": "column_break_sajh", - "fieldtype": "Column Break" + "fieldname": "select_time_billion_ps", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Select Time (billion ps)", + "read_only": 1 + }, + { + "fieldname": "rows_inserted_count_billion", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Rows Inserted Count (Billion)", + "read_only": 1 + }, + { + "fieldname": "insert_time_billion_ps", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Insert Time (billion ps)", + "read_only": 1 }, { - "fieldname": "select_time", + "fieldname": "rows_updated_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Select Time (us)", + "label": "Rows Updated Count (Billion)", "read_only": 1 }, { - "fieldname": "insert_time", + "fieldname": "update_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Insert Time (us)", + "label": "Update Time (billion ps)", "read_only": 1 }, { - "fieldname": "update_time", + "fieldname": "rows_deleted_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Update Time (us)", + "label": "Rows Deleted Count (Billion)", "read_only": 1 }, { - "fieldname": "delete_time", + "fieldname": "delete_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Delete Time (us)", + "label": "Delete Time (billion ps)", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 12:59:18.493459", + "modified": "2024-02-02 14:05:05.822134", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Schema Index Statistics", diff --git a/press/database_performance_schema/doctype/schema_table_statistics/schema_table_statistics.json b/press/database_performance_schema/doctype/schema_table_statistics/schema_table_statistics.json index 24815bcc75..b471b4eaa0 100644 --- a/press/database_performance_schema/doctype/schema_table_statistics/schema_table_statistics.json +++ b/press/database_performance_schema/doctype/schema_table_statistics/schema_table_statistics.json @@ -7,22 +7,22 @@ "field_order": [ "schema", "table", - "rows_fetched", - "fetch_time", - "rows_inserted", - "insert_time", - "rows_updated", - "update_time", - "rows_deleted", - "delete_time", - "io_read_requests", - "io_read", - "io_read_time", - "io_write_requests", - "io_write", - "io_write_time", - "io_misc_requests", - "io_misc_time" + "rows_fetched_count_billion", + "fetch_time_billion_ps", + "rows_inserted_count_billion", + "insert_time_billion_ps", + "rows_updated_count_billion", + "update_time_billion_ps", + "rows_deleted_count_billion", + "delete_time_billion_ps", + "io_read_requests_count_billion", + "io_read_mb", + "io_read_time_billion_ps", + "io_write_requests_count_billion", + "io_write_mb", + "io_write_time_billion_ps", + "io_misc_requests_count_billion", + "io_misc_time_billion_ps" ], "fields": [ { @@ -36,135 +36,135 @@ "label": "Table" }, { - "fieldname": "rows_fetched", - "fieldtype": "Int", - "label": "Rows Fetched" + "fieldname": "rows_fetched_count_billion", + "fieldtype": "Float", + "label": "Rows Fetched Count (Billion)" }, { - "fieldname": "rows_inserted", - "fieldtype": "Int", + "fieldname": "fetch_time_billion_ps", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Rows Inserted", + "label": "Fetch Time (billion ps)", "read_only": 1 }, { - "fieldname": "rows_updated", - "fieldtype": "Int", + "fieldname": "rows_inserted_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Rows Updated", + "label": "Rows Inserted Count (Billion)", "read_only": 1 }, { - "fieldname": "rows_deleted", - "fieldtype": "Int", + "fieldname": "insert_time_billion_ps", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Rows Deleted", + "label": "Insert Time (billion ps)", "read_only": 1 }, { - "fieldname": "io_read_requests", - "fieldtype": "Int", + "fieldname": "rows_updated_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "IO Read Requests", + "label": "Rows Updated Count (Billion)", "read_only": 1 }, { - "fieldname": "io_write_requests", - "fieldtype": "Int", + "fieldname": "update_time_billion_ps", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "IO Write Requests", + "label": "Update Time (billion ps)", "read_only": 1 }, { - "fieldname": "io_misc_requests", - "fieldtype": "Int", + "fieldname": "rows_deleted_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "IO Misc Requests", + "label": "Rows Deleted Count (Billion)", "read_only": 1 }, { - "fieldname": "fetch_time", + "fieldname": "delete_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Fetch Time (us)", + "label": "Delete Time (billion ps)", "read_only": 1 }, { - "fieldname": "insert_time", + "fieldname": "io_read_requests_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Insert Time (us)", + "label": "IO Read Requests Count (Billion)", "read_only": 1 }, { - "fieldname": "update_time", + "fieldname": "io_read_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Update Time (us)", + "label": "IO Read (MB)", "read_only": 1 }, { - "fieldname": "delete_time", + "fieldname": "io_read_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Delete Time (us)", + "label": "IO Read Time (billion ps)", "read_only": 1 }, { - "fieldname": "io_read", + "fieldname": "io_write_requests_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "IO Read (MB)", + "label": "IO Write Requests Count (Billion)", "read_only": 1 }, { - "fieldname": "io_read_time", + "fieldname": "io_write_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "IO Read Time (us)", + "label": "IO Write (MB)", "read_only": 1 }, { - "fieldname": "io_write", + "fieldname": "io_write_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "IO Write (MB)", + "label": "IO Write Time (billion ps)", "read_only": 1 }, { - "fieldname": "io_write_time", + "fieldname": "io_misc_requests_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "IO Write Time (us)", + "label": "IO Misc Requests Count (Billion)", "read_only": 1 }, { - "fieldname": "io_misc_time", + "fieldname": "io_misc_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "IO Misc Time (us)", + "label": "IO Misc Time (billion ps)", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 13:35:27.096901", + "modified": "2024-02-02 14:13:42.476842", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Schema Table Statistics", diff --git a/press/database_performance_schema/doctype/schema_table_statistics_with_innodb_buffer/schema_table_statistics_with_innodb_buffer.json b/press/database_performance_schema/doctype/schema_table_statistics_with_innodb_buffer/schema_table_statistics_with_innodb_buffer.json index 0e8d095137..df42c2d37a 100644 --- a/press/database_performance_schema/doctype/schema_table_statistics_with_innodb_buffer/schema_table_statistics_with_innodb_buffer.json +++ b/press/database_performance_schema/doctype/schema_table_statistics_with_innodb_buffer/schema_table_statistics_with_innodb_buffer.json @@ -8,30 +8,30 @@ "field_order": [ "schema", "table", - "rows_fetched", - "fetch_time", - "rows_inserted", - "insert_time", - "rows_updated", - "update_time", - "rows_deleted", - "delete_time", - "io_read_requests", - "io_read", - "io_read_time", - "io_write_requests", - "io_write", - "io_write_time", - "io_misc_requests", - "io_misc_time", + "rows_fetched_count_billion", + "fetch_time_billion_ps", + "rows_inserted_count_billion", + "insert_time_billion_ps", + "rows_updated_count_billion", + "update_time_billion_ps", + "rows_deleted_count_billion", + "delete_time_billion_ps", + "io_read_requests_count_billion", + "io_read_mb", + "io_read_time_billion_ps", + "io_write_requests_count_billion", + "io_write_mb", + "io_write_time_billion_ps", + "io_misc_requests_count_billion", + "io_misc_time_billion_ps", "innodb_buffer_section", - "buffer_allocated", - "buffer_data", - "buffer_free", - "buffer_pages", - "buffer_pages_hashed", - "buffer_pages_old", - "buffer_pages_cached" + "buffer_allocated_mb", + "buffer_data_mb", + "buffer_free_mb", + "buffer_pages_count_billion", + "buffer_pages_hashed_count_billion", + "buffer_pages_old_count_billion", + "buffer_pages_cached_count_billion" ], "fields": [ { @@ -45,76 +45,81 @@ "label": "Table" }, { - "fieldname": "rows_fetched", - "fieldtype": "Int", - "label": "Rows Fetched" + "fieldname": "innodb_buffer_section", + "fieldtype": "Section Break", + "label": "InnoDB Buffer" }, { - "fieldname": "fetch_time", + "fieldname": "rows_fetched_count_billion", + "fieldtype": "Float", + "label": "Rows Fetched Count (Billion)" + }, + { + "fieldname": "fetch_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Fetch Time (us)", + "label": "Fetch Time (billion ps)", "read_only": 1 }, { - "fieldname": "rows_inserted", - "fieldtype": "Int", + "fieldname": "rows_inserted_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Rows Inserted", + "label": "Rows Inserted Count (Billion)", "read_only": 1 }, { - "fieldname": "insert_time", + "fieldname": "insert_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Insert Time (us)", + "label": "Insert Time (billion ps)", "read_only": 1 }, { - "fieldname": "rows_updated", - "fieldtype": "Int", + "fieldname": "rows_updated_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Rows Updated", + "label": "Rows Updated Count (Billion)", "read_only": 1 }, { - "fieldname": "update_time", + "fieldname": "update_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Update Time (us)", + "label": "Update Time (billion ps)", "read_only": 1 }, { - "fieldname": "rows_deleted", - "fieldtype": "Int", + "fieldname": "rows_deleted_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Rows Deleted", + "label": "Rows Deleted Count (Billion)", "read_only": 1 }, { - "fieldname": "delete_time", + "fieldname": "delete_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Delete Time (us)", + "label": "Delete Time (billion ps)", "read_only": 1 }, { - "fieldname": "io_read_requests", - "fieldtype": "Int", + "fieldname": "io_read_requests_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "IO Read Requests", + "label": "IO Read Requests Count (Billion)", "read_only": 1 }, { - "fieldname": "io_read", + "fieldname": "io_read_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, @@ -122,23 +127,23 @@ "read_only": 1 }, { - "fieldname": "io_read_time", + "fieldname": "io_read_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "IO Read Time (us)", + "label": "IO Read Time (billion ps)", "read_only": 1 }, { - "fieldname": "io_write_requests", - "fieldtype": "Int", + "fieldname": "io_write_requests_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "IO Write Requests", + "label": "IO Write Requests Count (Billion)", "read_only": 1 }, { - "fieldname": "io_write", + "fieldname": "io_write_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, @@ -146,95 +151,90 @@ "read_only": 1 }, { - "fieldname": "io_write_time", + "fieldname": "io_write_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "IO Write Time (us)", + "label": "IO Write Time (billion ps)", "read_only": 1 }, { - "fieldname": "io_misc_requests", - "fieldtype": "Int", + "fieldname": "io_misc_requests_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "IO Misc Requests", + "label": "IO Misc Requests Count (Billion)", "read_only": 1 }, { - "fieldname": "io_misc_time", + "fieldname": "io_misc_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "IO Misc Time (us)", + "label": "IO Misc Time (billion ps)", "read_only": 1 }, { - "fieldname": "innodb_buffer_section", - "fieldtype": "Section Break", - "label": "InnoDB Buffer" - }, - { - "fieldname": "buffer_pages", - "fieldtype": "Int", + "fieldname": "buffer_allocated_mb", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Buffer Pages", + "label": "Buffer Allocated (MB)", "read_only": 1 }, { - "fieldname": "buffer_pages_hashed", - "fieldtype": "Int", + "fieldname": "buffer_data_mb", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Buffer Pages Hashed", + "label": "Buffer Data (MB)", "read_only": 1 }, { - "fieldname": "buffer_pages_old", - "fieldtype": "Int", + "fieldname": "buffer_free_mb", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Buffer Pages Old", + "label": "Buffer Free (MB)", "read_only": 1 }, { - "fieldname": "buffer_pages_cached", - "fieldtype": "Int", + "fieldname": "buffer_pages_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Buffer Pages Cached", + "label": "Buffer Pages Count (Billion)", "read_only": 1 }, { - "fieldname": "buffer_allocated", + "fieldname": "buffer_pages_hashed_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Buffer Allocated (MB)", + "label": "Buffer Pages Hashed Count (Billion)", "read_only": 1 }, { - "fieldname": "buffer_data", + "fieldname": "buffer_pages_old_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Buffer Data (MB)", + "label": "Buffer Pages Old Count (billion)", "read_only": 1 }, { - "fieldname": "buffer_free", + "fieldname": "buffer_pages_cached_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Buffer Free (MB)", + "label": "Buffer Pages Cached Count (Billion)", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 13:43:56.803785", + "modified": "2024-02-02 14:26:21.901894", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Schema Table Statistics With InnoDB Buffer", diff --git a/press/database_performance_schema/doctype/statement_analysis/statement_analysis.json b/press/database_performance_schema/doctype/statement_analysis/statement_analysis.json index 7f7ed6f014..df3cfe7c1d 100644 --- a/press/database_performance_schema/doctype/statement_analysis/statement_analysis.json +++ b/press/database_performance_schema/doctype/statement_analysis/statement_analysis.json @@ -6,156 +6,156 @@ "engine": "InnoDB", "field_order": [ "query", - "full_table", - "executed_count", - "errors_count", - "warnings_count", - "total_time", - "max_time", - "avg_time", - "rows_sent", - "avg_rows", - "rows_scanned", - "avg_rows_scanned", - "tmp_tables", - "tmp_disk_tables", - "rows_sorted", - "sort_merge_passes" + "full_table_scan", + "executed_count_billion", + "errors_count_billion", + "warnings_count_billion", + "total_time_billion_ps", + "max_time_billion_ps", + "avg_time_billion_ps", + "rows_sent_count_billion", + "avg_rows_sent_count_billion", + "rows_scanned_count_billion", + "avg_rows_scanned_count_billion", + "tmp_tables_count_billion", + "tmp_disk_tables_count_billion", + "rows_sorted_count_billion", + "sort_merge_passes_count_billion" ], "fields": [ { - "fieldname": "query", + "fieldname": "full_table_scan", "fieldtype": "Data", "in_list_view": 1, "in_preview": 1, - "label": "Query", + "label": "Full Table Scan", "read_only": 1 }, { - "fieldname": "full_table", - "fieldtype": "Data", + "fieldname": "query", + "fieldtype": "Text", "in_list_view": 1, "in_preview": 1, - "label": "Full Table", + "label": "Query", "read_only": 1 }, { - "fieldname": "executed_count", - "fieldtype": "Int", + "fieldname": "executed_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Executed Count", + "label": "Executed Count (Billion)", "read_only": 1 }, { - "fieldname": "errors_count", - "fieldtype": "Int", + "fieldname": "errors_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Errors Count", + "label": "Errors Count (Billion)", "read_only": 1 }, { - "fieldname": "warnings_count", - "fieldtype": "Int", + "fieldname": "warnings_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Warnings Count", + "label": "Warnings Count (Billion)", "read_only": 1 }, { - "fieldname": "rows_sent", - "fieldtype": "Int", + "fieldname": "total_time_billion_ps", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Rows Sent", + "label": "Total Time (billion ps)", "read_only": 1 }, { - "fieldname": "avg_rows", + "fieldname": "max_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Avg Rows", + "label": "Max Time (billion ps)", "read_only": 1 }, { - "fieldname": "tmp_tables", - "fieldtype": "Int", + "fieldname": "avg_time_billion_ps", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Tmp Tables", + "label": "Avg Time (billion ps)", "read_only": 1 }, { - "fieldname": "tmp_disk_tables", - "fieldtype": "Int", + "fieldname": "rows_sent_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Tmp Disk Tables", + "label": "Rows Sent Count (Billion)", "read_only": 1 }, { - "fieldname": "rows_sorted", - "fieldtype": "Int", + "fieldname": "avg_rows_sent_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Rows Sorted", + "label": "Avg Rows Sent Count (Billion)", "read_only": 1 }, { - "fieldname": "sort_merge_passes", - "fieldtype": "Int", + "fieldname": "rows_scanned_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Sort Merge Passes", + "label": "Rows Scanned Count (Billion)", "read_only": 1 }, { - "fieldname": "total_time", + "fieldname": "avg_rows_scanned_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Total Time (us)", + "label": "Avg Rows Scanned Count (Billion)", "read_only": 1 }, { - "fieldname": "max_time", + "fieldname": "tmp_tables_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Max Time (us)", + "label": "Tmp Tables Count (Billion)", "read_only": 1 }, { - "fieldname": "avg_time", + "fieldname": "tmp_disk_tables_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Avg Time (us)", + "label": "Tmp Disk Tables Count (Billion)", "read_only": 1 }, { - "fieldname": "rows_scanned", - "fieldtype": "Int", + "fieldname": "rows_sorted_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Rows Scanned", + "label": "Rows Sorted Count (Billion)", "read_only": 1 }, { - "fieldname": "avg_rows_scanned", + "fieldname": "sort_merge_passes_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Avg Rows Scanned", + "label": "Sort Merge Passes Count (Billion)", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 15:37:32.659433", + "modified": "2024-02-02 13:01:06.218841", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Statement Analysis", diff --git a/press/database_performance_schema/doctype/statements_in_highest_5_percent_by_runtime/statements_in_highest_5_percent_by_runtime.json b/press/database_performance_schema/doctype/statements_in_highest_5_percent_by_runtime/statements_in_highest_5_percent_by_runtime.json index 213ea34490..e332eb4795 100644 --- a/press/database_performance_schema/doctype/statements_in_highest_5_percent_by_runtime/statements_in_highest_5_percent_by_runtime.json +++ b/press/database_performance_schema/doctype/statements_in_highest_5_percent_by_runtime/statements_in_highest_5_percent_by_runtime.json @@ -8,21 +8,21 @@ "field_order": [ "query", "full_table", - "executed_count", - "errors_count", - "warnings_count", - "total_time", - "max_time", - "avg_time", - "rows_sent", - "avg_rows", - "rows_scanned", - "avg_rows_scanned" + "executed_count_billion", + "errors_count_billion", + "warnings_count_billion", + "total_time_billion_ps", + "max_time_billion_ps", + "avg_time_billion_ps", + "rows_sent_count_billion", + "avg_rows_sent_count_billion", + "rows_scanned_count_billion", + "avg_rows_scanned_count_billion" ], "fields": [ { "fieldname": "query", - "fieldtype": "Data", + "fieldtype": "Text", "in_list_view": 1, "in_preview": 1, "label": "Query", @@ -37,90 +37,90 @@ "read_only": 1 }, { - "fieldname": "executed_count", - "fieldtype": "Int", + "fieldname": "executed_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Executed Count", + "label": "Executed Count (Billion)", "read_only": 1 }, { - "fieldname": "errors_count", - "fieldtype": "Int", + "fieldname": "errors_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Errors Count", + "label": "Errors Count (Billion)", "read_only": 1 }, { - "fieldname": "warnings_count", - "fieldtype": "Int", + "fieldname": "warnings_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Warnings Count", + "label": "Warnings Count (Billion)", "read_only": 1 }, { - "fieldname": "total_time", + "fieldname": "total_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Total Time (us)", + "label": "Total Time (billion ps)", "read_only": 1 }, { - "fieldname": "max_time", + "fieldname": "max_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Max Time (us)", + "label": "Max Time (billion ps)", "read_only": 1 }, { - "fieldname": "avg_time", + "fieldname": "avg_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Avg Time (us)", + "label": "Avg Time (billion ps)", "read_only": 1 }, { - "fieldname": "rows_sent", - "fieldtype": "Int", + "fieldname": "rows_sent_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Rows Sent", + "label": "Rows Sent Count (Billion)", "read_only": 1 }, { - "fieldname": "avg_rows", + "fieldname": "avg_rows_sent_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Avg Rows", + "label": "Avg Rows Sent Count (Billion)", "read_only": 1 }, { - "fieldname": "rows_scanned", - "fieldtype": "Int", + "fieldname": "rows_scanned_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Rows Scanned", + "label": "Rows Scanned Count (billion)", "read_only": 1 }, { - "fieldname": "avg_rows_scanned", + "fieldname": "avg_rows_scanned_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Avg Rows Scanned", + "label": "Avg Rows Scanned Count (Billion)", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 15:38:29.467507", + "modified": "2024-02-02 13:14:37.622791", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Statements in Highest 5 Percent by Runtime", diff --git a/press/database_performance_schema/doctype/statements_using_temp_tables/statements_using_temp_tables.json b/press/database_performance_schema/doctype/statements_using_temp_tables/statements_using_temp_tables.json index f3342b32ef..424a4ce0e8 100644 --- a/press/database_performance_schema/doctype/statements_using_temp_tables/statements_using_temp_tables.json +++ b/press/database_performance_schema/doctype/statements_using_temp_tables/statements_using_temp_tables.json @@ -6,11 +6,11 @@ "engine": "InnoDB", "field_order": [ "query", - "executed_count", - "tmp_tables_in_memory", - "tmp_tables_in_disk", + "executed_count_billion", + "tmp_tables_in_memory_count_billion", + "tmp_tables_in_disk_count_billion", "avg_tmp_tables_per_query", - "percent_tmp_tables_to_disk" + "tmp_tables_to_disk_percent" ], "fields": [ { @@ -22,39 +22,39 @@ "read_only": 1 }, { - "fieldname": "executed_count", - "fieldtype": "Int", + "fieldname": "avg_tmp_tables_per_query", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Executed Count", + "label": "Avg Tmp Tables Per Query", "read_only": 1 }, { - "fieldname": "tmp_tables_in_memory", - "fieldtype": "Int", + "fieldname": "executed_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Tmp Tables in Memory", + "label": "Executed Count (Billion)", "read_only": 1 }, { - "fieldname": "tmp_tables_in_disk", - "fieldtype": "Int", + "fieldname": "tmp_tables_in_memory_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Tmp Tables in Disk", + "label": "Tmp Tables in Memory (Billion)", "read_only": 1 }, { - "fieldname": "avg_tmp_tables_per_query", + "fieldname": "tmp_tables_in_disk_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Avg Tmp Tables Per Query", + "label": "Tmp Tables in Disk", "read_only": 1 }, { - "fieldname": "percent_tmp_tables_to_disk", + "fieldname": "tmp_tables_to_disk_percent", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, @@ -65,7 +65,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 15:25:39.776832", + "modified": "2024-02-02 13:26:02.475935", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Statements Using Temp Tables", diff --git a/press/database_performance_schema/doctype/statements_with_error_or_warnings/statements_with_error_or_warnings.json b/press/database_performance_schema/doctype/statements_with_error_or_warnings/statements_with_error_or_warnings.json index b743a07b20..25390bd83c 100644 --- a/press/database_performance_schema/doctype/statements_with_error_or_warnings/statements_with_error_or_warnings.json +++ b/press/database_performance_schema/doctype/statements_with_error_or_warnings/statements_with_error_or_warnings.json @@ -7,9 +7,9 @@ "field_order": [ "column_break_onlr", "query", - "executed_count", - "errors_count", - "warnings_count", + "executed_count_billion", + "errors_count_billion", + "warnings_count_billion", "error_percentage", "warning_percentage" ], @@ -20,57 +20,57 @@ }, { "fieldname": "query", - "fieldtype": "Data", + "fieldtype": "Text", "in_list_view": 1, "in_preview": 1, "label": "Query", "read_only": 1 }, { - "fieldname": "executed_count", - "fieldtype": "Int", + "fieldname": "error_percentage", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Executed Count", + "label": "Error Percentage (%)", "read_only": 1 }, { - "fieldname": "errors_count", - "fieldtype": "Int", + "fieldname": "warning_percentage", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Errors Count", + "label": "Warning Percentage (%)", "read_only": 1 }, { - "fieldname": "warnings_count", - "fieldtype": "Int", + "fieldname": "executed_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Warnings Count", + "label": "Executed Count (Billion)", "read_only": 1 }, { - "fieldname": "error_percentage", + "fieldname": "errors_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Error Percentage", + "label": "Errors Count (Billion)", "read_only": 1 }, { - "fieldname": "warning_percentage", + "fieldname": "warnings_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Warning Percentage", + "label": "Warnings Count (Billion)", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 15:12:18.273618", + "modified": "2024-02-02 13:54:50.073180", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Statements With Error or Warnings", diff --git a/press/database_performance_schema/doctype/statements_with_full_table_scans/statements_with_full_table_scans.json b/press/database_performance_schema/doctype/statements_with_full_table_scans/statements_with_full_table_scans.json index 2f8d4fbf14..88e69e4171 100644 --- a/press/database_performance_schema/doctype/statements_with_full_table_scans/statements_with_full_table_scans.json +++ b/press/database_performance_schema/doctype/statements_with_full_table_scans/statements_with_full_table_scans.json @@ -6,57 +6,57 @@ "engine": "InnoDB", "field_order": [ "query", - "executed_count", - "no_index_used_count", - "no_good_index_used_count", + "executed_count_billion", + "no_index_used_count_billion", + "no_good_index_used_count_billion", "no_index_used_percentage" ], "fields": [ { "fieldname": "query", - "fieldtype": "Data", + "fieldtype": "Text", "in_list_view": 1, "in_preview": 1, "label": "Query", "read_only": 1 }, { - "fieldname": "executed_count", - "fieldtype": "Int", + "fieldname": "no_index_used_percentage", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Executed Count", + "label": "No Index Used Percentage (%)", "read_only": 1 }, { - "fieldname": "no_index_used_count", - "fieldtype": "Int", + "fieldname": "executed_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "No Index Used Count", + "label": "Executed Count (Billion)", "read_only": 1 }, { - "fieldname": "no_good_index_used_count", - "fieldtype": "Int", + "fieldname": "no_index_used_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "No Good Index Used Count", + "label": "No Index Used Count (Billion)", "read_only": 1 }, { - "fieldname": "no_index_used_percentage", + "fieldname": "no_good_index_used_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "No Index Used Percentage", + "label": "No Good Index Used Count (Billion)", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 15:19:12.039251", + "modified": "2024-02-02 13:51:05.763457", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Statements With Full Table Scans", diff --git a/press/database_performance_schema/doctype/statements_with_sorting/statements_with_sorting.json b/press/database_performance_schema/doctype/statements_with_sorting/statements_with_sorting.json index f8bbe1c485..1dc6aa3d56 100644 --- a/press/database_performance_schema/doctype/statements_with_sorting/statements_with_sorting.json +++ b/press/database_performance_schema/doctype/statements_with_sorting/statements_with_sorting.json @@ -6,84 +6,84 @@ "engine": "InnoDB", "field_order": [ "query", - "executed_count", - "sort_merge_passes", - "avg_sort_merges", - "sorts_using_scans", - "sort_using_range", - "rows_sorted", - "avg_rows_sorted" + "executed_count_billion", + "sort_merge_passes_count_billionpasses", + "avg_sort_merges_count_billion", + "sorts_using_scans_count_billion", + "sort_using_range_count_billion", + "rows_sorted_count_billion", + "avg_rows_sorted_count_billion" ], "fields": [ { "fieldname": "query", - "fieldtype": "Data", + "fieldtype": "Text", "in_list_view": 1, "in_preview": 1, "label": "Query", "read_only": 1 }, { - "fieldname": "executed_count", - "fieldtype": "Int", + "fieldname": "executed_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Executed Count", + "label": "Executed Count (Billion)", "read_only": 1 }, { - "fieldname": "sort_merge_passes", - "fieldtype": "Int", + "fieldname": "sort_merge_passes_count_billionpasses", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Sort Merge Passes", + "label": "Sort Merge Passes (Billion)", "read_only": 1 }, { - "fieldname": "avg_sort_merges", + "fieldname": "avg_sort_merges_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Avg Sort Merges", + "label": "Avg Sort Merges Count (Billion)", "read_only": 1 }, { - "fieldname": "sorts_using_scans", - "fieldtype": "Int", + "fieldname": "sorts_using_scans_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Sorts Using Scans", + "label": "Sorts Using Scans Count (Billion)", "read_only": 1 }, { - "fieldname": "sort_using_range", - "fieldtype": "Int", + "fieldname": "sort_using_range_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Sort Using Range", + "label": "Sort Using Range Count (Billion)", "read_only": 1 }, { - "fieldname": "rows_sorted", - "fieldtype": "Int", + "fieldname": "rows_sorted_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Rows Sorted", + "label": "Rows Sorted Count (Billion)", "read_only": 1 }, { - "fieldname": "avg_rows_sorted", + "fieldname": "avg_rows_sorted_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Avg Rows Sorted", + "label": "Avg Rows Sorted Count (Billion)", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 15:22:47.842846", + "modified": "2024-02-02 13:48:55.851242", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Statements With Sorting", diff --git a/press/database_performance_schema/doctype/tables_with_full_table_scans/tables_with_full_table_scans.json b/press/database_performance_schema/doctype/tables_with_full_table_scans/tables_with_full_table_scans.json index 3d8605cb12..50b088a6da 100644 --- a/press/database_performance_schema/doctype/tables_with_full_table_scans/tables_with_full_table_scans.json +++ b/press/database_performance_schema/doctype/tables_with_full_table_scans/tables_with_full_table_scans.json @@ -7,8 +7,7 @@ "field_order": [ "schema", "object", - "full_scanned_rows", - "time_us" + "full_scanned_rows_count_billion" ], "fields": [ { @@ -28,26 +27,18 @@ "read_only": 1 }, { - "fieldname": "full_scanned_rows", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Full Scanned Rows", - "read_only": 1 - }, - { - "fieldname": "time_us", + "fieldname": "full_scanned_rows_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Time (us)", + "label": "Full Scanned Rows Count (Billion)", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 13:09:25.052904", + "modified": "2024-02-02 14:39:58.183802", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Tables with Full Table Scans", diff --git a/press/database_performance_schema/doctype/top_file_io_activity_report/top_file_io_activity_report.json b/press/database_performance_schema/doctype/top_file_io_activity_report/top_file_io_activity_report.json index 8a86f8c25a..b10a8ffd29 100644 --- a/press/database_performance_schema/doctype/top_file_io_activity_report/top_file_io_activity_report.json +++ b/press/database_performance_schema/doctype/top_file_io_activity_report/top_file_io_activity_report.json @@ -6,20 +6,20 @@ "engine": "InnoDB", "field_order": [ "file", - "total_io", + "total_io_mb", "write_percentage", "read_io_info_section", - "read_requests", + "read_count_billion", "column_break_ydlk", - "total_read_io", + "total_read_io_mb", "column_break_vrkh", - "avg_read_io", + "avg_read_io_mb", "write_io_info_section", - "write_requests", + "write_count_billion", "column_break_jlxu", - "total_write_io", + "total_write_io_mb", "column_break_vfzt", - "avg_write_io" + "avg_write_io_mb" ], "fields": [ { @@ -30,15 +30,6 @@ "label": "File", "read_only": 1 }, - { - "columns": 1, - "fieldname": "total_io", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Total IO (MB)", - "read_only": 1 - }, { "columns": 1, "fieldname": "write_percentage", @@ -54,85 +45,94 @@ "label": "Read IO Info" }, { - "columns": 1, - "fieldname": "read_requests", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Read Requests", - "read_only": 1 + "fieldname": "column_break_ydlk", + "fieldtype": "Column Break" }, { - "fieldname": "column_break_ydlk", + "fieldname": "column_break_vrkh", + "fieldtype": "Column Break" + }, + { + "fieldname": "write_io_info_section", + "fieldtype": "Section Break", + "label": "Write IO Info" + }, + { + "fieldname": "column_break_jlxu", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_vfzt", "fieldtype": "Column Break" }, { "columns": 1, - "fieldname": "total_read_io", + "fieldname": "total_io_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Total Read IO (MB)", + "label": "Total IO (MB)", "read_only": 1 }, { - "fieldname": "column_break_vrkh", - "fieldtype": "Column Break" + "columns": 1, + "fieldname": "total_read_io_mb", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Read IO (MB)", + "read_only": 1 }, { "columns": 1, - "fieldname": "avg_read_io", + "fieldname": "avg_read_io_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, "label": "Avg Read IO (MB)", "read_only": 1 }, - { - "fieldname": "write_io_info_section", - "fieldtype": "Section Break", - "label": "Write IO Info" - }, { "columns": 1, - "fieldname": "write_requests", - "fieldtype": "Int", + "fieldname": "total_write_io_mb", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Write Requests", + "label": "Total Write IO (MB)", "read_only": 1 }, - { - "fieldname": "column_break_jlxu", - "fieldtype": "Column Break" - }, { "columns": 1, - "fieldname": "total_write_io", + "fieldname": "avg_write_io_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Total Write IO (MB)", + "label": "Avg Write IO (MB)", "read_only": 1 }, { - "fieldname": "column_break_vfzt", - "fieldtype": "Column Break" + "columns": 1, + "fieldname": "read_count_billion", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Read Count (Billion)", + "read_only": 1 }, { "columns": 1, - "fieldname": "avg_write_io", + "fieldname": "write_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Avg Write IO (MB)", + "label": "Write Count (Billion)", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 12:46:40.609722", + "modified": "2024-02-02 12:33:44.255385", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Top File IO Activity Report", diff --git a/press/database_performance_schema/doctype/top_io_by_event_category/top_io_by_event_category.json b/press/database_performance_schema/doctype/top_io_by_event_category/top_io_by_event_category.json index d53ae71082..27fe6d220d 100644 --- a/press/database_performance_schema/doctype/top_io_by_event_category/top_io_by_event_category.json +++ b/press/database_performance_schema/doctype/top_io_by_event_category/top_io_by_event_category.json @@ -6,29 +6,29 @@ "engine": "InnoDB", "field_order": [ "event_type", - "total_requested", + "total_requested_mb", "section_break_aszx", - "total_io", + "total_count_billion", "column_break_vcjy", - "read_count", + "read_count_billion", "column_break_owft", - "write_count", + "write_count_billion", "section_break_xlar", - "total_read", + "total_read_mb", "column_break_smtc", - "avg_read", + "avg_read_mb", "section_break_cwqk", - "total_written", + "total_written_mb", "column_break_mwut", - "avg_written", + "avg_written_mb", "section_break_tjsh", - "total_time", + "total_time_billion_ps", "column_break_iaaq", - "min_time", + "min_time_billion_ps", "column_break_hevz", - "avg_time", + "avg_time_billion_ps", "column_break_nqej", - "max_time" + "max_time_billion_ps" ], "fields": [ { @@ -39,163 +39,163 @@ "label": "Event Type", "read_only": 1 }, + { + "fieldname": "section_break_aszx", + "fieldtype": "Section Break" + }, + { + "fieldname": "column_break_vcjy", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_owft", + "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_xlar", + "fieldtype": "Section Break" + }, + { + "fieldname": "column_break_smtc", + "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_cwqk", + "fieldtype": "Section Break" + }, + { + "fieldname": "column_break_mwut", + "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_tjsh", + "fieldtype": "Section Break" + }, + { + "fieldname": "column_break_iaaq", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_hevz", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_nqej", + "fieldtype": "Column Break" + }, { "columns": 1, - "fieldname": "total_requested", + "fieldname": "total_requested_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, "label": "Total Requested (MB)", "read_only": 1 }, - { - "fieldname": "section_break_aszx", - "fieldtype": "Section Break" - }, { "columns": 1, - "fieldname": "total_io", + "fieldname": "total_count_billion", "fieldtype": "Int", "in_list_view": 1, "in_preview": 1, - "label": "Total IO", + "label": "Total Count (Billion)", "read_only": 1 }, - { - "fieldname": "column_break_vcjy", - "fieldtype": "Column Break" - }, { "columns": 1, - "fieldname": "read_count", + "fieldname": "read_count_billion", "fieldtype": "Int", "in_list_view": 1, "in_preview": 1, - "label": "Read Count", + "label": "Read Count (Billion)", "read_only": 1 }, - { - "fieldname": "column_break_owft", - "fieldtype": "Column Break" - }, { "columns": 1, - "fieldname": "write_count", + "fieldname": "write_count_billion", "fieldtype": "Int", "in_list_view": 1, "in_preview": 1, - "label": "Write Count", + "label": "Write Count (Billion)", "read_only": 1 }, - { - "fieldname": "section_break_xlar", - "fieldtype": "Section Break" - }, { "columns": 1, - "fieldname": "total_read", + "fieldname": "total_read_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Total Read", + "label": "Total Read (MB)", "read_only": 1 }, - { - "fieldname": "column_break_smtc", - "fieldtype": "Column Break" - }, { "columns": 1, - "fieldname": "avg_read", + "fieldname": "avg_read_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Avg Read", + "label": "Avg Read (MB)", "read_only": 1 }, - { - "fieldname": "section_break_cwqk", - "fieldtype": "Section Break" - }, { "columns": 1, - "fieldname": "total_written", + "fieldname": "total_written_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Total Written", + "label": "Total Written (MB)", "read_only": 1 }, - { - "fieldname": "column_break_mwut", - "fieldtype": "Column Break" - }, { "columns": 1, - "fieldname": "avg_written", + "fieldname": "avg_written_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Avg Written", + "label": "Avg Written (MB)", "read_only": 1 }, - { - "fieldname": "section_break_tjsh", - "fieldtype": "Section Break" - }, { "columns": 1, - "fieldname": "total_time", + "fieldname": "total_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Total Time (us)", + "label": "Total Time (billion ps)", "read_only": 1 }, - { - "fieldname": "column_break_iaaq", - "fieldtype": "Column Break" - }, { "columns": 1, - "fieldname": "min_time", + "fieldname": "min_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Min Time (us)", + "label": "Min Time (billion ps)", "read_only": 1 }, - { - "fieldname": "column_break_hevz", - "fieldtype": "Column Break" - }, { "columns": 1, - "fieldname": "avg_time", + "fieldname": "avg_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Avg Time (us)", + "label": "Avg Time (billion ps)", "read_only": 1 }, - { - "fieldname": "column_break_nqej", - "fieldtype": "Column Break" - }, { "columns": 1, - "fieldname": "max_time", + "fieldname": "max_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Max Time (us)", + "label": "Max Time (billion ps)", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 12:46:54.870449", + "modified": "2024-02-02 12:40:25.018930", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Top IO by Event Category", diff --git a/press/database_performance_schema/doctype/top_io_by_file_by_time/top_io_by_file_by_time.json b/press/database_performance_schema/doctype/top_io_by_file_by_time/top_io_by_file_by_time.json index 8ae5c29e6d..e5cedd7bc3 100644 --- a/press/database_performance_schema/doctype/top_io_by_file_by_time/top_io_by_file_by_time.json +++ b/press/database_performance_schema/doctype/top_io_by_file_by_time/top_io_by_file_by_time.json @@ -7,21 +7,21 @@ "field_order": [ "file", "io_count_section", - "total_io", + "total_count_billion", "column_break_xxhq", - "read_requests", + "read_count_billion", "column_break_rzrc", - "write_requests", + "write_count_billion", "column_break_qckc", - "misc_requests", + "misc_count_billion", "request_time_section", - "total_time", + "total_time_billion_ps", "column_break_xkyd", - "read_time", + "read_time_billion_ps", "column_break_bmbz", - "write_time", + "write_time_billion_ps", "column_break_hfre", - "misc_time" + "misc_time_billion_ps" ], "fields": [ { @@ -38,111 +38,111 @@ "label": "IO Count" }, { - "columns": 1, - "fieldname": "total_io", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Total IO Count", - "read_only": 1 + "fieldname": "column_break_xxhq", + "fieldtype": "Column Break" }, { - "fieldname": "column_break_xxhq", + "fieldname": "column_break_rzrc", "fieldtype": "Column Break" }, { - "columns": 1, - "fieldname": "read_requests", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Read Request Count", - "read_only": 1 + "fieldname": "column_break_qckc", + "fieldtype": "Column Break" }, { - "fieldname": "column_break_rzrc", + "fieldname": "request_time_section", + "fieldtype": "Section Break", + "label": "Request Time" + }, + { + "fieldname": "column_break_xkyd", "fieldtype": "Column Break" }, { - "columns": 1, - "fieldname": "write_requests", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Write Request Count", - "read_only": 1 + "fieldname": "column_break_bmbz", + "fieldtype": "Column Break" }, { - "fieldname": "column_break_qckc", + "fieldname": "column_break_hfre", "fieldtype": "Column Break" }, { "columns": 1, - "fieldname": "misc_requests", - "fieldtype": "Int", + "fieldname": "total_time_billion_ps", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Misc Request Count", + "label": "Total Time (billion ps)", "read_only": 1 }, - { - "fieldname": "request_time_section", - "fieldtype": "Section Break", - "label": "Request Time" - }, { "columns": 1, - "fieldname": "total_time", + "fieldname": "read_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Total Time (us)", + "label": "Read Time (us)", "read_only": 1 }, { - "fieldname": "column_break_xkyd", - "fieldtype": "Column Break" + "columns": 1, + "fieldname": "write_time_billion_ps", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Write Time (billion ps)", + "read_only": 1 }, { "columns": 1, - "fieldname": "read_time", + "fieldname": "misc_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Read Time (us)", + "label": "Misc Time (billion ps)", "read_only": 1 }, { - "fieldname": "column_break_bmbz", - "fieldtype": "Column Break" + "columns": 1, + "fieldname": "total_count_billion", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Count (Billion)", + "read_only": 1 }, { "columns": 1, - "fieldname": "write_time", + "fieldname": "read_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Write Time (us)", + "label": "Read Count (Billion)", "read_only": 1 }, { - "fieldname": "column_break_hfre", - "fieldtype": "Column Break" + "columns": 1, + "fieldname": "write_count_billion", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Write Count (Billion)", + "read_only": 1 }, { "columns": 1, - "fieldname": "misc_time", + "fieldname": "misc_count_billion", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Misc Time (us)", + "label": "Misc Count (Billion)", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 12:46:47.759517", + "modified": "2024-02-02 12:37:21.646968", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Top IO by File by Time", diff --git a/press/database_performance_schema/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.json b/press/database_performance_schema/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.json index 81739129a1..5bff60c719 100644 --- a/press/database_performance_schema/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.json +++ b/press/database_performance_schema/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.json @@ -7,31 +7,31 @@ "field_order": [ "event_type", "section_break_ykxd", - "total_io", + "total_count_billion", "column_break_eqhz", - "read_count", + "read_count_billion", "column_break_kkkj", - "write_count", + "write_count_billion", "section_break_ebwe", - "total_read", + "total_read_mb", "column_break_nsap", - "avg_read", + "avg_read_mb", "section_break_nygy", - "total_write", + "total_written_mb", "column_break_mvhi", - "avg_write", + "avg_written_mb", "section_break_mcgu", - "total_time", + "total_time_billion_ps", "column_break_vzzx", - "avg_time", + "avg_time_billion_ps", "column_break_hqbj", - "max_time", + "max_time_billion_ps", "column_break_oflx", - "read_time", + "read_time_billion_ps", "column_break_lyxq", - "write_time", + "write_time_billion_ps", "column_break_vbds", - "misc_time" + "misc_time_billion_ps" ], "fields": [ { @@ -44,177 +44,178 @@ }, { "fieldname": "section_break_ykxd", + "fieldtype": "Section Break", + "label": "Requests Count" + }, + { + "fieldname": "column_break_eqhz", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_kkkj", + "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_ebwe", "fieldtype": "Section Break" }, { - "fieldname": "total_io", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Total IO", - "read_only": 1 + "fieldname": "column_break_nsap", + "fieldtype": "Column Break" }, { - "fieldname": "column_break_eqhz", + "fieldname": "section_break_nygy", + "fieldtype": "Section Break" + }, + { + "fieldname": "column_break_mvhi", + "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_mcgu", + "fieldtype": "Section Break" + }, + { + "fieldname": "column_break_vzzx", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_hqbj", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_oflx", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_lyxq", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_vbds", "fieldtype": "Column Break" }, { "columns": 1, - "fieldname": "read_count", - "fieldtype": "Int", + "fieldname": "read_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Read Count", + "label": "Read Count (Billion)", "read_only": 1 }, - { - "fieldname": "column_break_kkkj", - "fieldtype": "Column Break" - }, { "columns": 1, - "fieldname": "write_count", - "fieldtype": "Int", + "fieldname": "write_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Write Count", + "label": "Write Count (Billion)", "read_only": 1 }, { - "fieldname": "section_break_ebwe", - "fieldtype": "Section Break" + "fieldname": "total_count_billion", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Count (Billion)", + "read_only": 1 }, { "columns": 1, - "fieldname": "total_read", + "fieldname": "total_read_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, "label": "Total Read (MB)", "read_only": 1 }, - { - "fieldname": "column_break_nsap", - "fieldtype": "Column Break" - }, { "columns": 1, - "fieldname": "avg_read", + "fieldname": "avg_read_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, "label": "Avg Read (MB)", "read_only": 1 }, - { - "fieldname": "section_break_nygy", - "fieldtype": "Section Break" - }, { "columns": 1, - "fieldname": "total_write", + "fieldname": "total_written_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Total Write (MB)", + "label": "Total Written (MB)", "read_only": 1 }, - { - "fieldname": "column_break_mvhi", - "fieldtype": "Column Break" - }, { "columns": 1, - "fieldname": "avg_write", + "fieldname": "avg_written_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Avg Write (MB)", + "label": "Avg Written (MB)", "read_only": 1 }, - { - "fieldname": "section_break_mcgu", - "fieldtype": "Section Break" - }, { "columns": 1, - "fieldname": "total_time", + "fieldname": "total_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Total Time (us)", + "label": "Total Time (billion ps)", "read_only": 1 }, - { - "fieldname": "column_break_vzzx", - "fieldtype": "Column Break" - }, { "columns": 1, - "fieldname": "avg_time", + "fieldname": "avg_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Avg Time (us)", + "label": "Avg Time (billion ps)", "read_only": 1 }, - { - "fieldname": "column_break_hqbj", - "fieldtype": "Column Break" - }, { "columns": 1, - "fieldname": "max_time", + "fieldname": "max_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Max Time (us)", + "label": "Max Time (billion ps)", "read_only": 1 }, - { - "fieldname": "column_break_oflx", - "fieldtype": "Column Break" - }, { "columns": 1, - "fieldname": "read_time", + "fieldname": "read_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Read Time (us)", + "label": "Read Time (billion ps)", "read_only": 1 }, - { - "fieldname": "column_break_lyxq", - "fieldtype": "Column Break" - }, { "columns": 1, - "fieldname": "write_time", + "fieldname": "write_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Write Time (us)", + "label": "Write Time (billion ps)", "read_only": 1 }, - { - "fieldname": "column_break_vbds", - "fieldtype": "Column Break" - }, { "columns": 1, - "fieldname": "misc_time", + "fieldname": "misc_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Misc Time (us)", + "label": "Misc Time (billion ps)", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 12:47:00.628010", + "modified": "2024-02-02 12:51:13.028305", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Top IO in Time by Event Category", diff --git a/press/database_performance_schema/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.json b/press/database_performance_schema/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.json index 65b918ff10..144e7242fd 100644 --- a/press/database_performance_schema/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.json +++ b/press/database_performance_schema/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.json @@ -11,15 +11,15 @@ "column_break_wpmq", "process_list_id", "section_break_jvyi", - "total_io", + "total_count_billion", "section_break_fkmu", - "total_time", + "total_time_billion_ps", "column_break_wwye", - "avg_time", + "avg_time_billion_ps", "column_break_qbkg", - "min_time", + "min_time_billion_ps", "column_break_qicb", - "max_time" + "max_time_billion_ps" ], "fields": [ { @@ -60,15 +60,6 @@ "fieldname": "section_break_jvyi", "fieldtype": "Section Break" }, - { - "columns": 1, - "fieldname": "total_io", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Total IO", - "read_only": 1 - }, { "fieldname": "section_break_fkmu", "fieldtype": "Section Break" @@ -87,45 +78,55 @@ }, { "columns": 1, - "fieldname": "total_time", + "description": "The total number of I/O events for the thread.\n\n", + "fieldname": "total_count_billion", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Total Count (Billion)", + "read_only": 1 + }, + { + "columns": 1, + "fieldname": "total_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Total Time (us)", + "label": "Total Time (billion ps)", "read_only": 1 }, { "columns": 1, - "fieldname": "avg_time", + "fieldname": "avg_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Avg Time (us)", + "label": "Avg Time (billion ps)", "read_only": 1 }, { "columns": 1, - "fieldname": "min_time", + "fieldname": "min_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Min Time (us)", + "label": "Min Time (billion ps)", "read_only": 1 }, { "columns": 1, - "fieldname": "max_time", + "fieldname": "max_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Max Time (us)", + "label": "Max Time (billion ps)", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-02-01 12:15:22.724869", + "modified": "2024-02-02 12:54:24.007112", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Top IO Time by User Thread", diff --git a/press/database_performance_schema/doctype/top_memory_by_event/top_memory_by_event.json b/press/database_performance_schema/doctype/top_memory_by_event/top_memory_by_event.json index 44f0cf73a9..6372dfd2e5 100644 --- a/press/database_performance_schema/doctype/top_memory_by_event/top_memory_by_event.json +++ b/press/database_performance_schema/doctype/top_memory_by_event/top_memory_by_event.json @@ -6,12 +6,12 @@ "engine": "InnoDB", "field_order": [ "event_type", - "count", - "max_count", - "memory", - "avg_memory", - "max_memory", - "max_avg_memory" + "count_billion", + "max_count_billion", + "memory_mb", + "avg_memory_mb", + "max_memory_mb", + "max_avg_memory_mb" ], "fields": [ { @@ -25,25 +25,25 @@ }, { "columns": 1, - "fieldname": "count", - "fieldtype": "Int", + "fieldname": "count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Count", + "label": "Count (Billion)", "read_only": 1 }, { "columns": 1, - "fieldname": "max_count", - "fieldtype": "Int", + "fieldname": "max_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Max Count", + "label": "Max Count (Billion)", "read_only": 1 }, { "columns": 1, - "fieldname": "memory", + "fieldname": "memory_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, @@ -52,7 +52,7 @@ }, { "columns": 1, - "fieldname": "avg_memory", + "fieldname": "avg_memory_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, @@ -61,7 +61,7 @@ }, { "columns": 1, - "fieldname": "max_memory", + "fieldname": "max_memory_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, @@ -70,7 +70,7 @@ }, { "columns": 1, - "fieldname": "max_avg_memory", + "fieldname": "max_avg_memory_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, @@ -81,7 +81,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 12:46:10.194218", + "modified": "2024-02-02 12:14:45.026369", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Top Memory By Event", diff --git a/press/database_performance_schema/doctype/top_memory_by_host/top_memory_by_host.json b/press/database_performance_schema/doctype/top_memory_by_host/top_memory_by_host.json index fde087d36a..5282379c6d 100644 --- a/press/database_performance_schema/doctype/top_memory_by_host/top_memory_by_host.json +++ b/press/database_performance_schema/doctype/top_memory_by_host/top_memory_by_host.json @@ -6,11 +6,11 @@ "engine": "InnoDB", "field_order": [ "host", - "count", - "memory", - "avg_memory", - "total_memory", - "max_memory" + "count_billion", + "memory_mb", + "avg_memory_mb", + "total_memory_mb", + "max_memory_mb" ], "fields": [ { @@ -23,16 +23,16 @@ }, { "columns": 1, - "fieldname": "count", - "fieldtype": "Int", + "fieldname": "count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Count", + "label": "Count (Billion)", "read_only": 1 }, { "columns": 1, - "fieldname": "memory", + "fieldname": "memory_mb", "fieldtype": "Data", "in_list_view": 1, "in_preview": 1, @@ -41,7 +41,7 @@ }, { "columns": 1, - "fieldname": "avg_memory", + "fieldname": "avg_memory_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, @@ -50,7 +50,7 @@ }, { "columns": 1, - "fieldname": "total_memory", + "fieldname": "total_memory_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, @@ -59,7 +59,7 @@ }, { "columns": 1, - "fieldname": "max_memory", + "fieldname": "max_memory_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, @@ -70,7 +70,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 12:46:26.406050", + "modified": "2024-02-02 12:13:13.129481", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Top Memory By Host", diff --git a/press/database_performance_schema/doctype/top_memory_by_thread/top_memory_by_thread.json b/press/database_performance_schema/doctype/top_memory_by_thread/top_memory_by_thread.json index 8c9d9dd71f..a927b45486 100644 --- a/press/database_performance_schema/doctype/top_memory_by_thread/top_memory_by_thread.json +++ b/press/database_performance_schema/doctype/top_memory_by_thread/top_memory_by_thread.json @@ -7,11 +7,11 @@ "field_order": [ "thread_id", "user", - "count", - "memory", - "avg_memory", - "max_memory", - "total_memory" + "count_billion", + "memory_mb", + "avg_memory_mb", + "max_memory_mb", + "total_memory_mb" ], "fields": [ { @@ -33,16 +33,16 @@ }, { "columns": 1, - "fieldname": "count", - "fieldtype": "Int", + "fieldname": "count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Count", + "label": "Count (Billion)", "read_only": 1 }, { "columns": 1, - "fieldname": "memory", + "fieldname": "memory_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, @@ -51,7 +51,7 @@ }, { "columns": 1, - "fieldname": "avg_memory", + "fieldname": "avg_memory_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, @@ -60,7 +60,7 @@ }, { "columns": 1, - "fieldname": "max_memory", + "fieldname": "max_memory_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, @@ -69,7 +69,7 @@ }, { "columns": 1, - "fieldname": "total_memory", + "fieldname": "total_memory_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, @@ -80,7 +80,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 12:46:33.088342", + "modified": "2024-02-02 12:16:13.600594", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Top Memory By Thread", diff --git a/press/database_performance_schema/doctype/top_memory_by_user/top_memory_by_user.json b/press/database_performance_schema/doctype/top_memory_by_user/top_memory_by_user.json index 6d10f4d9b5..731e34bc54 100644 --- a/press/database_performance_schema/doctype/top_memory_by_user/top_memory_by_user.json +++ b/press/database_performance_schema/doctype/top_memory_by_user/top_memory_by_user.json @@ -7,7 +7,7 @@ "field_order": [ "section_break_rpkk", "user", - "count", + "count_billion", "memory", "avg_memory", "total_memory", @@ -22,15 +22,6 @@ "label": "User", "read_only": 1 }, - { - "columns": 1, - "fieldname": "count", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Count", - "read_only": 1 - }, { "columns": 1, "fieldname": "memory", @@ -70,12 +61,21 @@ { "fieldname": "section_break_rpkk", "fieldtype": "Section Break" + }, + { + "columns": 1, + "fieldname": "count_billion", + "fieldtype": "Float", + "in_list_view": 1, + "in_preview": 1, + "label": "Count (Billion)", + "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 15:39:50.494418", + "modified": "2024-02-02 12:03:31.601266", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Top Memory By User", diff --git a/press/database_performance_schema/doctype/user_resource_use_io_statistics/user_resource_use_io_statistics.json b/press/database_performance_schema/doctype/user_resource_use_io_statistics/user_resource_use_io_statistics.json index e287dcd7c3..9d6fd51204 100644 --- a/press/database_performance_schema/doctype/user_resource_use_io_statistics/user_resource_use_io_statistics.json +++ b/press/database_performance_schema/doctype/user_resource_use_io_statistics/user_resource_use_io_statistics.json @@ -7,9 +7,9 @@ "field_order": [ "user", "event_type", - "total_io", - "total_time", - "max_time" + "total_io_count_billion", + "total_time_billion_ps", + "max_time_billion_ps" ], "fields": [ { @@ -21,42 +21,42 @@ "read_only": 1 }, { - "fieldname": "total_io", - "fieldtype": "Int", + "fieldname": "event_type", + "fieldtype": "Data", "in_list_view": 1, "in_preview": 1, - "label": "Total IO", + "label": "IO Event Type", "read_only": 1 }, { - "fieldname": "event_type", - "fieldtype": "Data", + "fieldname": "total_io_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "IO Event Type", + "label": "Total IO Count (Billion)", "read_only": 1 }, { - "fieldname": "total_time", + "fieldname": "total_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Total Time (us)", + "label": "Total Time (billion ps)", "read_only": 1 }, { - "fieldname": "max_time", + "fieldname": "max_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Max Time (us)", + "label": "Max Time (billion ps)", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 14:06:08.553204", + "modified": "2024-02-02 15:37:25.369595", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "User Resource Use IO Statistics", diff --git a/press/database_performance_schema/doctype/user_resource_use_overview/user_resource_use_overview.json b/press/database_performance_schema/doctype/user_resource_use_overview/user_resource_use_overview.json index 30ffa7d61d..1babc01ad8 100644 --- a/press/database_performance_schema/doctype/user_resource_use_overview/user_resource_use_overview.json +++ b/press/database_performance_schema/doctype/user_resource_use_overview/user_resource_use_overview.json @@ -6,17 +6,17 @@ "engine": "InnoDB", "field_order": [ "user", - "statements", - "statement_total_time", - "statement_avg_time", - "table_scans", - "file_ios", - "total_file_io_time", - "current_connections", - "total_connections", - "unique_hosts", - "current_memory", - "total_memory" + "statements_count_billion", + "statement_total_time_billion_ps", + "statement_avg_time_billion_ps", + "table_scans_count_billion", + "file_io_count_billion", + "total_file_io_time_billion_ps", + "current_connections_count", + "total_connections_count", + "unique_hosts_count", + "current_memory_mb", + "total_memory_mb" ], "fields": [ { @@ -28,98 +28,98 @@ "read_only": 1 }, { - "fieldname": "statements", - "fieldtype": "Int", + "fieldname": "statements_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Statements", + "label": "Statements Count (Billion)", "read_only": 1 }, { - "fieldname": "table_scans", - "fieldtype": "Int", + "fieldname": "statement_total_time_billion_ps", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Table Scans", + "label": "Statement Total Time (billion ps)", "read_only": 1 }, { - "fieldname": "file_ios", - "fieldtype": "Int", + "fieldname": "statement_avg_time_billion_ps", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "File IOs", + "label": "Statement Avg Time(billion ps)", "read_only": 1 }, { - "fieldname": "current_connections", - "fieldtype": "Int", + "fieldname": "table_scans_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Current Connections", + "label": "Table Scans Count (billion)", "read_only": 1 }, { - "fieldname": "total_connections", - "fieldtype": "Int", + "fieldname": "file_io_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Total Connections", + "label": "File IO Count (Billion)", "read_only": 1 }, { - "fieldname": "unique_hosts", - "fieldtype": "Int", + "fieldname": "total_file_io_time_billion_ps", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Unique Hosts", + "label": "Total File IO Time (billion ps)", "read_only": 1 }, { - "fieldname": "statement_total_time", + "fieldname": "current_connections_count", "fieldtype": "Int", "in_list_view": 1, "in_preview": 1, - "label": "Statement Total Time (us)", + "label": "Current Connections Count", "read_only": 1 }, { - "fieldname": "statement_avg_time", + "fieldname": "unique_hosts_count", "fieldtype": "Int", "in_list_view": 1, "in_preview": 1, - "label": "Statement Avg Time (us)", + "label": "Unique Hosts Count", "read_only": 1 }, { - "fieldname": "total_file_io_time", + "fieldname": "current_memory_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Total File IO Time (us)", + "label": "Current Memory (MB)", "read_only": 1 }, { - "fieldname": "current_memory", + "fieldname": "total_memory_mb", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Current Memory (MB)", + "label": "Total Memory (MB)", "read_only": 1 }, { - "fieldname": "total_memory", - "fieldtype": "Float", + "fieldname": "total_connections_count", + "fieldtype": "Int", "in_list_view": 1, "in_preview": 1, - "label": "Total Memory (MB)", + "label": "Total Connections Count", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 14:02:30.428670", + "modified": "2024-02-02 15:13:28.060713", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "User Resource Use Overview", diff --git a/press/database_performance_schema/doctype/user_resource_use_statement_statistics/user_resource_use_statement_statistics.json b/press/database_performance_schema/doctype/user_resource_use_statement_statistics/user_resource_use_statement_statistics.json index 5858b9d09a..5f9e9785c0 100644 --- a/press/database_performance_schema/doctype/user_resource_use_statement_statistics/user_resource_use_statement_statistics.json +++ b/press/database_performance_schema/doctype/user_resource_use_statement_statistics/user_resource_use_statement_statistics.json @@ -7,15 +7,15 @@ "field_order": [ "user", "statement", - "total_occurances", - "total_time_us", - "max_time_us", - "lock_time_us", - "cpu_time_us", - "rows_sent", - "rows_examined", - "rows_affected", - "full_scans" + "total_occurances_count_billion", + "total_time_billion_ps", + "max_time_billion_ps", + "lock_time_billion_ps", + "cpu_time_billion_ps", + "rows_sent_count_billion", + "rows_examined_count_billion", + "rows_affected_count_billion", + "full_scans_count_billion" ], "fields": [ { @@ -35,82 +35,82 @@ "read_only": 1 }, { - "fieldname": "total_occurances", - "fieldtype": "Int", + "fieldname": "total_occurances_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Total Occurances", + "label": "Total Occurances Count (Billion)", "read_only": 1 }, { - "fieldname": "total_time_us", + "fieldname": "total_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Total Time (us)", + "label": "Total Time (billion ps)", "read_only": 1 }, { - "fieldname": "max_time_us", + "fieldname": "max_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Max Time (us)", + "label": "Max Time (billion ps)", "read_only": 1 }, { - "fieldname": "lock_time_us", + "fieldname": "lock_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Lock Time (us)", + "label": "Lock Time (billion ps)", "read_only": 1 }, { - "fieldname": "cpu_time_us", + "fieldname": "cpu_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "CPU Time (us)", + "label": "CPU Time (billion ps)", "read_only": 1 }, { - "fieldname": "rows_sent", - "fieldtype": "Int", + "fieldname": "rows_sent_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Rows Sent", + "label": "Rows Sent Count (Billion)", "read_only": 1 }, { - "fieldname": "rows_examined", - "fieldtype": "Int", + "fieldname": "rows_examined_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Rows Examined", + "label": "Rows Examined Count (Billion)", "read_only": 1 }, { - "fieldname": "rows_affected", - "fieldtype": "Int", + "fieldname": "rows_affected_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Rows Affected", + "label": "Rows Affected Count (Billion)", "read_only": 1 }, { - "fieldname": "full_scans", - "fieldtype": "Int", + "fieldname": "full_scans_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Full Scans", + "label": "Full Scans Count (Billion)", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 14:10:31.368143", + "modified": "2024-02-02 15:43:08.836358", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "User Resource Use Statement Statistics", diff --git a/press/database_performance_schema/doctype/wait_classes_by_average_time/wait_classes_by_average_time.json b/press/database_performance_schema/doctype/wait_classes_by_average_time/wait_classes_by_average_time.json index 93c4ab0805..e79732614c 100644 --- a/press/database_performance_schema/doctype/wait_classes_by_average_time/wait_classes_by_average_time.json +++ b/press/database_performance_schema/doctype/wait_classes_by_average_time/wait_classes_by_average_time.json @@ -7,11 +7,11 @@ "engine": "InnoDB", "field_order": [ "event_class", - "total_occurances", - "total_time", - "avg_time", - "max_time", - "min_time" + "total_occurances_count_billion", + "total_time_billion_ps", + "avg_time_billion_ps", + "max_time_billion_ps", + "min_time_billion_ps" ], "fields": [ { @@ -23,50 +23,50 @@ "read_only": 1 }, { - "fieldname": "total_occurances", - "fieldtype": "Data", + "fieldname": "total_occurances_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Total Occurances", + "label": "Total Occurances Count (Billion)", "read_only": 1 }, { - "fieldname": "total_time", + "fieldname": "total_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Total Time (us)", + "label": "Total Time (billion ps)", "read_only": 1 }, { - "fieldname": "avg_time", + "fieldname": "avg_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Avg Time (us)", + "label": "Avg Time (billion ps)", "read_only": 1 }, { - "fieldname": "max_time", + "fieldname": "max_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Max Time (us)", + "label": "Max Time (billion ps)", "read_only": 1 }, { - "fieldname": "min_time", + "fieldname": "min_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Min Time (us)", + "label": "Min Time (billion ps)", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 13:51:58.971427", + "modified": "2024-02-02 14:51:21.125618", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Wait Classes by Average Time", diff --git a/press/database_performance_schema/doctype/wait_classes_by_time/wait_classes_by_time.json b/press/database_performance_schema/doctype/wait_classes_by_time/wait_classes_by_time.json index 5d2c8ca1d2..21386bf50b 100644 --- a/press/database_performance_schema/doctype/wait_classes_by_time/wait_classes_by_time.json +++ b/press/database_performance_schema/doctype/wait_classes_by_time/wait_classes_by_time.json @@ -7,11 +7,11 @@ "engine": "InnoDB", "field_order": [ "event_class", - "total_occurances", - "total_time", - "avg_time", - "max_time", - "min_time" + "total_occurances_count_billion", + "total_time_billion_ps", + "avg_time_billion_ps", + "max_time_billion_ps", + "min_time_billion_ps" ], "fields": [ { @@ -23,50 +23,50 @@ "read_only": 1 }, { - "fieldname": "total_occurances", - "fieldtype": "Data", + "fieldname": "total_occurances_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Total Occurances", + "label": "Total Occurances Count (Billion)", "read_only": 1 }, { - "fieldname": "total_time", + "fieldname": "total_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Total Time (us)", + "label": "Total Time (billion ps)", "read_only": 1 }, { - "fieldname": "avg_time", + "fieldname": "avg_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Avg Time (us)", + "label": "Avg Time (billion ps)", "read_only": 1 }, { - "fieldname": "max_time", + "fieldname": "max_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Max Time (us)", + "label": "Max Time (billion ps)", "read_only": 1 }, { - "fieldname": "min_time", + "fieldname": "min_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Min Time (us)", + "label": "Min Time (billion ps)", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 13:50:54.265486", + "modified": "2024-02-02 14:49:44.414929", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Wait Classes by Time", diff --git a/press/database_performance_schema/doctype/waits_by_user_by_time/waits_by_user_by_time.json b/press/database_performance_schema/doctype/waits_by_user_by_time/waits_by_user_by_time.json index 532403b84c..7ed6b3bf45 100644 --- a/press/database_performance_schema/doctype/waits_by_user_by_time/waits_by_user_by_time.json +++ b/press/database_performance_schema/doctype/waits_by_user_by_time/waits_by_user_by_time.json @@ -8,65 +8,65 @@ "field_order": [ "user", "event", - "total_occurances", - "total_time", - "avg_time", - "max_time" + "total_occurances_count_billion", + "total_time_billion_ps", + "avg_time_billion_ps", + "max_time_billion_ps" ], "fields": [ { - "fieldname": "total_occurances", + "fieldname": "user", "fieldtype": "Data", "in_list_view": 1, "in_preview": 1, - "label": "Total Occurances", + "label": "User", "read_only": 1 }, { - "fieldname": "user", + "fieldname": "event", "fieldtype": "Data", "in_list_view": 1, "in_preview": 1, - "label": "User", + "label": "Event", "read_only": 1 }, { - "fieldname": "event", - "fieldtype": "Data", + "fieldname": "total_occurances_count_billion", + "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Event", + "label": "Total Occurances Count (Billion)", "read_only": 1 }, { - "fieldname": "total_time", + "fieldname": "total_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Total Time (us)", + "label": "Total Time (billion ps)", "read_only": 1 }, { - "fieldname": "avg_time", + "fieldname": "avg_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Avg Time (us)", + "label": "Avg Time (billion ps)", "read_only": 1 }, { - "fieldname": "max_time", + "fieldname": "max_time_billion_ps", "fieldtype": "Float", "in_list_view": 1, "in_preview": 1, - "label": "Max Time (us)", + "label": "Max Time (billion ps)", "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-01-31 13:52:35.506954", + "modified": "2024-02-02 14:48:11.082007", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Waits by User by Time", diff --git a/press/press/doctype/database_server/database_server.py b/press/press/doctype/database_server/database_server.py index 1844338e21..6b490eee72 100644 --- a/press/press/doctype/database_server/database_server.py +++ b/press/press/doctype/database_server/database_server.py @@ -709,6 +709,7 @@ def fetch_performance_report(self): "_fetch_performance_report", queue="long", timeout=1200, + now=True ) frappe.msgprint("Performance Schema Report Fetching Started") else: @@ -725,103 +726,104 @@ def _fetch_performance_report(self): for r in reports.get("top_memory_by_user", []): record.append("top_memory_by_user", { "user": r.get("user"), - "count": r.get("current_count_used"), - "memory": self._bytes_to_mb(r.get("current_allocated")), - "avg_memory": self._bytes_to_mb(r.get("current_avg_alloc")), - "total_memory": self._bytes_to_mb(r.get("total_allocated")), - "max_memory": self._bytes_to_mb(r.get("current_max_alloc")), + "count_billion": self._convert_to_billion(r.get("current_count_used")), + "memory_mb": self._bytes_to_mb(r.get("current_allocated")), + "avg_memory_mb": self._bytes_to_mb(r.get("current_avg_alloc")), + "total_memory_mb": self._bytes_to_mb(r.get("total_allocated")), + "max_memory_mb": self._bytes_to_mb(r.get("current_max_alloc")), }) record.top_memory_by_host = [] for r in reports.get("top_memory_by_host", []): record.append("top_memory_by_host", { "host": r.get("host"), - "count": r.get("current_count_used"), - "memory": self._bytes_to_mb(r.get("current_allocated")), - "avg_memory": self._bytes_to_mb(r.get("current_avg_alloc")), - "total_memory": self._bytes_to_mb(r.get("total_allocated")), - "max_memory": self._bytes_to_mb(r.get("current_max_alloc")), + "count_billion": self._convert_to_billion(r.get("current_count_used")), + "memory_mb": self._bytes_to_mb(r.get("current_allocated")), + "avg_memory_mb": self._bytes_to_mb(r.get("current_avg_alloc")), + "total_memory_mb": self._bytes_to_mb(r.get("total_allocated")), + "max_memory_mb": self._bytes_to_mb(r.get("current_max_alloc")), }) record.top_memory_by_event = [] for r in reports.get("top_memory_by_event", []): record.append("top_memory_by_event", { "event_type": r.get("event_name"), - "count": r.get("current_count"), - "max_count": r.get("high_count"), - "memory": self._bytes_to_mb(r.get("current_alloc")), - "avg_memory": self._bytes_to_mb(r.get("current_avg_alloc")), - "max_memory": self._bytes_to_mb(r.get("high_alloc")), - "max_avg_memory": self._bytes_to_mb(r.get("high_avg_alloc")), + "count_billion": self._convert_to_billion(r.get("current_count")), + "max_count_billion": self._convert_to_billion(r.get("high_count")), + "memory_mb": self._bytes_to_mb(r.get("current_alloc")), + "avg_memory_mb": self._bytes_to_mb(r.get("current_avg_alloc")), + "max_memory_mb": self._bytes_to_mb(r.get("high_alloc")), + "max_avg_memory_mb": self._bytes_to_mb(r.get("high_avg_alloc")), }) record.top_memory_by_thread = [] for r in reports.get("top_memory_by_thread", []): record.append("top_memory_by_thread", { "thread_id": r.get("thread_id"), "user": r.get("user"), - "count": r.get("current_count_used"), - "memory": self._bytes_to_mb(r.get("current_allocated")), - "avg_memory": self._bytes_to_mb(r.get("current_avg_alloc")), - "total_memory": self._bytes_to_mb(r.get("total_allocated")), - "max_memory": self._bytes_to_mb(r.get("current_max_alloc")), + "count_billion": r.get("current_count_used"), + "memory_mb": self._bytes_to_mb(r.get("current_allocated")), + "avg_memory_mb": self._bytes_to_mb(r.get("current_avg_alloc")), + "total_memory_mb": self._bytes_to_mb(r.get("total_allocated")), + "max_memory_mb": self._bytes_to_mb(r.get("current_max_alloc")), }) record.top_io_by_file_activity_report = [] for r in reports.get("top_io_by_file_activity_report", []): record.append("top_io_by_file_activity_report", { "file": r.get("file"), - "total_io": self._bytes_to_mb(r.get("total")), - "read_requests": r.get("count_read"), - "total_read_io": self._bytes_to_mb(r.get("total_read")), - "avg_read_io": self._bytes_to_mb(r.get("avg_read")), - "write_requests": r.get("count_write"), - "total_write_io": self._bytes_to_mb(r.get("total_written")), - "avg_write_io": self._bytes_to_mb(r.get("avg_write")), + "total_io_mb": self._bytes_to_mb(r.get("total")), + "read_count_billion": self._convert_to_billion(r.get("count_read")), + "total_read_io_mb": self._bytes_to_mb(r.get("total_read")), + "avg_read_io_mb": self._bytes_to_mb(r.get("avg_read")), + "write_count_billion": self._convert_to_billion(r.get("count_write")), + "total_write_io_mb": self._bytes_to_mb(r.get("total_written")), + "avg_write_io_mb": self._bytes_to_mb(r.get("avg_write")), "write_percentage": r.get("write_pct"), }) record.top_io_by_file_by_time = [] for r in reports.get("top_io_by_file_by_time", []): record.append("top_io_by_file_by_time", { "file": r.get("file"), - "total_io": self._bytes_to_mb(r.get("total")), - "read_requests": r.get("count_read"), - "write_requests": r.get("count_write"), - "misc_requests": r.get("count_misc"), - "total_time": self._convert_to_us(r.get("total_latency")), - "read_time": self._convert_to_us(r.get("read_latency")), - "write_time": self._convert_to_us(r.get("write_latency")), - "misc_time": self._convert_to_us(r.get("misc_latency")), + "total_count_billion": self._convert_to_billion(r.get("total")), + "read_count_billion": self._convert_to_billion(r.get("count_read")), + "write_count_billion": self._convert_to_billion(r.get("count_write")), + "misc_count_billion": self._convert_to_billion(r.get("count_misc")), + "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), + "read_time_billion_ps": self._convert_to_billion(r.get("read_latency")), + "write_time_billion_ps": self._convert_to_billion(r.get("write_latency")), + "misc_time_billion_ps": self._convert_to_billion(r.get("misc_latency")), }) record.top_io_by_event_category = [] for r in reports.get("top_io_by_event_category", []): record.append("top_io_by_event_category", { "event_type": r.get("event_name"), - "total_requested": self._bytes_to_mb(r.get("total_requested")), - "total_io": self._bytes_to_mb(r.get("total")), - "read_count": r.get("count_read"), - "write_count": r.get("count_write"), - "total_read": self._bytes_to_mb(r.get("total_read")), - "avg_read": self._bytes_to_mb(r.get("avg_read")), - "total_written": self._bytes_to_mb(r.get("total_written")), - "avg_written": self._bytes_to_mb(r.get("avg_written")), - "total_time": self._convert_to_us(r.get("total_latency")), - "min_time": self._convert_to_us(r.get("min_latency")), - "avg_time": self._convert_to_us(r.get("avg_latency")), - "max_time": self._convert_to_us(r.get("max_latency")), + "total_requested_mb": self._bytes_to_mb(r.get("total_requested")), + "total_count_billion": self._convert_to_billion(r.get("total")), + "read_count_billion": self._convert_to_billion(r.get("count_read")), + "write_count_billion": self._convert_to_billion(r.get("count_write")), + "total_read_mb": self._bytes_to_mb(r.get("total_read")), + "avg_read_mb": self._bytes_to_mb(r.get("avg_read")), + "total_written_mb": self._bytes_to_mb(r.get("total_written")), + "avg_written_mb": self._bytes_to_mb(r.get("avg_written")), + "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), + "min_time_billion_ps": self._convert_to_billion(r.get("min_latency")), + "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), + "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), }) record.top_io_in_time_by_event_category = [] for r in reports.get("top_io_in_time_by_event_category", []): record.append("top_io_in_time_by_event_category", { "event_type": r.get("event_name"), - "total_requested": self._bytes_to_mb(r.get("total_requested")), - "total_io": self._bytes_to_mb(r.get("total")), - "read_count": r.get("count_read"), - "write_count": r.get("count_write"), - "total_read": self._bytes_to_mb(r.get("total_read")), - "avg_read": self._bytes_to_mb(r.get("avg_read")), - "total_written": self._bytes_to_mb(r.get("total_written")), - "avg_written": self._bytes_to_mb(r.get("avg_written")), - "total_time": self._convert_to_us(r.get("total_latency")), - "min_time": self._convert_to_us(r.get("min_latency")), - "avg_time": self._convert_to_us(r.get("avg_latency")), - "max_time": self._convert_to_us(r.get("max_latency")), + "total_count_billion": self._bytes_to_mb(r.get("total")), + "read_count_billion": self._convert_to_billion(r.get("count_read")), + "write_count_billion": self._convert_to_billion(r.get("count_write")), + "total_read_mb": self._bytes_to_mb(r.get("total_read")), + "avg_read_mb": self._bytes_to_mb(r.get("avg_read")), + "total_written_mb": self._bytes_to_mb(r.get("total_written")), + "avg_written_mb": self._bytes_to_mb(r.get("avg_written")), + "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), + "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), + "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), + "read_time_billion_ps": self._convert_to_billion(r.get("read_latency")), + "write_time_billion_ps": self._convert_to_billion(r.get("write_latency")), + "misc_time_billion_ps": self._convert_to_billion(r.get("misc_latency")), }) record.top_io_by_user_or_thread = [] for r in reports.get("top_io_by_user_or_thread", []): @@ -829,32 +831,271 @@ def _fetch_performance_report(self): "user": r.get("user"), "thread_id": r.get("thread_id"), "process_list_id": r.get("processlist_id"), - "total_io": self._bytes_to_mb(r.get("total")), - "total_time": self._convert_to_us(r.get("total_latency")), - "avg_time": self._convert_to_us(r.get("avg_latency")), - "max_time": self._convert_to_us(r.get("max_latency")), - "min_time": self._convert_to_us(r.get("min_latency")), + "total_count_billion": self._convert_to_billion(r.get("total")), + "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), + "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), + "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), + "min_time_billion_ps": self._convert_to_billion(r.get("min_latency")), }) record.statement_analysis = [] + for r in reports.get("statement_analysis", []): + record.append("statement_analysis", { + "query": r.get("query"), + "full_table_scan": r.get("full_scan"), + "executed_count_billion": self._convert_to_billion(r.get("exec_count")), + "errors_count_billion": self._convert_to_billion(r.get("err_count")), + "warnings_count_billion": self._convert_to_billion(r.get("warn_count")), + "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), + "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), + "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), + "rows_sent_count_billion": self._convert_to_billion(r.get("rows_sent")), + "avg_rows_sent_count_billion": self._convert_to_billion(r.get("rows_sent_avg")), + "rows_scanned_count_billion": self._convert_to_billion(r.get("rows_examined")), + "avg_rows_scanned_count_billion": self._convert_to_billion(r.get("rows_examined_avg")), + "tmp_tables_count_billion": self._convert_to_billion(r.get("tmp_tables")), + "tmp_disk_tables_count_billion": self._convert_to_billion(r.get("tmp_disk_tables")), + "rows_sorted_count_billion": self._convert_to_billion(r.get("rows_sorted")), + "sort_merge_passes_count_billion": self._convert_to_billion(r.get("sort_merge_passes")), + }) record.statements_in_highest_5_percentile = [] + for r in reports.get("statements_in_highest_5_percentile", []): + record.append("statements_in_highest_5_percentile", { + "query": r.get("query"), + "full_table_scan": r.get("full_scan"), + "executed_count_billion": self._convert_to_billion(r.get("exec_count")), + "errors_count_billion": self._convert_to_billion(r.get("err_count")), + "warnings_count_billion": self._convert_to_billion(r.get("warn_count")), + "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), + "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), + "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), + "rows_sent_count_billion": self._convert_to_billion(r.get("rows_sent")), + "avg_rows_sent_count_billion": self._convert_to_billion(r.get("rows_sent_avg")), + "rows_scanned_count_billion": self._convert_to_billion(r.get("rows_examined")), + "avg_rows_scanned_count_billion": self._convert_to_billion(r.get("rows_examined_avg")), + }) record.statements_using_temp_tables = [] + for r in reports.get("statements_using_temp_tables", []): + record.append("statements_using_temp_tables", { + "query": r.get("query"), + "executed_count_billion": self._convert_to_billion(r.get("exec_count")), + "tmp_tables_in_memory_count_billion": self._convert_to_billion(r.get("memory_tmp_tables")), + "tmp_tables_in_disk_count_billion": self._convert_to_billion(r.get("disk_tmp_tables")), + "avg_tmp_tables_per_query": r.get("avg_tmp_tables_per_query"), + "tmp_tables_to_disk_percent": r.get("tmp_tables_to_disk_pct"), + }) record.statements_with_sorting = [] + for r in reports.get("statements_with_sorting", []): + record.append("statements_with_sorting", { + "query": r.get("query"), + "executed_count_billion": self._convert_to_billion(r.get("exec_count")), + "sort_merge_passes_count_billion": self._convert_to_billion(r.get("sort_merge_passes")), + "avg_sort_merges_count_billion": self._convert_to_billion(r.get("avg_sort_merges")), + "sorts_using_scans_count_billion": self._convert_to_billion(r.get("sort_using_scans")), + "sort_using_range_count_billion": self._convert_to_billion(r.get("sort_using_range")), + "rows_sorted_count_billion": self._convert_to_billion(r.get("rows_sorted")), + "avg_rows_sorted_count_billion": self._convert_to_billion(r.get("avg_rows_sorted")), + }) record.statements_with_full_table_scans = [] + for r in reports.get("statements_with_full_table_scans", []): + record.append("statements_with_full_table_scans", { + "query": r.get("query"), + "executed_count_billion": self._convert_to_billion(r.get("exec_count")), + "no_index_used_count_billion": self._convert_to_billion(r.get("no_index_used_count")), + "no_good_index_used_count_billion": self._convert_to_billion(r.get("no_good_index_used_count")), + "no_index_used_percentage": r.get("no_index_used_pct"), + }) record.statements_with_errors_or_warnings = [] + for r in reports.get("statements_with_errors_or_warnings", []): + record.append("statements_with_errors_or_warnings", { + "query": r.get("query"), + "executed_count_billion": self._convert_to_billion(r.get("exec_count")), + "errors_count_billion": self._convert_to_billion(r.get("errors")), + "warnings_count_billion": self._convert_to_billion(r.get("warnings")), + "error_percentage": r.get("error_pct"), + "warning_percentage": r.get("warning_pct"), + }) record.schema_index_statistics = [] + for r in reports.get("schema_index_statistics", []): + record.append("schema_index_statistics", { + "schema": r.get("table_schema"), + "table": r.get("table_name"), + "index": r.get("index_name"), + "rows_selected_count_billion": self._convert_to_billion(r.get("rows_selected")), + "rows_inserted_count_billion": self._convert_to_billion(r.get("rows_inserted")), + "rows_updated_count_billion": self._convert_to_billion(r.get("rows_updated")), + "rows_deleted_count_billion": self._convert_to_billion(r.get("rows_deleted")), + "select_time_billion_ps": self._convert_to_billion(r.get("select_latency")), + "insert_time_billion_ps": self._convert_to_billion(r.get("insert_latency")), + "update_time_billion_ps": self._convert_to_billion(r.get("update_latency")), + "delete_time_billion_ps": self._convert_to_billion(r.get("delete_latency")), + }) record.schema_table_statistics = [] + for r in reports.get("schema_table_statistics", []): + record.append("schema_table_statistics", { + "schema": r.get("table_schema"), + "table": r.get("table_name"), + "rows_fetched_count_billion": self._convert_to_billion(r.get("rows_fetched")), + "fetch_time_billion_ps": self._convert_to_billion(r.get("fetch_latency")), + "rows_inserted_count_billion": self._convert_to_billion(r.get("rows_inserted")), + "insert_time_billion_ps": self._convert_to_billion(r.get("insert_latency")), + "rows_updated_count_billion": self._convert_to_billion(r.get("rows_updated")), + "update_time_billion_ps": self._convert_to_billion(r.get("update_latency")), + "rows_deleted_count_billion": self._convert_to_billion(r.get("rows_deleted")), + "delete_time_billion_ps": self._convert_to_billion(r.get("delete_latency")), + "io_read_requests_count_billion": self._convert_to_billion(r.get("io_read_requests")), + "io_read_mb": self._convert_to_billion(r.get("io_read")), + "io_read_time_billion_ps": self._convert_to_billion(r.get("io_read_latency")), + "io_write_requests_count_billion": self._convert_to_billion(r.get("io_write_requests")), + "io_write_mb": self._convert_to_billion(r.get("io_write")), + "io_write_time_billion_ps": self._convert_to_billion(r.get("io_write_latency")), + "io_misc_requests_count_billion": self._convert_to_billion(r.get("io_misc_requests")), + "io_misc_time_billion_ps": self._convert_to_billion(r.get("io_misc_latency")), + }) record.schema_table_statistics_with_innodb_buffer = [] + for r in reports.get("schema_table_statistics_with_innodb_buffer", []): + record.append("schema_table_statistics_with_innodb_buffer", { + "schema": r.get("table_schema"), + "table": r.get("table_name"), + "rows_fetched_count_billion": self._convert_to_billion(r.get("rows_fetched")), + "fetch_time_billion_ps": self._convert_to_billion(r.get("fetch_latency")), + "rows_inserted_count_billion": self._convert_to_billion(r.get("rows_inserted")), + "insert_time_billion_ps": self._convert_to_billion(r.get("insert_latency")), + "rows_updated_count_billion": self._convert_to_billion(r.get("rows_updated")), + "update_time_billion_ps": self._convert_to_billion(r.get("update_latency")), + "rows_deleted_count_billion": self._convert_to_billion(r.get("rows_deleted")), + "delete_time_billion_ps": self._convert_to_billion(r.get("delete_latency")), + "io_read_requests_count_billion": self._convert_to_billion(r.get("io_read_requests")), + "io_read_mb": self._convert_to_billion(r.get("io_read")), + "io_read_time_billion_ps": self._convert_to_billion(r.get("io_read_latency")), + "io_write_requests_count_billion": self._convert_to_billion(r.get("io_write_requests")), + "io_write_mb": self._convert_to_billion(r.get("io_write")), + "io_write_time_billion_ps": self._convert_to_billion(r.get("io_write_latency")), + "io_misc_requests_count_billion": self._convert_to_billion(r.get("io_misc_requests")), + "io_misc_time_billion_ps": self._convert_to_billion(r.get("io_misc_latency")), + "buffer_allocated_mb": self._bytes_to_mb(r.get("innodb_buffer_allocated")), + "buffer_data_mb": self._bytes_to_mb(r.get("innodb_buffer_data")), + "buffer_free_mb": self._bytes_to_mb(r.get("innodb_buffer_free")), + "buffer_pages_count_billion": self._convert_to_billion(r.get("innodb_buffer_pages")), + "buffer_pages_hashed_count_billion": self._convert_to_billion(r.get("innodb_buffer_pages_hashed")), + "buffer_pages_old_count_billion": self._convert_to_billion(r.get("innodb_buffer_pages_old")), + "buffer_pages_cached_count_billion": self._convert_to_billion(r.get("innodb_buffer_rows_cached")), + }) record.schema_tables_with_full_table_scans = [] + for r in reports.get("schema_tables_with_full_table_scans", []): + record.append("schema_tables_with_full_table_scans", { + "schema": r.get("object_schema"), + "object": r.get("object_name"), + "full_scanned_rows_count_billion": self._convert_to_billion(r.get("rows_full_scanned")) + }) record.schema_unused_indexes = [] + for r in reports.get("schema_unused_indexes", []): + record.append("schema_unused_indexes", { + "schema": r.get("object_schema"), + "object": r.get("object_name"), + "index": r.get("index_name"), + }) record.global_waits_by_time = [] + for r in reports.get("global_waits_by_time", []): + record.append("global_waits_by_time", { + "event_class": r.get("events"), + "total_occurances_count_billion": self._convert_to_billion(r.get("total")), + "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), + "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), + "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), + }) record.waits_by_user_by_time = [] + for r in reports.get("waits_by_user_by_time", []): + record.append("waits_by_user_by_time", { + "user": r.get("user"), + "event_class": r.get("event"), + "total_occurances_count_billion": self._convert_to_billion(r.get("total")), + "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), + "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), + "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), + }) record.wait_classes_by_time = [] + for r in reports.get("wait_classes_by_time", []): + record.append("wait_classes_by_time", { + "event_class": r.get("event_class"), + "total_occurances_count_billion": self._convert_to_billion(r.get("total")), + "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), + "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), + "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), + "min_time_billion_ps": self._convert_to_billion(r.get("min_latency")), + }) record.waits_classes_by_avg_time = [] + for r in reports.get("waits_classes_by_avg_time", []): + record.append("waits_classes_by_avg_time", { + "event_class": r.get("event_class"), + "total_occurances_count_billion": self._convert_to_billion(r.get("total")), + "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), + "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), + "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), + "min_time_billion_ps": self._convert_to_billion(r.get("min_latency")), + }) record.innodb_buffer_stats_by_schema = [] + for r in reports.get("innodb_buffer_stats_by_schema", []): + record.append("innodb_buffer_stats_by_schema", { + "schema": r.get("object_schema"), + "allocated_mb": self._bytes_to_mb(r.get("allocated")), + "data_mb": self._bytes_to_mb(r.get("data")), + "pages_count_billion": self._convert_to_billion(r.get("pages")), + "pages_hashed_count_billion": self._convert_to_billion(r.get("pages_hashed")), + "pages_old_count_billion": self._convert_to_billion(r.get("pages_old")), + "rows_cached_count_billion": self._convert_to_billion(r.get("rows_cached")), + }) record.innodb_buffer_stats_by_table = [] + for r in reports.get("innodb_buffer_stats_by_table", []): + record.append("innodb_buffer_stats_by_table", { + "schema": r.get("object_schema"), + "table": r.get("object_name"), + "allocated_mb": self._bytes_to_mb(r.get("allocated")), + "data_mb": self._bytes_to_mb(r.get("data")), + "pages_count_billion": self._convert_to_billion(r.get("pages")), + "pages_hashed_count_billion": self._convert_to_billion(r.get("pages_hashed")), + "pages_old_count_billion": self._convert_to_billion(r.get("pages_old")), + "rows_cached_count_billion": self._convert_to_billion(r.get("rows_cached")), + }) record.user_resource_use_overview = [] + for r in reports.get("user_resource_use_overview", []): + record.append("user_resource_use_overview", { + "user": r.get("user"), + "statements_count_billion": self._convert_to_billion(r.get("statements")), + "statement_total_time_billion_ps": self._convert_to_billion(r.get("statement_latency")), + "statement_avg_time_billion_ps": self._convert_to_billion(r.get("statement_avg_latency")), + "table_scans_count_billion": self._convert_to_billion(r.get("table_scans")), + "file_io_count_billion": self._convert_to_billion(r.get("file_io_latency")), + "total_file_io_time_billion_ps": self._convert_to_billion(r.get("file_io_latency")), + "current_connections_count": r.get("current_connections"), + "total_connections_count": r.get("total_connections"), + "unique_hosts_count": r.get("unique_hosts"), + "current_memory_mb": self._bytes_to_mb(r.get("current_memory")), + "total_memory_mb": self._bytes_to_mb(r.get("total_memory_allocated")), + }) record.user_resource_use_io_statistics = [] + for r in reports.get("user_resource_use_io_statistics", []): + record.append("user_resource_use_io_statistics", { + "user": r.get("user"), + "event_type": r.get("event_name"), + "total_io_count_billion": self._convert_to_billion(r.get("total")), + "total_time_billion_ps": self._convert_to_billion(r.get("latency")), + "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), + }) record.user_resource_use_statement_statistics = [] + for r in reports.get("user_resource_use_statement_statistics", []): + record.append("user_resource_use_statement_statistics", { + "user": r.get("user"), + "statement": r.get("statement"), + "total_occurances_count_billion": self._convert_to_billion(r.get("total")), + "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), + "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), + "lock_time_billion_ps": self._convert_to_billion(r.get("lock_latency")), + "cpu_time_billion_ps": self._convert_to_billion(r.get("cpu_latency")), + "rows_sent_count_billion": self._convert_to_billion(r.get("rows_sent")), + "rows_examined_count_billion": self._convert_to_billion(r.get("rows_examined")), + "rows_affected_count_billion": self._convert_to_billion(r.get("rows_affected")), + "full_scans_count_billion": self._convert_to_billion(r.get("full_scans")), + }) record.save() except Exception: log_error("Performance Schema Report Fetch Exception", server=self.as_dict()) @@ -936,10 +1177,10 @@ def _bytes_to_mb(self, bytes_val): return None return round(bytes_val / 1024 / 1024, 2) - def _convert_to_us(self, duration): - if duration is None: + def _convert_to_billion(self, count): + if count is None: return None - return round(duration / 1000000, 2) + return count / 1000000000 get_permission_query_conditions = get_permission_query_conditions_for_doctype( "Database Server" From dcf536ac23368fe7932ccf878baaa33345b3af69 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Fri, 2 Feb 2024 15:59:12 +0530 Subject: [PATCH 12/31] feat: option to fetch selected reports --- .../database_server/database_server.json | 2 +- .../database_server/database_server.py | 98 +++++++------------ press/www/dashboard2.html | 34 +++++++ 3 files changed, 68 insertions(+), 66 deletions(-) create mode 100644 press/www/dashboard2.html diff --git a/press/press/doctype/database_server/database_server.json b/press/press/doctype/database_server/database_server.json index a6fc878b59..8bee9a4c9a 100644 --- a/press/press/doctype/database_server/database_server.json +++ b/press/press/doctype/database_server/database_server.json @@ -632,7 +632,7 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2024-01-31 16:56:02.827370", + "modified": "2024-02-02 15:56:00.713151", "modified_by": "Administrator", "module": "Press", "name": "Database Server", diff --git a/press/press/doctype/database_server/database_server.py b/press/press/doctype/database_server/database_server.py index c4a8d80ca5..f68d49a62f 100644 --- a/press/press/doctype/database_server/database_server.py +++ b/press/press/doctype/database_server/database_server.py @@ -1120,74 +1120,42 @@ def _fetch_performance_report(self): raise def get_performance_report(self): - """ - Available Reports: - -total_allocated_memory - -top_memory_by_event - -top_memory_by_user - -top_memory_by_host - -top_memory_by_thread - -top_io_by_file_activity_report - -top_io_by_file_by_time - -top_io_by_event_category - -top_io_in_time_by_event_category - -top_io_by_user_or_thread - -statement_analysis - -statements_in_highest_5_percentile - -statements_using_temp_tables - -statements_with_sorting - -statements_with_full_table_scans - -statements_with_errors_or_warnings - -schema_index_statistics - -schema_table_statistics - -schema_table_statistics_with_innodb_buffer - -schema_tables_with_full_table_scans - -schema_unused_indexes - -global_waits_by_time - -waits_by_user_by_time - -wait_classes_by_time - -waits_classes_by_avg_time - -innodb_buffer_stats_by_schema - -innodb_buffer_stats_by_table - -user_resource_use_overview - -user_resource_use_io_statistics - -user_resource_use_statement_statistics - """ + reports_is_enabled_status = { + "total_allocated_memory": self.is_total_allocated_memory_perf_report_enabled, + "top_memory_by_event": self.is_top_memory_by_event_perf_report_enabled, + "top_memory_by_user": self.is_top_memory_by_user_perf_report_enabled, + "top_memory_by_host": self.is_top_memory_by_host_perf_report_enabled, + "top_memory_by_thread": self.is_top_memory_by_thread_perf_report_enabled, + "top_io_by_file_activity_report": self.is_top_io_by_file_activity_report_perf_report_enabled, + "top_io_by_file_by_time": self.is_top_io_by_file_by_time_perf_report_enabled, + "top_io_by_event_category": self.is_top_io_by_event_category_perf_report_enabled, + "top_io_in_time_by_event_category": self.is_top_io_in_time_by_event_category_perf_report_enabled, + "top_io_by_user_or_thread": self.is_top_io_by_user_or_thread_perf_report_enabled, + "statement_analysis": self.is_statement_analysis_perf_report_enabled, + "statements_in_highest_5_percentile": self.is_statements_in_highest_5_percentile_perf_report_enabled, + "statements_using_temp_tables": self.is_statements_using_temp_tables_perf_report_enabled, + "statements_with_sorting": self.is_statements_with_sorting_perf_report_enabled, + "statements_with_full_table_scans": self.is_statements_with_full_table_scans_perf_report_enabled, + "statements_with_errors_or_warnings": self.is_statements_with_errors_or_warnings_perf_report_enabled, + "schema_index_statistics": self.is_schema_index_statistics_perf_report_enabled, + "schema_table_statistics": self.is_schema_table_statistics_perf_report_enabled, + "schema_table_statistics_with_innodb_buffer": self.is_schema_table_statistics_with_innodb_perf_report_enabled, + "schema_tables_with_full_table_scans": self.is_schema_tables_with_full_table_scans_perf_report_enabled, + "schema_unused_indexes": self.is_schema_unused_indexes_perf_report_enabled, + "global_waits_by_time": self.is_global_waits_by_time_perf_report_enabled, + "waits_by_user_by_time": self.is_waits_by_user_by_time_perf_report_enabled, + "wait_classes_by_time": self.is_wait_classes_by_time_perf_report_enabled, + "waits_classes_by_avg_time": self.is_waits_classes_by_avg_time_perf_report_enabled, + "innodb_buffer_stats_by_schema": self.is_innodb_buffer_stats_by_schema_perf_report_enabled, + "innodb_buffer_stats_by_table": self.is_innodb_buffer_stats_by_table_perf_report_enabled, + "user_resource_use_overview": self.is_user_resource_use_overview_perf_report_enabled, + "user_resource_use_io_statistics": self.is_user_resource_use_io_statistics_perf_report_enabled, + "user_resource_use_statement_statistics": self.is_user_resource_use_statement_statistics_perf_report_enabled, + } return self.agent.post("database/performance_report", { "private_ip": self.private_ip, "mariadb_root_password": self.get_password("mariadb_root_password"), - "reports": [ - "total_allocated_memory", - "top_memory_by_event", - "top_memory_by_user", - "top_memory_by_host", - "top_memory_by_thread", - "top_io_by_file_activity_report", - "top_io_by_file_by_time", - "top_io_by_event_category", - "top_io_in_time_by_event_category", - "top_io_by_user_or_thread", - "statement_analysis", - "statements_in_highest_5_percentile", - "statements_using_temp_tables", - "statements_with_sorting", - "statements_with_full_table_scans", - "statements_with_errors_or_warnings", - "schema_index_statistics", - "schema_table_statistics", - "schema_table_statistics_with_innodb_buffer", - "schema_tables_with_full_table_scans", - "schema_unused_indexes", - "global_waits_by_time", - "waits_by_user_by_time", - "wait_classes_by_time", - "waits_classes_by_avg_time", - "innodb_buffer_stats_by_schema", - "innodb_buffer_stats_by_table", - "user_resource_use_overview", - "user_resource_use_io_statistics", - "user_resource_use_statement_statistics", - ] + "reports": [report for report, enabled in reports_is_enabled_status.items() if enabled] }) or {} def _bytes_to_mb(self, bytes_val): diff --git a/press/www/dashboard2.html b/press/www/dashboard2.html new file mode 100644 index 0000000000..8acdf577a9 --- /dev/null +++ b/press/www/dashboard2.html @@ -0,0 +1,34 @@ + + + + + + + Frappe Cloud + + + + + + + + + + + + +
+ + + + + From 939f700cfc8721bbadedb45e30c07b5bba1e7e01 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Fri, 2 Feb 2024 16:00:42 +0530 Subject: [PATCH 13/31] chore: remove js to remove checkbox --- .../doctype/performance_report/performance_report.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/press/press/doctype/performance_report/performance_report.js b/press/press/doctype/performance_report/performance_report.js index 52d6984cf9..408be0ffb1 100644 --- a/press/press/doctype/performance_report/performance_report.js +++ b/press/press/doctype/performance_report/performance_report.js @@ -2,15 +2,5 @@ // For license information, please see license.txt frappe.ui.form.on("Performance Report", { - refresh(frm) { - // hide row index and check box - var css = document.createElement("style"); - css.type = "text/css"; - var styles = ` - .row-index {display:none;} - .row-check {display:none;}`; - if (css.styleSheet) css.styleSheet.cssText = styles; - else css.appendChild(document.createTextNode(styles)); - document.getElementsByTagName("head")[0].appendChild(css); - }, + refresh(frm) {}, }); From 9c47b18d1cef1c9fcaeaa7064825994cd629a097 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Fri, 2 Feb 2024 16:01:33 +0530 Subject: [PATCH 14/31] chore: remove extra files --- press/www/dashboard2.html | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 press/www/dashboard2.html diff --git a/press/www/dashboard2.html b/press/www/dashboard2.html deleted file mode 100644 index 8acdf577a9..0000000000 --- a/press/www/dashboard2.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - Frappe Cloud - - - - - - - - - - - - -
- - - - - From 1ded2e98c410843b770ae916e75712d372193f94 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Fri, 2 Feb 2024 16:27:28 +0530 Subject: [PATCH 15/31] chore: run cronjob after every 15 minutes --- press/hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/press/hooks.py b/press/hooks.py index c8ef84ea2b..b20c0dde42 100644 --- a/press/hooks.py +++ b/press/hooks.py @@ -235,12 +235,12 @@ "press.press.doctype.subscription.subscription.create_usage_records", "press.press.doctype.virtual_machine.virtual_machine.sync_virtual_machines", "press.press.doctype.mariadb_stalk.mariadb_stalk.fetch_stalks", + "press.press.doctype.database_server.database_server.fetch_performance_schema_reports", ], "*/5 * * * *": [ "press.press.doctype.version_upgrade.version_upgrade.update_from_site_update", "press.press.doctype.site_replication.site_replication.update_from_site", "press.press.doctype.virtual_disk_snapshot.virtual_disk_snapshot.sync_snapshots", - "press.press.doctype.database_server.database_server.fetch_performance_schema_reports", ], "* * * * *": [ "press.press.doctype.deploy_candidate.deploy_candidate.run_scheduled_builds", From 18a31da576c2ec97984de2b2e5bcc06bd180e7a5 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Sat, 3 Feb 2024 14:26:29 +0530 Subject: [PATCH 16/31] feat: button to multiply billion with count and time field has been added --- .../performance_report/performance_report.js | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/press/database_performance_schema/doctype/performance_report/performance_report.js b/press/database_performance_schema/doctype/performance_report/performance_report.js index 24f702f49c..12a904eeca 100644 --- a/press/database_performance_schema/doctype/performance_report/performance_report.js +++ b/press/database_performance_schema/doctype/performance_report/performance_report.js @@ -1,8 +1,28 @@ // Copyright (c) 2024, Frappe and contributors // For license information, please see license.txt -// frappe.ui.form.on("Performance Report", { -// refresh(frm) { +frappe.ui.form.on("Performance Report", { + refresh(frm) { + frm.add_custom_button(__('Multiply 10^9 with Count & Time Field'), function(){ + format_fields_helper(frm.get_doc()); + frm.refresh_fields(); + msgprint("All the count & time fields with billion and billion_ps suffixes have been multiplied by 10^9"); + frm.remove_custom_button(__('Multiply 10^9 with Count & Time Field')); + }); + }, +}); -// }, -// }); +function format_fields_helper(fields_map){ + for (const [key, value] of Object.entries(fields_map)) { + if (typeof value === 'object') { + format_fields_helper(value); + } else { + if (key.endsWith('_billion') || key.endsWith('_billion_ps')){ + if (typeof value === 'number'){ + fields_map[key] = value*1000000000; + } + } + } + } + return fields_map; +} From f7974478fc5b0f9dc243ad919a2694b0c97180c0 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Sat, 3 Feb 2024 14:32:17 +0530 Subject: [PATCH 17/31] feat: add a intro notice after multiply --- .../doctype/performance_report/performance_report.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/press/database_performance_schema/doctype/performance_report/performance_report.js b/press/database_performance_schema/doctype/performance_report/performance_report.js index 12a904eeca..8a275b00bc 100644 --- a/press/database_performance_schema/doctype/performance_report/performance_report.js +++ b/press/database_performance_schema/doctype/performance_report/performance_report.js @@ -6,8 +6,10 @@ frappe.ui.form.on("Performance Report", { frm.add_custom_button(__('Multiply 10^9 with Count & Time Field'), function(){ format_fields_helper(frm.get_doc()); frm.refresh_fields(); - msgprint("All the count & time fields with billion and billion_ps suffixes have been multiplied by 10^9"); + let notice_msg = __("All the count & time fields with billion and billion ps as unit have been multiplied by 10^9"); + msgprint(notice_msg); frm.remove_custom_button(__('Multiply 10^9 with Count & Time Field')); + frm.set_intro(notice_msg); }); }, }); From fff327c8185a4f3d69ddb7b5477c996e0d0141cb Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Sun, 4 Feb 2024 10:17:58 +0530 Subject: [PATCH 18/31] chore: remove enqueue now --- press/press/doctype/database_server/database_server.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/press/press/doctype/database_server/database_server.py b/press/press/doctype/database_server/database_server.py index f68d49a62f..601d096509 100644 --- a/press/press/doctype/database_server/database_server.py +++ b/press/press/doctype/database_server/database_server.py @@ -726,8 +726,7 @@ def fetch_performance_report(self): self.name, "_fetch_performance_report", queue="long", - timeout=1200, - now=True + timeout=1200 ) frappe.msgprint("Performance Schema Report Fetching Started") else: From af1027851cfe217cfc925eeff95284c9972f455e Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Sun, 4 Feb 2024 10:25:08 +0530 Subject: [PATCH 19/31] feat: add performance reports to database server dashboard --- press/press/doctype/database_server/database_server_dashboard.py | 1 + 1 file changed, 1 insertion(+) diff --git a/press/press/doctype/database_server/database_server_dashboard.py b/press/press/doctype/database_server/database_server_dashboard.py index a5750d8e62..619e20222d 100644 --- a/press/press/doctype/database_server/database_server_dashboard.py +++ b/press/press/doctype/database_server/database_server_dashboard.py @@ -12,5 +12,6 @@ def get_data(): "transactions": [ {"label": _("Related Documents"), "items": ["Server"]}, {"label": _("Logs"), "items": ["Agent Job", "Ansible Play"]}, + {"label": _("Report"), "items": ["Performance Report"]} ], } From ec909142c248a1c68b53575a50d6c5dbb49ab01b Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Sun, 4 Feb 2024 10:53:47 +0530 Subject: [PATCH 20/31] chore: remove junk doctype --- .../top_file_io_activity_report/__init__.py | 0 .../top_file_io_activity_report.json | 144 ----------- .../top_file_io_activity_report.py | 9 - .../top_io_by_event_category/__init__.py | 0 .../top_io_by_event_category.json | 207 ---------------- .../top_io_by_event_category.py | 9 - .../top_io_by_file_by_time/__init__.py | 0 .../top_io_by_file_by_time.json | 154 ------------ .../top_io_by_file_by_time.py | 9 - .../__init__.py | 0 .../top_io_in_time_by_event_category.json | 226 ------------------ .../top_io_in_time_by_event_category.py | 9 - .../top_io_time_by_user_thread/__init__.py | 0 .../top_io_time_by_user_thread.json | 137 ----------- .../top_io_time_by_user_thread.py | 9 - .../doctype/top_memory_by_event/__init__.py | 0 .../top_memory_by_event.json | 93 ------- .../top_memory_by_event.py | 9 - .../doctype/top_memory_by_host/__init__.py | 0 .../top_memory_by_host.json | 82 ------- .../top_memory_by_host/top_memory_by_host.py | 9 - .../doctype/top_memory_by_thread/__init__.py | 0 .../top_memory_by_thread.json | 92 ------- .../top_memory_by_thread.py | 9 - .../doctype/top_memory_by_user/__init__.py | 0 .../top_memory_by_user.json | 82 ------- .../top_memory_by_user/top_memory_by_user.py | 9 - 27 files changed, 1298 deletions(-) delete mode 100644 press/press/doctype/top_file_io_activity_report/__init__.py delete mode 100644 press/press/doctype/top_file_io_activity_report/top_file_io_activity_report.json delete mode 100644 press/press/doctype/top_file_io_activity_report/top_file_io_activity_report.py delete mode 100644 press/press/doctype/top_io_by_event_category/__init__.py delete mode 100644 press/press/doctype/top_io_by_event_category/top_io_by_event_category.json delete mode 100644 press/press/doctype/top_io_by_event_category/top_io_by_event_category.py delete mode 100644 press/press/doctype/top_io_by_file_by_time/__init__.py delete mode 100644 press/press/doctype/top_io_by_file_by_time/top_io_by_file_by_time.json delete mode 100644 press/press/doctype/top_io_by_file_by_time/top_io_by_file_by_time.py delete mode 100644 press/press/doctype/top_io_in_time_by_event_category/__init__.py delete mode 100644 press/press/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.json delete mode 100644 press/press/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.py delete mode 100644 press/press/doctype/top_io_time_by_user_thread/__init__.py delete mode 100644 press/press/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.json delete mode 100644 press/press/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.py delete mode 100644 press/press/doctype/top_memory_by_event/__init__.py delete mode 100644 press/press/doctype/top_memory_by_event/top_memory_by_event.json delete mode 100644 press/press/doctype/top_memory_by_event/top_memory_by_event.py delete mode 100644 press/press/doctype/top_memory_by_host/__init__.py delete mode 100644 press/press/doctype/top_memory_by_host/top_memory_by_host.json delete mode 100644 press/press/doctype/top_memory_by_host/top_memory_by_host.py delete mode 100644 press/press/doctype/top_memory_by_thread/__init__.py delete mode 100644 press/press/doctype/top_memory_by_thread/top_memory_by_thread.json delete mode 100644 press/press/doctype/top_memory_by_thread/top_memory_by_thread.py delete mode 100644 press/press/doctype/top_memory_by_user/__init__.py delete mode 100644 press/press/doctype/top_memory_by_user/top_memory_by_user.json delete mode 100644 press/press/doctype/top_memory_by_user/top_memory_by_user.py diff --git a/press/press/doctype/top_file_io_activity_report/__init__.py b/press/press/doctype/top_file_io_activity_report/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/press/press/doctype/top_file_io_activity_report/top_file_io_activity_report.json b/press/press/doctype/top_file_io_activity_report/top_file_io_activity_report.json deleted file mode 100644 index 0b4b02f534..0000000000 --- a/press/press/doctype/top_file_io_activity_report/top_file_io_activity_report.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "actions": [], - "allow_rename": 1, - "creation": "2024-01-30 11:58:49.811446", - "doctype": "DocType", - "engine": "InnoDB", - "field_order": [ - "file", - "total_io", - "write_percentage", - "read_io_info_section", - "read_requests", - "column_break_ydlk", - "total_read_io", - "column_break_vrkh", - "avg_read_io", - "write_io_info_section", - "write_requests", - "column_break_jlxu", - "total_write_io", - "column_break_vfzt", - "avg_write_io" - ], - "fields": [ - { - "fieldname": "file", - "fieldtype": "Data", - "in_list_view": 1, - "in_preview": 1, - "label": "File", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "read_requests", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Read Requests", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "write_requests", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Write Requests", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "total_read_io", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Total Read IO (MB)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "avg_read_io", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Avg Read IO (MB)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "total_write_io", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Total Write IO (MB)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "avg_write_io", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Avg Write IO (MB)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "write_percentage", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Write %", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "total_io", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Total IO (MB)", - "read_only": 1 - }, - { - "fieldname": "read_io_info_section", - "fieldtype": "Section Break", - "label": "Read IO Info" - }, - { - "fieldname": "column_break_ydlk", - "fieldtype": "Column Break" - }, - { - "fieldname": "column_break_vrkh", - "fieldtype": "Column Break" - }, - { - "fieldname": "write_io_info_section", - "fieldtype": "Section Break", - "label": "Write IO Info" - }, - { - "fieldname": "column_break_jlxu", - "fieldtype": "Column Break" - }, - { - "fieldname": "column_break_vfzt", - "fieldtype": "Column Break" - } - ], - "index_web_pages_for_search": 1, - "istable": 1, - "links": [], - "modified": "2024-01-30 16:33:18.788585", - "modified_by": "Administrator", - "module": "Press", - "name": "Top File IO Activity Report", - "owner": "Administrator", - "permissions": [], - "sort_field": "modified", - "sort_order": "DESC", - "states": [] -} \ No newline at end of file diff --git a/press/press/doctype/top_file_io_activity_report/top_file_io_activity_report.py b/press/press/doctype/top_file_io_activity_report/top_file_io_activity_report.py deleted file mode 100644 index 5b4605812f..0000000000 --- a/press/press/doctype/top_file_io_activity_report/top_file_io_activity_report.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2024, Frappe and contributors -# For license information, please see license.txt - -# import frappe -from frappe.model.document import Document - - -class TopFileIOActivityReport(Document): - pass diff --git a/press/press/doctype/top_io_by_event_category/__init__.py b/press/press/doctype/top_io_by_event_category/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/press/press/doctype/top_io_by_event_category/top_io_by_event_category.json b/press/press/doctype/top_io_by_event_category/top_io_by_event_category.json deleted file mode 100644 index a9f5861c02..0000000000 --- a/press/press/doctype/top_io_by_event_category/top_io_by_event_category.json +++ /dev/null @@ -1,207 +0,0 @@ -{ - "actions": [], - "allow_rename": 1, - "creation": "2024-01-30 16:37:12.860618", - "doctype": "DocType", - "engine": "InnoDB", - "field_order": [ - "event_type", - "total_requested", - "section_break_aszx", - "total_io", - "column_break_vcjy", - "read_count", - "column_break_owft", - "write_count", - "section_break_xlar", - "total_read", - "column_break_smtc", - "avg_read", - "section_break_cwqk", - "total_written", - "column_break_mwut", - "avg_written", - "section_break_tjsh", - "total_time", - "column_break_iaaq", - "min_time", - "column_break_hevz", - "avg_time", - "column_break_nqej", - "max_time" - ], - "fields": [ - { - "fieldname": "event_type", - "fieldtype": "Data", - "in_list_view": 1, - "in_preview": 1, - "label": "Event Type", - "read_only": 1 - }, - { - "fieldname": "section_break_aszx", - "fieldtype": "Section Break" - }, - { - "columns": 1, - "fieldname": "total_io", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Total IO", - "read_only": 1 - }, - { - "fieldname": "column_break_vcjy", - "fieldtype": "Column Break" - }, - { - "columns": 1, - "fieldname": "read_count", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Read Count", - "read_only": 1 - }, - { - "fieldname": "column_break_owft", - "fieldtype": "Column Break" - }, - { - "columns": 1, - "fieldname": "write_count", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Write Count", - "read_only": 1 - }, - { - "fieldname": "section_break_xlar", - "fieldtype": "Section Break" - }, - { - "columns": 1, - "fieldname": "total_read", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Total Read", - "read_only": 1 - }, - { - "fieldname": "column_break_smtc", - "fieldtype": "Column Break" - }, - { - "columns": 1, - "fieldname": "avg_read", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Avg Read", - "read_only": 1 - }, - { - "fieldname": "section_break_cwqk", - "fieldtype": "Section Break" - }, - { - "columns": 1, - "fieldname": "total_written", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Total Written", - "read_only": 1 - }, - { - "fieldname": "column_break_mwut", - "fieldtype": "Column Break" - }, - { - "columns": 1, - "fieldname": "avg_written", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Avg Written", - "read_only": 1 - }, - { - "fieldname": "section_break_tjsh", - "fieldtype": "Section Break" - }, - { - "fieldname": "column_break_iaaq", - "fieldtype": "Column Break" - }, - { - "fieldname": "column_break_hevz", - "fieldtype": "Column Break" - }, - { - "fieldname": "column_break_nqej", - "fieldtype": "Column Break" - }, - { - "columns": 1, - "fieldname": "total_requested", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Total Requested (MB)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "total_time", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Total Time (us)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "min_time", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Min Time (us)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "avg_time", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Avg Time (us)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "max_time", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Max Time (us)", - "read_only": 1 - } - ], - "index_web_pages_for_search": 1, - "istable": 1, - "links": [], - "modified": "2024-01-31 12:19:44.036269", - "modified_by": "Administrator", - "module": "Press", - "name": "Top IO by Event Category", - "owner": "Administrator", - "permissions": [], - "sort_field": "modified", - "sort_order": "DESC", - "states": [] -} \ No newline at end of file diff --git a/press/press/doctype/top_io_by_event_category/top_io_by_event_category.py b/press/press/doctype/top_io_by_event_category/top_io_by_event_category.py deleted file mode 100644 index 36cd03a607..0000000000 --- a/press/press/doctype/top_io_by_event_category/top_io_by_event_category.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2024, Frappe and contributors -# For license information, please see license.txt - -# import frappe -from frappe.model.document import Document - - -class TopIObyEventCategory(Document): - pass diff --git a/press/press/doctype/top_io_by_file_by_time/__init__.py b/press/press/doctype/top_io_by_file_by_time/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/press/press/doctype/top_io_by_file_by_time/top_io_by_file_by_time.json b/press/press/doctype/top_io_by_file_by_time/top_io_by_file_by_time.json deleted file mode 100644 index b5b974e55a..0000000000 --- a/press/press/doctype/top_io_by_file_by_time/top_io_by_file_by_time.json +++ /dev/null @@ -1,154 +0,0 @@ -{ - "actions": [], - "allow_rename": 1, - "creation": "2024-01-30 15:29:04.944737", - "doctype": "DocType", - "engine": "InnoDB", - "field_order": [ - "file", - "io_count_section", - "total_io", - "column_break_xxhq", - "read_requests", - "column_break_rzrc", - "write_requests", - "column_break_qckc", - "misc_requests", - "request_time_section", - "total_time", - "column_break_xkyd", - "read_time", - "column_break_bmbz", - "write_time", - "column_break_hfre", - "misc_time" - ], - "fields": [ - { - "fieldname": "file", - "fieldtype": "Data", - "in_list_view": 1, - "in_preview": 1, - "label": "File", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "total_io", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Total IO Count", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "read_time", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Read Time (us)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "write_time", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Write Time (us)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "misc_time", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Misc Time (us)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "read_requests", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Read Request Count", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "write_requests", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Write Request Count", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "misc_requests", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Misc Request Count", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "total_time", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Total Time (us)", - "read_only": 1 - }, - { - "fieldname": "io_count_section", - "fieldtype": "Section Break", - "label": "IO Count" - }, - { - "fieldname": "column_break_xxhq", - "fieldtype": "Column Break" - }, - { - "fieldname": "column_break_rzrc", - "fieldtype": "Column Break" - }, - { - "fieldname": "column_break_qckc", - "fieldtype": "Column Break" - }, - { - "fieldname": "request_time_section", - "fieldtype": "Section Break", - "label": "Request Time" - }, - { - "fieldname": "column_break_xkyd", - "fieldtype": "Column Break" - }, - { - "fieldname": "column_break_bmbz", - "fieldtype": "Column Break" - }, - { - "fieldname": "column_break_hfre", - "fieldtype": "Column Break" - } - ], - "index_web_pages_for_search": 1, - "istable": 1, - "links": [], - "modified": "2024-01-30 16:35:16.871489", - "modified_by": "Administrator", - "module": "Press", - "name": "Top IO by File by Time", - "owner": "Administrator", - "permissions": [], - "sort_field": "modified", - "sort_order": "DESC", - "states": [] -} \ No newline at end of file diff --git a/press/press/doctype/top_io_by_file_by_time/top_io_by_file_by_time.py b/press/press/doctype/top_io_by_file_by_time/top_io_by_file_by_time.py deleted file mode 100644 index 496282d813..0000000000 --- a/press/press/doctype/top_io_by_file_by_time/top_io_by_file_by_time.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2024, Frappe and contributors -# For license information, please see license.txt - -# import frappe -from frappe.model.document import Document - - -class TopIObyFilebyTime(Document): - pass diff --git a/press/press/doctype/top_io_in_time_by_event_category/__init__.py b/press/press/doctype/top_io_in_time_by_event_category/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/press/press/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.json b/press/press/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.json deleted file mode 100644 index aa19e6e1c4..0000000000 --- a/press/press/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "actions": [], - "allow_rename": 1, - "creation": "2024-01-31 12:20:17.501670", - "doctype": "DocType", - "engine": "InnoDB", - "field_order": [ - "event_type", - "section_break_ykxd", - "total_io", - "column_break_eqhz", - "read_count", - "column_break_kkkj", - "write_count", - "section_break_ebwe", - "total_read", - "column_break_nsap", - "avg_read", - "section_break_nygy", - "total_write", - "column_break_mvhi", - "avg_write", - "section_break_mcgu", - "total_time", - "column_break_vzzx", - "avg_time", - "column_break_hqbj", - "max_time", - "column_break_oflx", - "read_time", - "column_break_lyxq", - "write_time", - "column_break_vbds", - "misc_time" - ], - "fields": [ - { - "fieldname": "event_type", - "fieldtype": "Data", - "in_list_view": 1, - "in_preview": 1, - "label": "Event Type", - "read_only": 1 - }, - { - "fieldname": "section_break_ykxd", - "fieldtype": "Section Break" - }, - { - "fieldname": "total_io", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Total IO", - "read_only": 1 - }, - { - "fieldname": "column_break_eqhz", - "fieldtype": "Column Break" - }, - { - "columns": 1, - "fieldname": "read_count", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Read Count", - "read_only": 1 - }, - { - "fieldname": "column_break_kkkj", - "fieldtype": "Column Break" - }, - { - "columns": 1, - "fieldname": "write_count", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Write Count", - "read_only": 1 - }, - { - "fieldname": "section_break_ebwe", - "fieldtype": "Section Break" - }, - { - "fieldname": "column_break_nsap", - "fieldtype": "Column Break" - }, - { - "fieldname": "section_break_nygy", - "fieldtype": "Section Break" - }, - { - "fieldname": "column_break_mvhi", - "fieldtype": "Column Break" - }, - { - "fieldname": "section_break_mcgu", - "fieldtype": "Section Break" - }, - { - "fieldname": "column_break_vzzx", - "fieldtype": "Column Break" - }, - { - "fieldname": "column_break_hqbj", - "fieldtype": "Column Break" - }, - { - "fieldname": "column_break_oflx", - "fieldtype": "Column Break" - }, - { - "fieldname": "column_break_lyxq", - "fieldtype": "Column Break" - }, - { - "fieldname": "column_break_vbds", - "fieldtype": "Column Break" - }, - { - "columns": 1, - "fieldname": "total_read", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Total Read (MB)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "avg_read", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Avg Read (MB)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "total_write", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Total Write (MB)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "avg_write", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Avg Write (MB)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "total_time", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Total Time (us)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "avg_time", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Avg Time (us)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "max_time", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Max Time (us)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "read_time", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Read Time (us)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "write_time", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Write Time (us)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "misc_time", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Misc Time (us)", - "read_only": 1 - } - ], - "index_web_pages_for_search": 1, - "istable": 1, - "links": [], - "modified": "2024-01-31 12:29:40.943335", - "modified_by": "Administrator", - "module": "Press", - "name": "Top IO in Time by Event Category", - "owner": "Administrator", - "permissions": [], - "sort_field": "modified", - "sort_order": "DESC", - "states": [] -} \ No newline at end of file diff --git a/press/press/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.py b/press/press/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.py deleted file mode 100644 index 6fc6f0cd59..0000000000 --- a/press/press/doctype/top_io_in_time_by_event_category/top_io_in_time_by_event_category.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2024, Frappe and contributors -# For license information, please see license.txt - -# import frappe -from frappe.model.document import Document - - -class TopIOinTimebyEventCategory(Document): - pass diff --git a/press/press/doctype/top_io_time_by_user_thread/__init__.py b/press/press/doctype/top_io_time_by_user_thread/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/press/press/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.json b/press/press/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.json deleted file mode 100644 index d981892110..0000000000 --- a/press/press/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "actions": [], - "allow_rename": 1, - "creation": "2024-01-31 12:30:44.658579", - "doctype": "DocType", - "engine": "InnoDB", - "field_order": [ - "user", - "column_break_bwkb", - "thread_id", - "column_break_wpmq", - "process_list_id", - "section_break_jvyi", - "total_io", - "section_break_fkmu", - "total_time_us", - "column_break_wwye", - "avg_time_us", - "column_break_qbkg", - "min_time_us", - "column_break_qicb", - "max_time_us" - ], - "fields": [ - { - "fieldname": "user", - "fieldtype": "Data", - "in_list_view": 1, - "in_preview": 1, - "label": "User", - "read_only": 1 - }, - { - "fieldname": "column_break_bwkb", - "fieldtype": "Column Break" - }, - { - "columns": 1, - "fieldname": "thread_id", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Thread Id", - "read_only": 1 - }, - { - "fieldname": "column_break_wpmq", - "fieldtype": "Column Break" - }, - { - "columns": 1, - "fieldname": "process_list_id", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Process List Id", - "read_only": 1 - }, - { - "fieldname": "section_break_jvyi", - "fieldtype": "Section Break" - }, - { - "columns": 1, - "fieldname": "total_io", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Total IO", - "read_only": 1 - }, - { - "fieldname": "section_break_fkmu", - "fieldtype": "Section Break" - }, - { - "columns": 1, - "fieldname": "total_time_us", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Total Time (us)", - "read_only": 1 - }, - { - "fieldname": "column_break_wwye", - "fieldtype": "Column Break" - }, - { - "columns": 1, - "fieldname": "avg_time_us", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Avg Time (us)", - "read_only": 1 - }, - { - "fieldname": "column_break_qbkg", - "fieldtype": "Column Break" - }, - { - "columns": 1, - "fieldname": "min_time_us", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Min Time (us)", - "read_only": 1 - }, - { - "fieldname": "column_break_qicb", - "fieldtype": "Column Break" - }, - { - "columns": 1, - "fieldname": "max_time_us", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Max Time (us)", - "read_only": 1 - } - ], - "index_web_pages_for_search": 1, - "istable": 1, - "links": [], - "modified": "2024-01-31 12:40:21.527146", - "modified_by": "Administrator", - "module": "Press", - "name": "Top IO Time by User Thread", - "owner": "Administrator", - "permissions": [], - "sort_field": "modified", - "sort_order": "DESC", - "states": [] -} \ No newline at end of file diff --git a/press/press/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.py b/press/press/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.py deleted file mode 100644 index e3c3910c1d..0000000000 --- a/press/press/doctype/top_io_time_by_user_thread/top_io_time_by_user_thread.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2024, Frappe and contributors -# For license information, please see license.txt - -# import frappe -from frappe.model.document import Document - - -class TopIOTimebyUserThread(Document): - pass diff --git a/press/press/doctype/top_memory_by_event/__init__.py b/press/press/doctype/top_memory_by_event/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/press/press/doctype/top_memory_by_event/top_memory_by_event.json b/press/press/doctype/top_memory_by_event/top_memory_by_event.json deleted file mode 100644 index 2d437f8b6c..0000000000 --- a/press/press/doctype/top_memory_by_event/top_memory_by_event.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "actions": [], - "allow_rename": 1, - "creation": "2024-01-26 16:57:53.388269", - "doctype": "DocType", - "engine": "InnoDB", - "field_order": [ - "event_type", - "count", - "max_count", - "memory", - "avg_memory", - "max_memory", - "max_avg_memory" - ], - "fields": [ - { - "columns": 4, - "fieldname": "event_type", - "fieldtype": "Data", - "in_list_view": 1, - "in_preview": 1, - "label": "Event Type", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "count", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Count", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "max_count", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Max Count", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "memory", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Memory (MB)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "avg_memory", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Avg Memory (MB)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "max_memory", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Max Memory (MB)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "max_avg_memory", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Max Avg Memory (MB)", - "read_only": 1 - } - ], - "index_web_pages_for_search": 1, - "istable": 1, - "links": [], - "modified": "2024-01-30 15:59:14.089808", - "modified_by": "Administrator", - "module": "Press", - "name": "Top Memory By Event", - "owner": "Administrator", - "permissions": [], - "sort_field": "modified", - "sort_order": "DESC", - "states": [] -} \ No newline at end of file diff --git a/press/press/doctype/top_memory_by_event/top_memory_by_event.py b/press/press/doctype/top_memory_by_event/top_memory_by_event.py deleted file mode 100644 index b1df8a8f16..0000000000 --- a/press/press/doctype/top_memory_by_event/top_memory_by_event.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2024, Frappe and contributors -# For license information, please see license.txt - -# import frappe -from frappe.model.document import Document - - -class TopMemoryByEvent(Document): - pass diff --git a/press/press/doctype/top_memory_by_host/__init__.py b/press/press/doctype/top_memory_by_host/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/press/press/doctype/top_memory_by_host/top_memory_by_host.json b/press/press/doctype/top_memory_by_host/top_memory_by_host.json deleted file mode 100644 index 9955b95c01..0000000000 --- a/press/press/doctype/top_memory_by_host/top_memory_by_host.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "actions": [], - "allow_rename": 1, - "creation": "2024-01-26 16:56:11.211639", - "doctype": "DocType", - "engine": "InnoDB", - "field_order": [ - "host", - "count", - "memory", - "avg_memory", - "total_memory", - "max_memory" - ], - "fields": [ - { - "fieldname": "host", - "fieldtype": "Data", - "in_list_view": 1, - "in_preview": 1, - "label": "Host", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "count", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Count", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "memory", - "fieldtype": "Data", - "in_list_view": 1, - "in_preview": 1, - "label": "Memory (MB)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "avg_memory", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Avg Memory (MB)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "total_memory", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Total Memory (MB)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "max_memory", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Max Memory (MB)", - "read_only": 1 - } - ], - "index_web_pages_for_search": 1, - "istable": 1, - "links": [], - "modified": "2024-01-30 16:32:08.453330", - "modified_by": "Administrator", - "module": "Press", - "name": "Top Memory By Host", - "owner": "Administrator", - "permissions": [], - "sort_field": "modified", - "sort_order": "DESC", - "states": [] -} \ No newline at end of file diff --git a/press/press/doctype/top_memory_by_host/top_memory_by_host.py b/press/press/doctype/top_memory_by_host/top_memory_by_host.py deleted file mode 100644 index f578982781..0000000000 --- a/press/press/doctype/top_memory_by_host/top_memory_by_host.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2024, Frappe and contributors -# For license information, please see license.txt - -# import frappe -from frappe.model.document import Document - - -class TopMemoryByHost(Document): - pass diff --git a/press/press/doctype/top_memory_by_thread/__init__.py b/press/press/doctype/top_memory_by_thread/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/press/press/doctype/top_memory_by_thread/top_memory_by_thread.json b/press/press/doctype/top_memory_by_thread/top_memory_by_thread.json deleted file mode 100644 index 7abfb6ef76..0000000000 --- a/press/press/doctype/top_memory_by_thread/top_memory_by_thread.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "actions": [], - "allow_rename": 1, - "creation": "2024-01-26 17:01:34.463177", - "doctype": "DocType", - "engine": "InnoDB", - "field_order": [ - "thread_id", - "user", - "count", - "memory", - "avg_memory", - "max_memory", - "total_memory" - ], - "fields": [ - { - "columns": 1, - "fieldname": "thread_id", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Thread ID", - "read_only": 1 - }, - { - "fieldname": "user", - "fieldtype": "Data", - "in_list_view": 1, - "in_preview": 1, - "label": "User", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "count", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Count", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "memory", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Memory (MB)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "avg_memory", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Avg Memory (MB)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "max_memory", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Max Memory (MB)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "total_memory", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Total Memory (MB)", - "read_only": 1 - } - ], - "index_web_pages_for_search": 1, - "istable": 1, - "links": [], - "modified": "2024-01-30 16:32:31.434762", - "modified_by": "Administrator", - "module": "Press", - "name": "Top Memory By Thread", - "owner": "Administrator", - "permissions": [], - "sort_field": "modified", - "sort_order": "DESC", - "states": [] -} \ No newline at end of file diff --git a/press/press/doctype/top_memory_by_thread/top_memory_by_thread.py b/press/press/doctype/top_memory_by_thread/top_memory_by_thread.py deleted file mode 100644 index cd3c77b1cd..0000000000 --- a/press/press/doctype/top_memory_by_thread/top_memory_by_thread.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2024, Frappe and contributors -# For license information, please see license.txt - -# import frappe -from frappe.model.document import Document - - -class TopMemoryByThread(Document): - pass diff --git a/press/press/doctype/top_memory_by_user/__init__.py b/press/press/doctype/top_memory_by_user/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/press/press/doctype/top_memory_by_user/top_memory_by_user.json b/press/press/doctype/top_memory_by_user/top_memory_by_user.json deleted file mode 100644 index 4b787c3d27..0000000000 --- a/press/press/doctype/top_memory_by_user/top_memory_by_user.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "actions": [], - "allow_rename": 1, - "creation": "2024-01-26 16:52:53.037283", - "doctype": "DocType", - "engine": "InnoDB", - "field_order": [ - "user", - "count", - "memory", - "avg_memory", - "total_memory", - "max_memory" - ], - "fields": [ - { - "fieldname": "user", - "fieldtype": "Data", - "in_list_view": 1, - "in_preview": 1, - "label": "User", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "count", - "fieldtype": "Int", - "in_list_view": 1, - "in_preview": 1, - "label": "Count", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "memory", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Memory (MB)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "avg_memory", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Avg Memory (MB)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "total_memory", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Total Memory (MB)", - "read_only": 1 - }, - { - "columns": 1, - "fieldname": "max_memory", - "fieldtype": "Float", - "in_list_view": 1, - "in_preview": 1, - "label": "Max Memory (MB)", - "read_only": 1 - } - ], - "index_web_pages_for_search": 1, - "istable": 1, - "links": [], - "modified": "2024-01-30 16:30:09.455648", - "modified_by": "Administrator", - "module": "Press", - "name": "Top Memory By User", - "owner": "Administrator", - "permissions": [], - "sort_field": "modified", - "sort_order": "DESC", - "states": [] -} \ No newline at end of file diff --git a/press/press/doctype/top_memory_by_user/top_memory_by_user.py b/press/press/doctype/top_memory_by_user/top_memory_by_user.py deleted file mode 100644 index 53b6026784..0000000000 --- a/press/press/doctype/top_memory_by_user/top_memory_by_user.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2024, Frappe and contributors -# For license information, please see license.txt - -# import frappe -from frappe.model.document import Document - - -class TopMemoryByUser(Document): - pass From 8d59f09254b3418d32bcad16f884abdec87fbc41 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Sun, 4 Feb 2024 10:54:29 +0530 Subject: [PATCH 21/31] chore: remove junk doctype --- .../doctype/performance_report/__init__.py | 0 .../performance_report/performance_report.js | 6 - .../performance_report.json | 220 ------------------ .../performance_report/performance_report.py | 9 - .../test_performance_report.py | 9 - 5 files changed, 244 deletions(-) delete mode 100644 press/press/doctype/performance_report/__init__.py delete mode 100644 press/press/doctype/performance_report/performance_report.js delete mode 100644 press/press/doctype/performance_report/performance_report.json delete mode 100644 press/press/doctype/performance_report/performance_report.py delete mode 100644 press/press/doctype/performance_report/test_performance_report.py diff --git a/press/press/doctype/performance_report/__init__.py b/press/press/doctype/performance_report/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/press/press/doctype/performance_report/performance_report.js b/press/press/doctype/performance_report/performance_report.js deleted file mode 100644 index 408be0ffb1..0000000000 --- a/press/press/doctype/performance_report/performance_report.js +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) 2024, Frappe and contributors -// For license information, please see license.txt - -frappe.ui.form.on("Performance Report", { - refresh(frm) {}, -}); diff --git a/press/press/doctype/performance_report/performance_report.json b/press/press/doctype/performance_report/performance_report.json deleted file mode 100644 index 3ef1912346..0000000000 --- a/press/press/doctype/performance_report/performance_report.json +++ /dev/null @@ -1,220 +0,0 @@ -{ - "actions": [], - "allow_rename": 1, - "creation": "2024-01-26 16:06:33.989913", - "doctype": "DocType", - "engine": "InnoDB", - "field_order": [ - "general_tab", - "server", - "recorded_on", - "memory_usage_tab", - "total_allocated_memory", - "top_memory_by_user_section", - "top_memory_by_user", - "top_memory_by_host_section", - "top_memory_by_host", - "top_memory_by_thread_section", - "top_memory_by_thread", - "top_memory_by_event_section", - "top_memory_by_event", - "hot_spots_for_io_tab", - "top_file_io_activity_report_section", - "top_io_by_file_activity_report", - "top_io_by_file_by_time_section", - "top_io_by_file_by_time", - "high_cost_sql_statements_tab", - "database_schema_statistics_tab", - "wait_event_times_tab", - "innodb_statistics_tab", - "user_resource_use_tab" - ], - "fields": [ - { - "fieldname": "general_tab", - "fieldtype": "Tab Break", - "label": "General" - }, - { - "fieldname": "recorded_on", - "fieldtype": "Datetime", - "in_list_view": 1, - "label": "Recorded On", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "memory_usage_tab", - "fieldtype": "Tab Break", - "label": "Memory Usage" - }, - { - "fieldname": "hot_spots_for_io_tab", - "fieldtype": "Tab Break", - "label": "Hot Spots for I/O" - }, - { - "fieldname": "high_cost_sql_statements_tab", - "fieldtype": "Tab Break", - "label": "High Cost SQL Statements" - }, - { - "fieldname": "database_schema_statistics_tab", - "fieldtype": "Tab Break", - "label": "Database Schema Statistics" - }, - { - "fieldname": "wait_event_times_tab", - "fieldtype": "Tab Break", - "label": "Wait Event Times" - }, - { - "fieldname": "innodb_statistics_tab", - "fieldtype": "Tab Break", - "label": "InnoDB Statistics" - }, - { - "fieldname": "user_resource_use_tab", - "fieldtype": "Tab Break", - "label": "User Resource Use" - }, - { - "fieldname": "top_memory_by_user", - "fieldtype": "Table", - "options": "Top Memory By User", - "read_only": 1 - }, - { - "fieldname": "top_memory_by_host", - "fieldtype": "Table", - "options": "Top Memory By Host", - "read_only": 1 - }, - { - "fieldname": "top_memory_by_event", - "fieldtype": "Table", - "options": "Top Memory By Event", - "read_only": 1 - }, - { - "fieldname": "top_memory_by_thread", - "fieldtype": "Table", - "options": "Top Memory By Thread", - "read_only": 1 - }, - { - "fieldname": "total_allocated_memory", - "fieldtype": "Float", - "label": "Total Allocated Memory (MB)", - "read_only": 1 - }, - { - "fieldname": "server", - "fieldtype": "Link", - "in_list_view": 1, - "label": "Database Server", - "options": "Database Server", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "top_io_by_file_activity_report", - "fieldtype": "Table", - "options": "Top File IO Activity Report", - "read_only": 1 - }, - { - "fieldname": "top_io_by_file_by_time", - "fieldtype": "Table", - "options": "Top IO by File by Time", - "read_only": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "true", - "fieldname": "top_memory_by_event_section", - "fieldtype": "Section Break", - "label": "Top Memory By Event" - }, - { - "collapsible": 1, - "collapsible_depends_on": "true", - "fieldname": "top_memory_by_user_section", - "fieldtype": "Section Break", - "label": "Top Memory By User" - }, - { - "collapsible": 1, - "collapsible_depends_on": "true", - "fieldname": "top_memory_by_host_section", - "fieldtype": "Section Break", - "label": "Top Memory By Host" - }, - { - "collapsible": 1, - "collapsible_depends_on": "true", - "fieldname": "top_memory_by_thread_section", - "fieldtype": "Section Break", - "label": "Top Memory By Thread" - }, - { - "collapsible": 1, - "collapsible_depends_on": "true", - "fieldname": "top_file_io_activity_report_section", - "fieldtype": "Section Break", - "label": "Top File I/O Activity Report" - }, - { - "collapsible": 1, - "collapsible_depends_on": "true", - "fieldname": "top_io_by_file_by_time_section", - "fieldtype": "Section Break", - "label": "Top IO by File by Time" - } - ], - "in_create": 1, - "index_web_pages_for_search": 1, - "links": [], - "modified": "2024-01-30 16:34:38.595383", - "modified_by": "Administrator", - "module": "Press", - "name": "Performance Report", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "share": 1, - "write": 1 - }, - { - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Press Admin", - "share": 1, - "write": 1 - }, - { - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Press Member", - "share": 1, - "write": 1 - } - ], - "sort_field": "modified", - "sort_order": "DESC", - "states": [] -} \ No newline at end of file diff --git a/press/press/doctype/performance_report/performance_report.py b/press/press/doctype/performance_report/performance_report.py deleted file mode 100644 index e7e9401f24..0000000000 --- a/press/press/doctype/performance_report/performance_report.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2024, Frappe and contributors -# For license information, please see license.txt - -# import frappe -from frappe.model.document import Document - - -class PerformanceReport(Document): - pass diff --git a/press/press/doctype/performance_report/test_performance_report.py b/press/press/doctype/performance_report/test_performance_report.py deleted file mode 100644 index 81d7faf375..0000000000 --- a/press/press/doctype/performance_report/test_performance_report.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2024, Frappe and Contributors -# See license.txt - -# import frappe -from frappe.tests.utils import FrappeTestCase - - -class TestPerformanceReport(FrappeTestCase): - pass From c90e2c51c78175d8350f4dee6a8c98513be1fc89 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Thu, 8 Feb 2024 10:42:42 +0530 Subject: [PATCH 22/31] fix: resolve merge conflicts --- .../doctype/database_server/database_server.json | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/press/press/doctype/database_server/database_server.json b/press/press/doctype/database_server/database_server.json index 52f56801fc..0daa92e853 100644 --- a/press/press/doctype/database_server/database_server.json +++ b/press/press/doctype/database_server/database_server.json @@ -92,7 +92,6 @@ "is_innodb_buffer_stats_by_table_perf_report_enabled", "is_user_resource_use_overview_perf_report_enabled", "is_user_resource_use_io_statistics_perf_report_enabled", - "is_user_resource_use_statement_statistics_perf_report_enabled" "mariadb_stalk_section", "is_stalk_setup", "stalk_gdb_collector", @@ -452,6 +451,8 @@ "read_only": 1 }, { + "collapsible": 1, + "default": "1", "fieldname": "performance_schema_report_section", "fieldtype": "Section Break", "label": "Performance Schema Report" @@ -635,12 +636,8 @@ "label": "User Resource Use I/O Statistics" }, { - "default": "1", - "fieldname": "is_user_resource_use_statement_statistics_perf_report_enabled", - "fieldtype": "Check", - "label": "User Resource Use Statement Statistics" -======= "collapsible": 1, + "default": "1", "fieldname": "mariadb_stalk_section", "fieldtype": "Section Break", "label": "MariaDB Stalk" @@ -704,7 +701,7 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2024-02-05 21:30:29.998544", + "modified": "2024-02-08 10:42:07.116593", "modified_by": "Administrator", "module": "Press", "name": "Database Server", From 3396707bca92f9218de0775b228b8c180c207d2a Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Thu, 8 Feb 2024 10:46:16 +0530 Subject: [PATCH 23/31] fix: default keep sections close --- .../performance_report.json | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/press/database_performance_schema/doctype/performance_report/performance_report.json b/press/database_performance_schema/doctype/performance_report/performance_report.json index 243d13bf18..e79efd8c86 100644 --- a/press/database_performance_schema/doctype/performance_report/performance_report.json +++ b/press/database_performance_schema/doctype/performance_report/performance_report.json @@ -112,7 +112,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "Shows users consuming the most memory", "fieldname": "top_memory_by_user_section", "fieldtype": "Section Break", @@ -126,7 +126,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "Shows hosts consuming the most memory", "fieldname": "top_memory_by_host_section", "fieldtype": "Section Break", @@ -140,7 +140,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "Shows threads consuming the most memory", "fieldname": "top_memory_by_thread_section", "fieldtype": "Section Break", @@ -154,7 +154,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "Shows events consuming the most memory", "fieldname": "top_memory_by_event_section", "fieldtype": "Section Break", @@ -173,7 +173,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "Show the Files doing the most IOs", "fieldname": "top_file_io_activity_report_section", "fieldtype": "Section Break", @@ -187,7 +187,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "Show highest IO usage by file and latency", "fieldname": "top_io_by_file_by_time_section", "fieldtype": "Section Break", @@ -226,7 +226,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "Show the highest IO Data usage by event categories", "fieldname": "top_io_by_event_category_section", "fieldtype": "Section Break", @@ -240,7 +240,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "Show the highest IO time consumers by event categories", "fieldname": "top_io_in_time_by_event_category_section", "fieldtype": "Section Break", @@ -254,7 +254,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "Shows the highest IO time consumers by event categories", "fieldname": "top_io_time_by_userthread_section", "fieldtype": "Section Break", @@ -268,7 +268,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "List statements with various aggregated statistics", "fieldname": "statement_analysis_section", "fieldtype": "Section Break", @@ -282,7 +282,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "List all statements whose average runtime, in microseconds is in highest 5 percent", "fieldname": "statements_in_highest_5_percent_by_runtime_section", "fieldtype": "Section Break", @@ -296,7 +296,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "Lists all statements that use temporary tables - access the highest # of disk temporary tables, then memory temp tables", "fieldname": "statements_using_temp_tables_section", "fieldtype": "Section Break", @@ -310,7 +310,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "List all normalized statements that have done sorts", "fieldname": "statements_with_sorting_section", "fieldtype": "Section Break", @@ -324,7 +324,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "Lists statements that have performed a full table scan", "fieldname": "statements_with_full_table_scans_section", "fieldtype": "Section Break", @@ -338,7 +338,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "List statements that have raised errors or warnings", "fieldname": "statements_with_errors_or_warnings_section", "fieldtype": "Section Break", @@ -352,7 +352,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "fieldname": "schema_index_statistics_section", "fieldtype": "Section Break", "label": "Schema Index Statistics" @@ -365,7 +365,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "fieldname": "schema_table_statistics_section", "fieldtype": "Section Break", "label": "Schema Table Statistics" @@ -378,14 +378,14 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "fieldname": "schema_table_statistics_with_innodb_buffer_section", "fieldtype": "Section Break", "label": "Schema Table Statistics (with InnoDB Buffer)" }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "Find tables that are beign accesses by full table scans", "fieldname": "tables_with_full_table_scans_section", "fieldtype": "Section Break", @@ -399,7 +399,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "fieldname": "unused_indexes_section", "fieldtype": "Section Break", "label": "Unused Indexes" @@ -412,7 +412,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "Lists the top wait events by theit total time, ignoring idle", "fieldname": "global_waits_by_time_section", "fieldtype": "Section Break", @@ -426,7 +426,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "Lists the top wait events by theit total time, ignoring idle", "fieldname": "waits_by_user_by_time_section", "fieldtype": "Section Break", @@ -440,7 +440,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "Lists the top wait classes by total time, ignoring idle", "fieldname": "wait_classes_by_time_section", "fieldtype": "Section Break", @@ -454,7 +454,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "Lists the top wait classes by average time, ignoring idle", "fieldname": "waits_classes_by_average_time_section", "fieldtype": "Section Break", @@ -468,7 +468,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "Summarizes the output of the INFORMATION_SCHEMA.INNODB_BUFFER_PAGE table, aggregating by schema", "fieldname": "innodb_buffer_stats_by_schema_section", "fieldtype": "Section Break", @@ -482,7 +482,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "Summarizes the output of the INFORMATION_SCHEMA.INNODB_BUFFER_PAGE table, aggregating by schema and table name", "fieldname": "innodb_buffer_stats_by_table_section", "fieldtype": "Section Break", @@ -496,7 +496,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "Shows resource use summary for each user", "fieldname": "overview_section", "fieldtype": "Section Break", @@ -510,7 +510,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "Shoes I/O usage for each user", "fieldname": "io_statistics_section", "fieldtype": "Section Break", @@ -524,7 +524,7 @@ }, { "collapsible": 1, - "collapsible_depends_on": "true", + "default": "1", "description": "Shows statement execution statistics for each user", "fieldname": "statement_statistics_section", "fieldtype": "Section Break", @@ -546,7 +546,7 @@ "in_create": 1, "index_web_pages_for_search": 1, "links": [], - "modified": "2024-02-01 12:22:15.901845", + "modified": "2024-02-08 10:46:01.135333", "modified_by": "Administrator", "module": "Database Performance Schema", "name": "Performance Report", From 5e2c8f5ddf5dddc546328964089d74f3011e6c48 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Tue, 19 Mar 2024 11:24:07 +0530 Subject: [PATCH 24/31] chore: fix lint --- .../database_server/database_server.py | 803 +++++++++++------- .../database_server_dashboard.py | 2 +- 2 files changed, 477 insertions(+), 328 deletions(-) diff --git a/press/press/doctype/database_server/database_server.py b/press/press/doctype/database_server/database_server.py index 903838b5fd..39d2da9fa6 100644 --- a/press/press/doctype/database_server/database_server.py +++ b/press/press/doctype/database_server/database_server.py @@ -784,11 +784,7 @@ def _reconfigure_mariadb_exporter(self): def fetch_performance_report(self): if self.is_performance_schema_enabled: frappe.enqueue_doc( - self.doctype, - self.name, - "_fetch_performance_report", - queue="long", - timeout=1200 + self.doctype, self.name, "_fetch_performance_report", queue="long", timeout=1200 ) frappe.msgprint("Performance Schema Report Fetching Started") else: @@ -800,381 +796,524 @@ def _fetch_performance_report(self): record = frappe.new_doc("Performance Report") record.server = self.name record.recorded_on = frappe.utils.now_datetime() - record.total_allocated_memory = self._bytes_to_mb(reports.get("total_allocated_memory", 0)) + record.total_allocated_memory = self._bytes_to_mb( + reports.get("total_allocated_memory", 0) + ) record.top_memory_by_user = [] for r in reports.get("top_memory_by_user", []): - record.append("top_memory_by_user", { - "user": r.get("user"), - "count_billion": self._convert_to_billion(r.get("current_count_used")), - "memory_mb": self._bytes_to_mb(r.get("current_allocated")), - "avg_memory_mb": self._bytes_to_mb(r.get("current_avg_alloc")), - "total_memory_mb": self._bytes_to_mb(r.get("total_allocated")), - "max_memory_mb": self._bytes_to_mb(r.get("current_max_alloc")), - }) + record.append( + "top_memory_by_user", + { + "user": r.get("user"), + "count_billion": self._convert_to_billion(r.get("current_count_used")), + "memory_mb": self._bytes_to_mb(r.get("current_allocated")), + "avg_memory_mb": self._bytes_to_mb(r.get("current_avg_alloc")), + "total_memory_mb": self._bytes_to_mb(r.get("total_allocated")), + "max_memory_mb": self._bytes_to_mb(r.get("current_max_alloc")), + }, + ) record.top_memory_by_host = [] for r in reports.get("top_memory_by_host", []): - record.append("top_memory_by_host", { - "host": r.get("host"), - "count_billion": self._convert_to_billion(r.get("current_count_used")), - "memory_mb": self._bytes_to_mb(r.get("current_allocated")), - "avg_memory_mb": self._bytes_to_mb(r.get("current_avg_alloc")), - "total_memory_mb": self._bytes_to_mb(r.get("total_allocated")), - "max_memory_mb": self._bytes_to_mb(r.get("current_max_alloc")), - }) + record.append( + "top_memory_by_host", + { + "host": r.get("host"), + "count_billion": self._convert_to_billion(r.get("current_count_used")), + "memory_mb": self._bytes_to_mb(r.get("current_allocated")), + "avg_memory_mb": self._bytes_to_mb(r.get("current_avg_alloc")), + "total_memory_mb": self._bytes_to_mb(r.get("total_allocated")), + "max_memory_mb": self._bytes_to_mb(r.get("current_max_alloc")), + }, + ) record.top_memory_by_event = [] for r in reports.get("top_memory_by_event", []): - record.append("top_memory_by_event", { - "event_type": r.get("event_name"), - "count_billion": self._convert_to_billion(r.get("current_count")), - "max_count_billion": self._convert_to_billion(r.get("high_count")), - "memory_mb": self._bytes_to_mb(r.get("current_alloc")), - "avg_memory_mb": self._bytes_to_mb(r.get("current_avg_alloc")), - "max_memory_mb": self._bytes_to_mb(r.get("high_alloc")), - "max_avg_memory_mb": self._bytes_to_mb(r.get("high_avg_alloc")), - }) + record.append( + "top_memory_by_event", + { + "event_type": r.get("event_name"), + "count_billion": self._convert_to_billion(r.get("current_count")), + "max_count_billion": self._convert_to_billion(r.get("high_count")), + "memory_mb": self._bytes_to_mb(r.get("current_alloc")), + "avg_memory_mb": self._bytes_to_mb(r.get("current_avg_alloc")), + "max_memory_mb": self._bytes_to_mb(r.get("high_alloc")), + "max_avg_memory_mb": self._bytes_to_mb(r.get("high_avg_alloc")), + }, + ) record.top_memory_by_thread = [] for r in reports.get("top_memory_by_thread", []): - record.append("top_memory_by_thread", { - "thread_id": r.get("thread_id"), - "user": r.get("user"), - "count_billion": r.get("current_count_used"), - "memory_mb": self._bytes_to_mb(r.get("current_allocated")), - "avg_memory_mb": self._bytes_to_mb(r.get("current_avg_alloc")), - "total_memory_mb": self._bytes_to_mb(r.get("total_allocated")), - "max_memory_mb": self._bytes_to_mb(r.get("current_max_alloc")), - }) + record.append( + "top_memory_by_thread", + { + "thread_id": r.get("thread_id"), + "user": r.get("user"), + "count_billion": r.get("current_count_used"), + "memory_mb": self._bytes_to_mb(r.get("current_allocated")), + "avg_memory_mb": self._bytes_to_mb(r.get("current_avg_alloc")), + "total_memory_mb": self._bytes_to_mb(r.get("total_allocated")), + "max_memory_mb": self._bytes_to_mb(r.get("current_max_alloc")), + }, + ) record.top_io_by_file_activity_report = [] for r in reports.get("top_io_by_file_activity_report", []): - record.append("top_io_by_file_activity_report", { - "file": r.get("file"), - "total_io_mb": self._bytes_to_mb(r.get("total")), - "read_count_billion": self._convert_to_billion(r.get("count_read")), - "total_read_io_mb": self._bytes_to_mb(r.get("total_read")), - "avg_read_io_mb": self._bytes_to_mb(r.get("avg_read")), - "write_count_billion": self._convert_to_billion(r.get("count_write")), - "total_write_io_mb": self._bytes_to_mb(r.get("total_written")), - "avg_write_io_mb": self._bytes_to_mb(r.get("avg_write")), - "write_percentage": r.get("write_pct"), - }) + record.append( + "top_io_by_file_activity_report", + { + "file": r.get("file"), + "total_io_mb": self._bytes_to_mb(r.get("total")), + "read_count_billion": self._convert_to_billion(r.get("count_read")), + "total_read_io_mb": self._bytes_to_mb(r.get("total_read")), + "avg_read_io_mb": self._bytes_to_mb(r.get("avg_read")), + "write_count_billion": self._convert_to_billion(r.get("count_write")), + "total_write_io_mb": self._bytes_to_mb(r.get("total_written")), + "avg_write_io_mb": self._bytes_to_mb(r.get("avg_write")), + "write_percentage": r.get("write_pct"), + }, + ) record.top_io_by_file_by_time = [] for r in reports.get("top_io_by_file_by_time", []): - record.append("top_io_by_file_by_time", { - "file": r.get("file"), - "total_count_billion": self._convert_to_billion(r.get("total")), - "read_count_billion": self._convert_to_billion(r.get("count_read")), - "write_count_billion": self._convert_to_billion(r.get("count_write")), - "misc_count_billion": self._convert_to_billion(r.get("count_misc")), - "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), - "read_time_billion_ps": self._convert_to_billion(r.get("read_latency")), - "write_time_billion_ps": self._convert_to_billion(r.get("write_latency")), - "misc_time_billion_ps": self._convert_to_billion(r.get("misc_latency")), - }) + record.append( + "top_io_by_file_by_time", + { + "file": r.get("file"), + "total_count_billion": self._convert_to_billion(r.get("total")), + "read_count_billion": self._convert_to_billion(r.get("count_read")), + "write_count_billion": self._convert_to_billion(r.get("count_write")), + "misc_count_billion": self._convert_to_billion(r.get("count_misc")), + "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), + "read_time_billion_ps": self._convert_to_billion(r.get("read_latency")), + "write_time_billion_ps": self._convert_to_billion(r.get("write_latency")), + "misc_time_billion_ps": self._convert_to_billion(r.get("misc_latency")), + }, + ) record.top_io_by_event_category = [] for r in reports.get("top_io_by_event_category", []): - record.append("top_io_by_event_category", { - "event_type": r.get("event_name"), - "total_requested_mb": self._bytes_to_mb(r.get("total_requested")), - "total_count_billion": self._convert_to_billion(r.get("total")), - "read_count_billion": self._convert_to_billion(r.get("count_read")), - "write_count_billion": self._convert_to_billion(r.get("count_write")), - "total_read_mb": self._bytes_to_mb(r.get("total_read")), - "avg_read_mb": self._bytes_to_mb(r.get("avg_read")), - "total_written_mb": self._bytes_to_mb(r.get("total_written")), - "avg_written_mb": self._bytes_to_mb(r.get("avg_written")), - "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), - "min_time_billion_ps": self._convert_to_billion(r.get("min_latency")), - "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), - "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), - }) + record.append( + "top_io_by_event_category", + { + "event_type": r.get("event_name"), + "total_requested_mb": self._bytes_to_mb(r.get("total_requested")), + "total_count_billion": self._convert_to_billion(r.get("total")), + "read_count_billion": self._convert_to_billion(r.get("count_read")), + "write_count_billion": self._convert_to_billion(r.get("count_write")), + "total_read_mb": self._bytes_to_mb(r.get("total_read")), + "avg_read_mb": self._bytes_to_mb(r.get("avg_read")), + "total_written_mb": self._bytes_to_mb(r.get("total_written")), + "avg_written_mb": self._bytes_to_mb(r.get("avg_written")), + "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), + "min_time_billion_ps": self._convert_to_billion(r.get("min_latency")), + "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), + "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), + }, + ) record.top_io_in_time_by_event_category = [] for r in reports.get("top_io_in_time_by_event_category", []): - record.append("top_io_in_time_by_event_category", { - "event_type": r.get("event_name"), - "total_count_billion": self._bytes_to_mb(r.get("total")), - "read_count_billion": self._convert_to_billion(r.get("count_read")), - "write_count_billion": self._convert_to_billion(r.get("count_write")), - "total_read_mb": self._bytes_to_mb(r.get("total_read")), - "avg_read_mb": self._bytes_to_mb(r.get("avg_read")), - "total_written_mb": self._bytes_to_mb(r.get("total_written")), - "avg_written_mb": self._bytes_to_mb(r.get("avg_written")), - "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), - "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), - "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), - "read_time_billion_ps": self._convert_to_billion(r.get("read_latency")), - "write_time_billion_ps": self._convert_to_billion(r.get("write_latency")), - "misc_time_billion_ps": self._convert_to_billion(r.get("misc_latency")), - }) + record.append( + "top_io_in_time_by_event_category", + { + "event_type": r.get("event_name"), + "total_count_billion": self._bytes_to_mb(r.get("total")), + "read_count_billion": self._convert_to_billion(r.get("count_read")), + "write_count_billion": self._convert_to_billion(r.get("count_write")), + "total_read_mb": self._bytes_to_mb(r.get("total_read")), + "avg_read_mb": self._bytes_to_mb(r.get("avg_read")), + "total_written_mb": self._bytes_to_mb(r.get("total_written")), + "avg_written_mb": self._bytes_to_mb(r.get("avg_written")), + "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), + "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), + "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), + "read_time_billion_ps": self._convert_to_billion(r.get("read_latency")), + "write_time_billion_ps": self._convert_to_billion(r.get("write_latency")), + "misc_time_billion_ps": self._convert_to_billion(r.get("misc_latency")), + }, + ) record.top_io_by_user_or_thread = [] for r in reports.get("top_io_by_user_or_thread", []): - record.append("top_io_by_user_or_thread", { - "user": r.get("user"), - "thread_id": r.get("thread_id"), - "process_list_id": r.get("processlist_id"), - "total_count_billion": self._convert_to_billion(r.get("total")), - "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), - "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), - "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), - "min_time_billion_ps": self._convert_to_billion(r.get("min_latency")), - }) + record.append( + "top_io_by_user_or_thread", + { + "user": r.get("user"), + "thread_id": r.get("thread_id"), + "process_list_id": r.get("processlist_id"), + "total_count_billion": self._convert_to_billion(r.get("total")), + "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), + "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), + "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), + "min_time_billion_ps": self._convert_to_billion(r.get("min_latency")), + }, + ) record.statement_analysis = [] for r in reports.get("statement_analysis", []): - record.append("statement_analysis", { - "query": r.get("query"), - "full_table_scan": r.get("full_scan"), - "executed_count_billion": self._convert_to_billion(r.get("exec_count")), - "errors_count_billion": self._convert_to_billion(r.get("err_count")), - "warnings_count_billion": self._convert_to_billion(r.get("warn_count")), - "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), - "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), - "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), - "rows_sent_count_billion": self._convert_to_billion(r.get("rows_sent")), - "avg_rows_sent_count_billion": self._convert_to_billion(r.get("rows_sent_avg")), - "rows_scanned_count_billion": self._convert_to_billion(r.get("rows_examined")), - "avg_rows_scanned_count_billion": self._convert_to_billion(r.get("rows_examined_avg")), - "tmp_tables_count_billion": self._convert_to_billion(r.get("tmp_tables")), - "tmp_disk_tables_count_billion": self._convert_to_billion(r.get("tmp_disk_tables")), - "rows_sorted_count_billion": self._convert_to_billion(r.get("rows_sorted")), - "sort_merge_passes_count_billion": self._convert_to_billion(r.get("sort_merge_passes")), - }) + record.append( + "statement_analysis", + { + "query": r.get("query"), + "full_table_scan": r.get("full_scan"), + "executed_count_billion": self._convert_to_billion(r.get("exec_count")), + "errors_count_billion": self._convert_to_billion(r.get("err_count")), + "warnings_count_billion": self._convert_to_billion(r.get("warn_count")), + "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), + "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), + "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), + "rows_sent_count_billion": self._convert_to_billion(r.get("rows_sent")), + "avg_rows_sent_count_billion": self._convert_to_billion(r.get("rows_sent_avg")), + "rows_scanned_count_billion": self._convert_to_billion(r.get("rows_examined")), + "avg_rows_scanned_count_billion": self._convert_to_billion( + r.get("rows_examined_avg") + ), + "tmp_tables_count_billion": self._convert_to_billion(r.get("tmp_tables")), + "tmp_disk_tables_count_billion": self._convert_to_billion( + r.get("tmp_disk_tables") + ), + "rows_sorted_count_billion": self._convert_to_billion(r.get("rows_sorted")), + "sort_merge_passes_count_billion": self._convert_to_billion( + r.get("sort_merge_passes") + ), + }, + ) record.statements_in_highest_5_percentile = [] for r in reports.get("statements_in_highest_5_percentile", []): - record.append("statements_in_highest_5_percentile", { - "query": r.get("query"), - "full_table_scan": r.get("full_scan"), - "executed_count_billion": self._convert_to_billion(r.get("exec_count")), - "errors_count_billion": self._convert_to_billion(r.get("err_count")), - "warnings_count_billion": self._convert_to_billion(r.get("warn_count")), - "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), - "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), - "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), - "rows_sent_count_billion": self._convert_to_billion(r.get("rows_sent")), - "avg_rows_sent_count_billion": self._convert_to_billion(r.get("rows_sent_avg")), - "rows_scanned_count_billion": self._convert_to_billion(r.get("rows_examined")), - "avg_rows_scanned_count_billion": self._convert_to_billion(r.get("rows_examined_avg")), - }) + record.append( + "statements_in_highest_5_percentile", + { + "query": r.get("query"), + "full_table_scan": r.get("full_scan"), + "executed_count_billion": self._convert_to_billion(r.get("exec_count")), + "errors_count_billion": self._convert_to_billion(r.get("err_count")), + "warnings_count_billion": self._convert_to_billion(r.get("warn_count")), + "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), + "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), + "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), + "rows_sent_count_billion": self._convert_to_billion(r.get("rows_sent")), + "avg_rows_sent_count_billion": self._convert_to_billion(r.get("rows_sent_avg")), + "rows_scanned_count_billion": self._convert_to_billion(r.get("rows_examined")), + "avg_rows_scanned_count_billion": self._convert_to_billion( + r.get("rows_examined_avg") + ), + }, + ) record.statements_using_temp_tables = [] for r in reports.get("statements_using_temp_tables", []): - record.append("statements_using_temp_tables", { - "query": r.get("query"), - "executed_count_billion": self._convert_to_billion(r.get("exec_count")), - "tmp_tables_in_memory_count_billion": self._convert_to_billion(r.get("memory_tmp_tables")), - "tmp_tables_in_disk_count_billion": self._convert_to_billion(r.get("disk_tmp_tables")), - "avg_tmp_tables_per_query": r.get("avg_tmp_tables_per_query"), - "tmp_tables_to_disk_percent": r.get("tmp_tables_to_disk_pct"), - }) + record.append( + "statements_using_temp_tables", + { + "query": r.get("query"), + "executed_count_billion": self._convert_to_billion(r.get("exec_count")), + "tmp_tables_in_memory_count_billion": self._convert_to_billion( + r.get("memory_tmp_tables") + ), + "tmp_tables_in_disk_count_billion": self._convert_to_billion( + r.get("disk_tmp_tables") + ), + "avg_tmp_tables_per_query": r.get("avg_tmp_tables_per_query"), + "tmp_tables_to_disk_percent": r.get("tmp_tables_to_disk_pct"), + }, + ) record.statements_with_sorting = [] for r in reports.get("statements_with_sorting", []): - record.append("statements_with_sorting", { - "query": r.get("query"), - "executed_count_billion": self._convert_to_billion(r.get("exec_count")), - "sort_merge_passes_count_billion": self._convert_to_billion(r.get("sort_merge_passes")), - "avg_sort_merges_count_billion": self._convert_to_billion(r.get("avg_sort_merges")), - "sorts_using_scans_count_billion": self._convert_to_billion(r.get("sort_using_scans")), - "sort_using_range_count_billion": self._convert_to_billion(r.get("sort_using_range")), - "rows_sorted_count_billion": self._convert_to_billion(r.get("rows_sorted")), - "avg_rows_sorted_count_billion": self._convert_to_billion(r.get("avg_rows_sorted")), - }) + record.append( + "statements_with_sorting", + { + "query": r.get("query"), + "executed_count_billion": self._convert_to_billion(r.get("exec_count")), + "sort_merge_passes_count_billion": self._convert_to_billion( + r.get("sort_merge_passes") + ), + "avg_sort_merges_count_billion": self._convert_to_billion( + r.get("avg_sort_merges") + ), + "sorts_using_scans_count_billion": self._convert_to_billion( + r.get("sort_using_scans") + ), + "sort_using_range_count_billion": self._convert_to_billion( + r.get("sort_using_range") + ), + "rows_sorted_count_billion": self._convert_to_billion(r.get("rows_sorted")), + "avg_rows_sorted_count_billion": self._convert_to_billion( + r.get("avg_rows_sorted") + ), + }, + ) record.statements_with_full_table_scans = [] for r in reports.get("statements_with_full_table_scans", []): - record.append("statements_with_full_table_scans", { - "query": r.get("query"), - "executed_count_billion": self._convert_to_billion(r.get("exec_count")), - "no_index_used_count_billion": self._convert_to_billion(r.get("no_index_used_count")), - "no_good_index_used_count_billion": self._convert_to_billion(r.get("no_good_index_used_count")), - "no_index_used_percentage": r.get("no_index_used_pct"), - }) + record.append( + "statements_with_full_table_scans", + { + "query": r.get("query"), + "executed_count_billion": self._convert_to_billion(r.get("exec_count")), + "no_index_used_count_billion": self._convert_to_billion( + r.get("no_index_used_count") + ), + "no_good_index_used_count_billion": self._convert_to_billion( + r.get("no_good_index_used_count") + ), + "no_index_used_percentage": r.get("no_index_used_pct"), + }, + ) record.statements_with_errors_or_warnings = [] for r in reports.get("statements_with_errors_or_warnings", []): - record.append("statements_with_errors_or_warnings", { - "query": r.get("query"), - "executed_count_billion": self._convert_to_billion(r.get("exec_count")), - "errors_count_billion": self._convert_to_billion(r.get("errors")), - "warnings_count_billion": self._convert_to_billion(r.get("warnings")), - "error_percentage": r.get("error_pct"), - "warning_percentage": r.get("warning_pct"), - }) + record.append( + "statements_with_errors_or_warnings", + { + "query": r.get("query"), + "executed_count_billion": self._convert_to_billion(r.get("exec_count")), + "errors_count_billion": self._convert_to_billion(r.get("errors")), + "warnings_count_billion": self._convert_to_billion(r.get("warnings")), + "error_percentage": r.get("error_pct"), + "warning_percentage": r.get("warning_pct"), + }, + ) record.schema_index_statistics = [] for r in reports.get("schema_index_statistics", []): - record.append("schema_index_statistics", { - "schema": r.get("table_schema"), - "table": r.get("table_name"), - "index": r.get("index_name"), - "rows_selected_count_billion": self._convert_to_billion(r.get("rows_selected")), - "rows_inserted_count_billion": self._convert_to_billion(r.get("rows_inserted")), - "rows_updated_count_billion": self._convert_to_billion(r.get("rows_updated")), - "rows_deleted_count_billion": self._convert_to_billion(r.get("rows_deleted")), - "select_time_billion_ps": self._convert_to_billion(r.get("select_latency")), - "insert_time_billion_ps": self._convert_to_billion(r.get("insert_latency")), - "update_time_billion_ps": self._convert_to_billion(r.get("update_latency")), - "delete_time_billion_ps": self._convert_to_billion(r.get("delete_latency")), - }) + record.append( + "schema_index_statistics", + { + "schema": r.get("table_schema"), + "table": r.get("table_name"), + "index": r.get("index_name"), + "rows_selected_count_billion": self._convert_to_billion(r.get("rows_selected")), + "rows_inserted_count_billion": self._convert_to_billion(r.get("rows_inserted")), + "rows_updated_count_billion": self._convert_to_billion(r.get("rows_updated")), + "rows_deleted_count_billion": self._convert_to_billion(r.get("rows_deleted")), + "select_time_billion_ps": self._convert_to_billion(r.get("select_latency")), + "insert_time_billion_ps": self._convert_to_billion(r.get("insert_latency")), + "update_time_billion_ps": self._convert_to_billion(r.get("update_latency")), + "delete_time_billion_ps": self._convert_to_billion(r.get("delete_latency")), + }, + ) record.schema_table_statistics = [] for r in reports.get("schema_table_statistics", []): - record.append("schema_table_statistics", { - "schema": r.get("table_schema"), - "table": r.get("table_name"), - "rows_fetched_count_billion": self._convert_to_billion(r.get("rows_fetched")), - "fetch_time_billion_ps": self._convert_to_billion(r.get("fetch_latency")), - "rows_inserted_count_billion": self._convert_to_billion(r.get("rows_inserted")), - "insert_time_billion_ps": self._convert_to_billion(r.get("insert_latency")), - "rows_updated_count_billion": self._convert_to_billion(r.get("rows_updated")), - "update_time_billion_ps": self._convert_to_billion(r.get("update_latency")), - "rows_deleted_count_billion": self._convert_to_billion(r.get("rows_deleted")), - "delete_time_billion_ps": self._convert_to_billion(r.get("delete_latency")), - "io_read_requests_count_billion": self._convert_to_billion(r.get("io_read_requests")), - "io_read_mb": self._convert_to_billion(r.get("io_read")), - "io_read_time_billion_ps": self._convert_to_billion(r.get("io_read_latency")), - "io_write_requests_count_billion": self._convert_to_billion(r.get("io_write_requests")), - "io_write_mb": self._convert_to_billion(r.get("io_write")), - "io_write_time_billion_ps": self._convert_to_billion(r.get("io_write_latency")), - "io_misc_requests_count_billion": self._convert_to_billion(r.get("io_misc_requests")), - "io_misc_time_billion_ps": self._convert_to_billion(r.get("io_misc_latency")), - }) + record.append( + "schema_table_statistics", + { + "schema": r.get("table_schema"), + "table": r.get("table_name"), + "rows_fetched_count_billion": self._convert_to_billion(r.get("rows_fetched")), + "fetch_time_billion_ps": self._convert_to_billion(r.get("fetch_latency")), + "rows_inserted_count_billion": self._convert_to_billion(r.get("rows_inserted")), + "insert_time_billion_ps": self._convert_to_billion(r.get("insert_latency")), + "rows_updated_count_billion": self._convert_to_billion(r.get("rows_updated")), + "update_time_billion_ps": self._convert_to_billion(r.get("update_latency")), + "rows_deleted_count_billion": self._convert_to_billion(r.get("rows_deleted")), + "delete_time_billion_ps": self._convert_to_billion(r.get("delete_latency")), + "io_read_requests_count_billion": self._convert_to_billion( + r.get("io_read_requests") + ), + "io_read_mb": self._convert_to_billion(r.get("io_read")), + "io_read_time_billion_ps": self._convert_to_billion(r.get("io_read_latency")), + "io_write_requests_count_billion": self._convert_to_billion( + r.get("io_write_requests") + ), + "io_write_mb": self._convert_to_billion(r.get("io_write")), + "io_write_time_billion_ps": self._convert_to_billion(r.get("io_write_latency")), + "io_misc_requests_count_billion": self._convert_to_billion( + r.get("io_misc_requests") + ), + "io_misc_time_billion_ps": self._convert_to_billion(r.get("io_misc_latency")), + }, + ) record.schema_table_statistics_with_innodb_buffer = [] for r in reports.get("schema_table_statistics_with_innodb_buffer", []): - record.append("schema_table_statistics_with_innodb_buffer", { - "schema": r.get("table_schema"), - "table": r.get("table_name"), - "rows_fetched_count_billion": self._convert_to_billion(r.get("rows_fetched")), - "fetch_time_billion_ps": self._convert_to_billion(r.get("fetch_latency")), - "rows_inserted_count_billion": self._convert_to_billion(r.get("rows_inserted")), - "insert_time_billion_ps": self._convert_to_billion(r.get("insert_latency")), - "rows_updated_count_billion": self._convert_to_billion(r.get("rows_updated")), - "update_time_billion_ps": self._convert_to_billion(r.get("update_latency")), - "rows_deleted_count_billion": self._convert_to_billion(r.get("rows_deleted")), - "delete_time_billion_ps": self._convert_to_billion(r.get("delete_latency")), - "io_read_requests_count_billion": self._convert_to_billion(r.get("io_read_requests")), - "io_read_mb": self._convert_to_billion(r.get("io_read")), - "io_read_time_billion_ps": self._convert_to_billion(r.get("io_read_latency")), - "io_write_requests_count_billion": self._convert_to_billion(r.get("io_write_requests")), - "io_write_mb": self._convert_to_billion(r.get("io_write")), - "io_write_time_billion_ps": self._convert_to_billion(r.get("io_write_latency")), - "io_misc_requests_count_billion": self._convert_to_billion(r.get("io_misc_requests")), - "io_misc_time_billion_ps": self._convert_to_billion(r.get("io_misc_latency")), - "buffer_allocated_mb": self._bytes_to_mb(r.get("innodb_buffer_allocated")), - "buffer_data_mb": self._bytes_to_mb(r.get("innodb_buffer_data")), - "buffer_free_mb": self._bytes_to_mb(r.get("innodb_buffer_free")), - "buffer_pages_count_billion": self._convert_to_billion(r.get("innodb_buffer_pages")), - "buffer_pages_hashed_count_billion": self._convert_to_billion(r.get("innodb_buffer_pages_hashed")), - "buffer_pages_old_count_billion": self._convert_to_billion(r.get("innodb_buffer_pages_old")), - "buffer_pages_cached_count_billion": self._convert_to_billion(r.get("innodb_buffer_rows_cached")), - }) + record.append( + "schema_table_statistics_with_innodb_buffer", + { + "schema": r.get("table_schema"), + "table": r.get("table_name"), + "rows_fetched_count_billion": self._convert_to_billion(r.get("rows_fetched")), + "fetch_time_billion_ps": self._convert_to_billion(r.get("fetch_latency")), + "rows_inserted_count_billion": self._convert_to_billion(r.get("rows_inserted")), + "insert_time_billion_ps": self._convert_to_billion(r.get("insert_latency")), + "rows_updated_count_billion": self._convert_to_billion(r.get("rows_updated")), + "update_time_billion_ps": self._convert_to_billion(r.get("update_latency")), + "rows_deleted_count_billion": self._convert_to_billion(r.get("rows_deleted")), + "delete_time_billion_ps": self._convert_to_billion(r.get("delete_latency")), + "io_read_requests_count_billion": self._convert_to_billion( + r.get("io_read_requests") + ), + "io_read_mb": self._convert_to_billion(r.get("io_read")), + "io_read_time_billion_ps": self._convert_to_billion(r.get("io_read_latency")), + "io_write_requests_count_billion": self._convert_to_billion( + r.get("io_write_requests") + ), + "io_write_mb": self._convert_to_billion(r.get("io_write")), + "io_write_time_billion_ps": self._convert_to_billion(r.get("io_write_latency")), + "io_misc_requests_count_billion": self._convert_to_billion( + r.get("io_misc_requests") + ), + "io_misc_time_billion_ps": self._convert_to_billion(r.get("io_misc_latency")), + "buffer_allocated_mb": self._bytes_to_mb(r.get("innodb_buffer_allocated")), + "buffer_data_mb": self._bytes_to_mb(r.get("innodb_buffer_data")), + "buffer_free_mb": self._bytes_to_mb(r.get("innodb_buffer_free")), + "buffer_pages_count_billion": self._convert_to_billion( + r.get("innodb_buffer_pages") + ), + "buffer_pages_hashed_count_billion": self._convert_to_billion( + r.get("innodb_buffer_pages_hashed") + ), + "buffer_pages_old_count_billion": self._convert_to_billion( + r.get("innodb_buffer_pages_old") + ), + "buffer_pages_cached_count_billion": self._convert_to_billion( + r.get("innodb_buffer_rows_cached") + ), + }, + ) record.schema_tables_with_full_table_scans = [] for r in reports.get("schema_tables_with_full_table_scans", []): - record.append("schema_tables_with_full_table_scans", { - "schema": r.get("object_schema"), - "object": r.get("object_name"), - "full_scanned_rows_count_billion": self._convert_to_billion(r.get("rows_full_scanned")) - }) + record.append( + "schema_tables_with_full_table_scans", + { + "schema": r.get("object_schema"), + "object": r.get("object_name"), + "full_scanned_rows_count_billion": self._convert_to_billion( + r.get("rows_full_scanned") + ), + }, + ) record.schema_unused_indexes = [] for r in reports.get("schema_unused_indexes", []): - record.append("schema_unused_indexes", { - "schema": r.get("object_schema"), - "object": r.get("object_name"), - "index": r.get("index_name"), - }) + record.append( + "schema_unused_indexes", + { + "schema": r.get("object_schema"), + "object": r.get("object_name"), + "index": r.get("index_name"), + }, + ) record.global_waits_by_time = [] for r in reports.get("global_waits_by_time", []): - record.append("global_waits_by_time", { - "event_class": r.get("events"), - "total_occurances_count_billion": self._convert_to_billion(r.get("total")), - "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), - "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), - "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), - }) + record.append( + "global_waits_by_time", + { + "event_class": r.get("events"), + "total_occurances_count_billion": self._convert_to_billion(r.get("total")), + "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), + "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), + "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), + }, + ) record.waits_by_user_by_time = [] for r in reports.get("waits_by_user_by_time", []): - record.append("waits_by_user_by_time", { - "user": r.get("user"), - "event_class": r.get("event"), - "total_occurances_count_billion": self._convert_to_billion(r.get("total")), - "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), - "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), - "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), - }) + record.append( + "waits_by_user_by_time", + { + "user": r.get("user"), + "event_class": r.get("event"), + "total_occurances_count_billion": self._convert_to_billion(r.get("total")), + "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), + "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), + "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), + }, + ) record.wait_classes_by_time = [] for r in reports.get("wait_classes_by_time", []): - record.append("wait_classes_by_time", { - "event_class": r.get("event_class"), - "total_occurances_count_billion": self._convert_to_billion(r.get("total")), - "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), - "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), - "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), - "min_time_billion_ps": self._convert_to_billion(r.get("min_latency")), - }) + record.append( + "wait_classes_by_time", + { + "event_class": r.get("event_class"), + "total_occurances_count_billion": self._convert_to_billion(r.get("total")), + "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), + "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), + "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), + "min_time_billion_ps": self._convert_to_billion(r.get("min_latency")), + }, + ) record.waits_classes_by_avg_time = [] for r in reports.get("waits_classes_by_avg_time", []): - record.append("waits_classes_by_avg_time", { - "event_class": r.get("event_class"), - "total_occurances_count_billion": self._convert_to_billion(r.get("total")), - "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), - "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), - "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), - "min_time_billion_ps": self._convert_to_billion(r.get("min_latency")), - }) + record.append( + "waits_classes_by_avg_time", + { + "event_class": r.get("event_class"), + "total_occurances_count_billion": self._convert_to_billion(r.get("total")), + "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), + "avg_time_billion_ps": self._convert_to_billion(r.get("avg_latency")), + "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), + "min_time_billion_ps": self._convert_to_billion(r.get("min_latency")), + }, + ) record.innodb_buffer_stats_by_schema = [] for r in reports.get("innodb_buffer_stats_by_schema", []): - record.append("innodb_buffer_stats_by_schema", { - "schema": r.get("object_schema"), - "allocated_mb": self._bytes_to_mb(r.get("allocated")), - "data_mb": self._bytes_to_mb(r.get("data")), - "pages_count_billion": self._convert_to_billion(r.get("pages")), - "pages_hashed_count_billion": self._convert_to_billion(r.get("pages_hashed")), - "pages_old_count_billion": self._convert_to_billion(r.get("pages_old")), - "rows_cached_count_billion": self._convert_to_billion(r.get("rows_cached")), - }) + record.append( + "innodb_buffer_stats_by_schema", + { + "schema": r.get("object_schema"), + "allocated_mb": self._bytes_to_mb(r.get("allocated")), + "data_mb": self._bytes_to_mb(r.get("data")), + "pages_count_billion": self._convert_to_billion(r.get("pages")), + "pages_hashed_count_billion": self._convert_to_billion(r.get("pages_hashed")), + "pages_old_count_billion": self._convert_to_billion(r.get("pages_old")), + "rows_cached_count_billion": self._convert_to_billion(r.get("rows_cached")), + }, + ) record.innodb_buffer_stats_by_table = [] for r in reports.get("innodb_buffer_stats_by_table", []): - record.append("innodb_buffer_stats_by_table", { - "schema": r.get("object_schema"), - "table": r.get("object_name"), - "allocated_mb": self._bytes_to_mb(r.get("allocated")), - "data_mb": self._bytes_to_mb(r.get("data")), - "pages_count_billion": self._convert_to_billion(r.get("pages")), - "pages_hashed_count_billion": self._convert_to_billion(r.get("pages_hashed")), - "pages_old_count_billion": self._convert_to_billion(r.get("pages_old")), - "rows_cached_count_billion": self._convert_to_billion(r.get("rows_cached")), - }) + record.append( + "innodb_buffer_stats_by_table", + { + "schema": r.get("object_schema"), + "table": r.get("object_name"), + "allocated_mb": self._bytes_to_mb(r.get("allocated")), + "data_mb": self._bytes_to_mb(r.get("data")), + "pages_count_billion": self._convert_to_billion(r.get("pages")), + "pages_hashed_count_billion": self._convert_to_billion(r.get("pages_hashed")), + "pages_old_count_billion": self._convert_to_billion(r.get("pages_old")), + "rows_cached_count_billion": self._convert_to_billion(r.get("rows_cached")), + }, + ) record.user_resource_use_overview = [] for r in reports.get("user_resource_use_overview", []): - record.append("user_resource_use_overview", { - "user": r.get("user"), - "statements_count_billion": self._convert_to_billion(r.get("statements")), - "statement_total_time_billion_ps": self._convert_to_billion(r.get("statement_latency")), - "statement_avg_time_billion_ps": self._convert_to_billion(r.get("statement_avg_latency")), - "table_scans_count_billion": self._convert_to_billion(r.get("table_scans")), - "file_io_count_billion": self._convert_to_billion(r.get("file_io_latency")), - "total_file_io_time_billion_ps": self._convert_to_billion(r.get("file_io_latency")), - "current_connections_count": r.get("current_connections"), - "total_connections_count": r.get("total_connections"), - "unique_hosts_count": r.get("unique_hosts"), - "current_memory_mb": self._bytes_to_mb(r.get("current_memory")), - "total_memory_mb": self._bytes_to_mb(r.get("total_memory_allocated")), - }) + record.append( + "user_resource_use_overview", + { + "user": r.get("user"), + "statements_count_billion": self._convert_to_billion(r.get("statements")), + "statement_total_time_billion_ps": self._convert_to_billion( + r.get("statement_latency") + ), + "statement_avg_time_billion_ps": self._convert_to_billion( + r.get("statement_avg_latency") + ), + "table_scans_count_billion": self._convert_to_billion(r.get("table_scans")), + "file_io_count_billion": self._convert_to_billion(r.get("file_io_latency")), + "total_file_io_time_billion_ps": self._convert_to_billion( + r.get("file_io_latency") + ), + "current_connections_count": r.get("current_connections"), + "total_connections_count": r.get("total_connections"), + "unique_hosts_count": r.get("unique_hosts"), + "current_memory_mb": self._bytes_to_mb(r.get("current_memory")), + "total_memory_mb": self._bytes_to_mb(r.get("total_memory_allocated")), + }, + ) record.user_resource_use_io_statistics = [] for r in reports.get("user_resource_use_io_statistics", []): - record.append("user_resource_use_io_statistics", { - "user": r.get("user"), - "event_type": r.get("event_name"), - "total_io_count_billion": self._convert_to_billion(r.get("total")), - "total_time_billion_ps": self._convert_to_billion(r.get("latency")), - "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), - }) + record.append( + "user_resource_use_io_statistics", + { + "user": r.get("user"), + "event_type": r.get("event_name"), + "total_io_count_billion": self._convert_to_billion(r.get("total")), + "total_time_billion_ps": self._convert_to_billion(r.get("latency")), + "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), + }, + ) record.user_resource_use_statement_statistics = [] for r in reports.get("user_resource_use_statement_statistics", []): - record.append("user_resource_use_statement_statistics", { - "user": r.get("user"), - "statement": r.get("statement"), - "total_occurances_count_billion": self._convert_to_billion(r.get("total")), - "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), - "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), - "lock_time_billion_ps": self._convert_to_billion(r.get("lock_latency")), - "cpu_time_billion_ps": self._convert_to_billion(r.get("cpu_latency")), - "rows_sent_count_billion": self._convert_to_billion(r.get("rows_sent")), - "rows_examined_count_billion": self._convert_to_billion(r.get("rows_examined")), - "rows_affected_count_billion": self._convert_to_billion(r.get("rows_affected")), - "full_scans_count_billion": self._convert_to_billion(r.get("full_scans")), - }) + record.append( + "user_resource_use_statement_statistics", + { + "user": r.get("user"), + "statement": r.get("statement"), + "total_occurances_count_billion": self._convert_to_billion(r.get("total")), + "total_time_billion_ps": self._convert_to_billion(r.get("total_latency")), + "max_time_billion_ps": self._convert_to_billion(r.get("max_latency")), + "lock_time_billion_ps": self._convert_to_billion(r.get("lock_latency")), + "cpu_time_billion_ps": self._convert_to_billion(r.get("cpu_latency")), + "rows_sent_count_billion": self._convert_to_billion(r.get("rows_sent")), + "rows_examined_count_billion": self._convert_to_billion(r.get("rows_examined")), + "rows_affected_count_billion": self._convert_to_billion(r.get("rows_affected")), + "full_scans_count_billion": self._convert_to_billion(r.get("full_scans")), + }, + ) record.save() except Exception: log_error("Performance Schema Report Fetch Exception", server=self.as_dict()) @@ -1213,11 +1352,19 @@ def get_performance_report(self): "user_resource_use_io_statistics": self.is_user_resource_use_io_statistics_perf_report_enabled, "user_resource_use_statement_statistics": self.is_user_resource_use_statement_statistics_perf_report_enabled, } - return self.agent.post("database/performance_report", { - "private_ip": self.private_ip, - "mariadb_root_password": self.get_password("mariadb_root_password"), - "reports": [report for report, enabled in reports_is_enabled_status.items() if enabled] - }) or {} + return ( + self.agent.post( + "database/performance_report", + { + "private_ip": self.private_ip, + "mariadb_root_password": self.get_password("mariadb_root_password"), + "reports": [ + report for report, enabled in reports_is_enabled_status.items() if enabled + ], + }, + ) + or {} + ) def _bytes_to_mb(self, bytes_val): if bytes_val is None: @@ -1229,6 +1376,7 @@ def _convert_to_billion(self, count): return None return count / 1000000000 + get_permission_query_conditions = get_permission_query_conditions_for_doctype( "Database Server" ) @@ -1247,6 +1395,7 @@ def _convert_to_billion(self, count): "performance-schema-consumer-events-waits-history-long": "ON", } + def fetch_performance_schema_reports(): for server in frappe.get_all("Database Server", {"is_performance_schema_enabled": 1}): server = frappe.get_doc("Database Server", server.name) diff --git a/press/press/doctype/database_server/database_server_dashboard.py b/press/press/doctype/database_server/database_server_dashboard.py index 619e20222d..6e8aee9950 100644 --- a/press/press/doctype/database_server/database_server_dashboard.py +++ b/press/press/doctype/database_server/database_server_dashboard.py @@ -12,6 +12,6 @@ def get_data(): "transactions": [ {"label": _("Related Documents"), "items": ["Server"]}, {"label": _("Logs"), "items": ["Agent Job", "Ansible Play"]}, - {"label": _("Report"), "items": ["Performance Report"]} + {"label": _("Report"), "items": ["Performance Report"]}, ], } From 99fc8c411bddfece85425f9e542bb38e43170b65 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Tue, 17 Sep 2024 17:33:25 +0530 Subject: [PATCH 25/31] fix: lint issue --- press/press/doctype/database_server/database_server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/press/press/doctype/database_server/database_server.py b/press/press/doctype/database_server/database_server.py index 917b95c156..f371d39918 100644 --- a/press/press/doctype/database_server/database_server.py +++ b/press/press/doctype/database_server/database_server.py @@ -1526,13 +1526,13 @@ def _convert_to_billion(self, count): return None return count / 1000000000 - def update_memory_allocator(self, memory_allocator): + def update_memory_allocator(self, memory_allocator): frappe.enqueue_doc( self.doctype, self.name, "_update_memory_allocator", memory_allocator=memory_allocator, - enqueue_after_commit=True, + enqueue_after_commipt=True, ) def _update_memory_allocator(self, memory_allocator): From 966bd5526e18403a4b536ec3240c33678c9e9910 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Wed, 18 Sep 2024 12:51:51 +0530 Subject: [PATCH 26/31] feat: moved fetching tasks to agent job --- press/agent.py | 47 +++++++++ press/fixtures/agent_job_type.json | 15 +++ press/press/doctype/agent_job/agent_job.py | 5 + .../database_server/database_server.json | 17 +++- .../database_server/database_server.py | 99 ++++++++----------- 5 files changed, 123 insertions(+), 60 deletions(-) diff --git a/press/agent.py b/press/agent.py index 4fcfe0c3d7..3c53fe2fe2 100644 --- a/press/agent.py +++ b/press/agent.py @@ -1144,6 +1144,53 @@ def get_site_apps(self, site): ] return apps + def get_db_performance_report(self): + server_record = frappe.get_doc("Database Server", self.server) + reports_is_enabled_status = { + "total_allocated_memory": server_record.is_total_allocated_memory_perf_report_enabled, + "top_memory_by_event": server_record.is_top_memory_by_event_perf_report_enabled, + "top_memory_by_user": server_record.is_top_memory_by_user_perf_report_enabled, + "top_memory_by_host": server_record.is_top_memory_by_host_perf_report_enabled, + "top_memory_by_thread": server_record.is_top_memory_by_thread_perf_report_enabled, + "top_io_by_file_activity_report": server_record.is_top_io_by_file_activity_report_perf_report_enabled, + "top_io_by_file_by_time": server_record.is_top_io_by_file_by_time_perf_report_enabled, + "top_io_by_event_category": server_record.is_top_io_by_event_category_perf_report_enabled, + "top_io_in_time_by_event_category": server_record.is_top_io_in_time_by_event_category_perf_report_enabled, + "top_io_by_user_or_thread": server_record.is_top_io_by_user_or_thread_perf_report_enabled, + "statement_analysis": server_record.is_statement_analysis_perf_report_enabled, + "statements_in_highest_5_percentile": server_record.is_statements_in_highest_5_percentile_perf_report_enabled, + "statements_using_temp_tables": server_record.is_statements_using_temp_tables_perf_report_enabled, + "statements_with_sorting": server_record.is_statements_with_sorting_perf_report_enabled, + "statements_with_full_table_scans": server_record.is_statements_with_full_table_scans_perf_report_enabled, + "statements_with_errors_or_warnings": server_record.is_statements_with_errors_or_warnings_perf_report_enabled, + "schema_index_statistics": server_record.is_schema_index_statistics_perf_report_enabled, + "schema_table_statistics": server_record.is_schema_table_statistics_perf_report_enabled, + "schema_table_statistics_with_innodb_buffer": server_record.is_schema_table_statistics_with_innodb_perf_report_enabled, + "schema_tables_with_full_table_scans": server_record.is_schema_tables_with_full_table_scans_perf_report_enabled, + "schema_unused_indexes": server_record.is_schema_unused_indexes_perf_report_enabled, + "global_waits_by_time": server_record.is_global_waits_by_time_perf_report_enabled, + "waits_by_user_by_time": server_record.is_waits_by_user_by_time_perf_report_enabled, + "wait_classes_by_time": server_record.is_wait_classes_by_time_perf_report_enabled, + "waits_classes_by_avg_time": server_record.is_waits_classes_by_avg_time_perf_report_enabled, + "innodb_buffer_stats_by_schema": server_record.is_innodb_buffer_stats_by_schema_perf_report_enabled, + "innodb_buffer_stats_by_table": server_record.is_innodb_buffer_stats_by_table_perf_report_enabled, + "user_resource_use_overview": server_record.is_user_resource_use_overview_perf_report_enabled, + "user_resource_use_io_statistics": server_record.is_user_resource_use_io_statistics_perf_report_enabled, + "user_resource_use_statement_statistics": server_record.is_user_resource_use_statement_statistics_perf_report_enabled, + } + + return self.create_agent_job( + "Fetch Performance Report", + f"database/performance_report", + data={ + "private_ip": server_record.private_ip, + "mariadb_root_password": server_record.get_password("mariadb_root_password"), + "reports": [ + report for report, enabled in reports_is_enabled_status.items() if enabled + ], + }, + ) + class AgentCallbackException(Exception): pass diff --git a/press/fixtures/agent_job_type.json b/press/fixtures/agent_job_type.json index 2c6ac111b2..9b063052e2 100644 --- a/press/fixtures/agent_job_type.json +++ b/press/fixtures/agent_job_type.json @@ -2182,5 +2182,20 @@ "step_name": "Bench Restart" } ] + }, + { + "disabled_auto_retry": 1, + "docstatus": 0, + "doctype": "Agent Job Type", + "max_retry_count": 3, + "modified": "2024-09-18 11:29:00.663542", + "name": "Fetch Performance Report", + "request_method": "POST", + "request_path": "/database/performance_report", + "steps": [ + { + "step_name": "Fetch Performance Report" + } + ] } ] \ No newline at end of file diff --git a/press/press/doctype/agent_job/agent_job.py b/press/press/doctype/agent_job/agent_job.py index a0cbcaa874..455c9d9a96 100644 --- a/press/press/doctype/agent_job/agent_job.py +++ b/press/press/doctype/agent_job/agent_job.py @@ -1053,6 +1053,11 @@ def process_job_updates(job_name: str, response_data: "Optional[dict]" = None): Bench.process_update_inplace(job) elif job.job_type == "Recover Update In Place": Bench.process_recover_update_inplace(job) + elif job.job_type == "Fetch Performance Report": + server = frappe.get_doc("Database Server", job.server) + job_data = json.loads(job.data or "{}") + if job_data: + server.process_performance_report(job_data) except Exception as e: failure_count = job.callback_failure_count + 1 diff --git a/press/press/doctype/database_server/database_server.json b/press/press/doctype/database_server/database_server.json index 44c57a4cb9..5fa199bd55 100644 --- a/press/press/doctype/database_server/database_server.json +++ b/press/press/doctype/database_server/database_server.json @@ -65,6 +65,7 @@ "section_break_ladc", "is_performance_schema_enabled", "mariadb_system_variables", + "auto_fetch_performance_schema_report", "performance_schema_report_section", "is_total_allocated_memory_perf_report_enabled", "is_top_memory_by_event_perf_report_enabled", @@ -96,6 +97,7 @@ "is_innodb_buffer_stats_by_table_perf_report_enabled", "is_user_resource_use_overview_perf_report_enabled", "is_user_resource_use_io_statistics_perf_report_enabled", + "is_user_resource_use_statement_statistics_perf_report_enabled", "mariadb_stalk_section", "is_stalk_setup", "stalk_gdb_collector", @@ -734,11 +736,24 @@ "fieldtype": "Int", "label": "Auto Add Storage Max", "non_negative": 1 + }, + { + "default": "0", + "depends_on": "eval: doc.is_performance_schema_enabled", + "fieldname": "auto_fetch_performance_schema_report", + "fieldtype": "Check", + "label": "Auto Fetch Performance Schema Report" + }, + { + "default": "1", + "fieldname": "is_user_resource_use_statement_statistics_perf_report_enabled", + "fieldtype": "Check", + "label": "User Resource Use Statement Statistics" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2024-08-13 11:02:07.399141", + "modified": "2024-09-18 12:27:35.166971", "modified_by": "Administrator", "module": "Press", "name": "Database Server", diff --git a/press/press/doctype/database_server/database_server.py b/press/press/doctype/database_server/database_server.py index f371d39918..aa5c9860f5 100644 --- a/press/press/doctype/database_server/database_server.py +++ b/press/press/doctype/database_server/database_server.py @@ -10,6 +10,7 @@ from frappe.core.doctype.version.version import get_diff from frappe.core.utils import find +from press.agent import Agent from press.overrides import get_permission_query_conditions_for_doctype from press.press.doctype.database_server_mariadb_variable.database_server_mariadb_variable import ( DatabaseServerMariaDBVariable, @@ -35,6 +36,7 @@ class DatabaseServer(BaseServer): agent_password: DF.Password | None auto_add_storage_max: DF.Int auto_add_storage_min: DF.Int + auto_fetch_performance_schema_report: DF.Check cluster: DF.Link | None domain: DF.Link | None frappe_public_key: DF.Code | None @@ -42,14 +44,44 @@ class DatabaseServer(BaseServer): hostname: DF.Data hostname_abbreviation: DF.Data | None ip: DF.Data | None + is_global_waits_by_time_perf_report_enabled: DF.Check + is_innodb_buffer_stats_by_schema_perf_report_enabled: DF.Check + is_innodb_buffer_stats_by_table_perf_report_enabled: DF.Check is_performance_schema_enabled: DF.Check is_primary: DF.Check is_replication_setup: DF.Check + is_schema_index_statistics_perf_report_enabled: DF.Check + is_schema_table_statistics_perf_report_enabled: DF.Check + is_schema_table_statistics_with_innodb_perf_report_enabled: DF.Check + is_schema_tables_with_full_table_scans_perf_report_enabled: DF.Check + is_schema_unused_indexes_perf_report_enabled: DF.Check is_self_hosted: DF.Check is_server_prepared: DF.Check is_server_renamed: DF.Check is_server_setup: DF.Check is_stalk_setup: DF.Check + is_statement_analysis_perf_report_enabled: DF.Check + is_statements_in_highest_5_percentile_perf_report_enabled: DF.Check + is_statements_using_temp_tables_perf_report_enabled: DF.Check + is_statements_with_errors_or_warnings_perf_report_enabled: DF.Check + is_statements_with_full_table_scans_perf_report_enabled: DF.Check + is_statements_with_sorting_perf_report_enabled: DF.Check + is_top_io_by_event_category_perf_report_enabled: DF.Check + is_top_io_by_file_activity_report_perf_report_enabled: DF.Check + is_top_io_by_file_by_time_perf_report_enabled: DF.Check + is_top_io_by_user_or_thread_perf_report_enabled: DF.Check + is_top_io_in_time_by_event_category_perf_report_enabled: DF.Check + is_top_memory_by_event_perf_report_enabled: DF.Check + is_top_memory_by_host_perf_report_enabled: DF.Check + is_top_memory_by_thread_perf_report_enabled: DF.Check + is_top_memory_by_user_perf_report_enabled: DF.Check + is_total_allocated_memory_perf_report_enabled: DF.Check + is_user_resource_use_io_statistics_perf_report_enabled: DF.Check + is_user_resource_use_overview_perf_report_enabled: DF.Check + is_user_resource_use_statement_statistics_perf_report_enabled: DF.Check + is_wait_classes_by_time_perf_report_enabled: DF.Check + is_waits_by_user_by_time_perf_report_enabled: DF.Check + is_waits_classes_by_avg_time_perf_report_enabled: DF.Check mariadb_root_password: DF.Password | None mariadb_system_variables: DF.Table[DatabaseServerMariaDBVariable] memory_allocator: DF.Literal["System", "jemalloc", "TCMalloc"] @@ -932,17 +964,12 @@ def _reconfigure_mariadb_exporter(self): @frappe.whitelist() def fetch_performance_report(self): - if self.is_performance_schema_enabled: - frappe.enqueue_doc( - self.doctype, self.name, "_fetch_performance_report", queue="long", timeout=1200 - ) - frappe.msgprint("Performance Schema Report Fetching Started") - else: - frappe.throw("Performance Schema is not enabled") + agent = Agent(self.name, self.doctype) + agent.get_db_performance_report() + frappe.msgprint("Performance Schema Report Fetching Started") - def _fetch_performance_report(self): + def process_performance_report(self, reports: dict): try: - reports = self.get_performance_report() record = frappe.new_doc("Performance Report") record.server = self.name record.recorded_on = frappe.utils.now_datetime() @@ -1469,53 +1496,6 @@ def _fetch_performance_report(self): log_error("Performance Schema Report Fetch Exception", server=self.as_dict()) raise - def get_performance_report(self): - reports_is_enabled_status = { - "total_allocated_memory": self.is_total_allocated_memory_perf_report_enabled, - "top_memory_by_event": self.is_top_memory_by_event_perf_report_enabled, - "top_memory_by_user": self.is_top_memory_by_user_perf_report_enabled, - "top_memory_by_host": self.is_top_memory_by_host_perf_report_enabled, - "top_memory_by_thread": self.is_top_memory_by_thread_perf_report_enabled, - "top_io_by_file_activity_report": self.is_top_io_by_file_activity_report_perf_report_enabled, - "top_io_by_file_by_time": self.is_top_io_by_file_by_time_perf_report_enabled, - "top_io_by_event_category": self.is_top_io_by_event_category_perf_report_enabled, - "top_io_in_time_by_event_category": self.is_top_io_in_time_by_event_category_perf_report_enabled, - "top_io_by_user_or_thread": self.is_top_io_by_user_or_thread_perf_report_enabled, - "statement_analysis": self.is_statement_analysis_perf_report_enabled, - "statements_in_highest_5_percentile": self.is_statements_in_highest_5_percentile_perf_report_enabled, - "statements_using_temp_tables": self.is_statements_using_temp_tables_perf_report_enabled, - "statements_with_sorting": self.is_statements_with_sorting_perf_report_enabled, - "statements_with_full_table_scans": self.is_statements_with_full_table_scans_perf_report_enabled, - "statements_with_errors_or_warnings": self.is_statements_with_errors_or_warnings_perf_report_enabled, - "schema_index_statistics": self.is_schema_index_statistics_perf_report_enabled, - "schema_table_statistics": self.is_schema_table_statistics_perf_report_enabled, - "schema_table_statistics_with_innodb_buffer": self.is_schema_table_statistics_with_innodb_perf_report_enabled, - "schema_tables_with_full_table_scans": self.is_schema_tables_with_full_table_scans_perf_report_enabled, - "schema_unused_indexes": self.is_schema_unused_indexes_perf_report_enabled, - "global_waits_by_time": self.is_global_waits_by_time_perf_report_enabled, - "waits_by_user_by_time": self.is_waits_by_user_by_time_perf_report_enabled, - "wait_classes_by_time": self.is_wait_classes_by_time_perf_report_enabled, - "waits_classes_by_avg_time": self.is_waits_classes_by_avg_time_perf_report_enabled, - "innodb_buffer_stats_by_schema": self.is_innodb_buffer_stats_by_schema_perf_report_enabled, - "innodb_buffer_stats_by_table": self.is_innodb_buffer_stats_by_table_perf_report_enabled, - "user_resource_use_overview": self.is_user_resource_use_overview_perf_report_enabled, - "user_resource_use_io_statistics": self.is_user_resource_use_io_statistics_perf_report_enabled, - "user_resource_use_statement_statistics": self.is_user_resource_use_statement_statistics_perf_report_enabled, - } - return ( - self.agent.post( - "database/performance_report", - { - "private_ip": self.private_ip, - "mariadb_root_password": self.get_password("mariadb_root_password"), - "reports": [ - report for report, enabled in reports_is_enabled_status.items() if enabled - ], - }, - ) - or {} - ) - def _bytes_to_mb(self, bytes_val): if bytes_val is None: return None @@ -1586,6 +1566,7 @@ def _update_memory_allocator(self, memory_allocator): def fetch_performance_schema_reports(): - for server in frappe.get_all("Database Server", {"is_performance_schema_enabled": 1}): - server = frappe.get_doc("Database Server", server.name) - server.fetch_performance_report() + pass + # for server in frappe.get_all("Database Server", {"is_performance_schema_enabled": 1}): + # server = frappe.get_doc("Database Server", server.name) + # server.fetch_performance_report() From b8a66e874aed8de06e3da4ae0c5cf09cf531f028 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:06:36 +0530 Subject: [PATCH 27/31] chore: on disabling perf schema, disable auto fetch as well --- .../doctype/database_server/database_server.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/press/press/doctype/database_server/database_server.py b/press/press/doctype/database_server/database_server.py index aa5c9860f5..85c8955859 100644 --- a/press/press/doctype/database_server/database_server.py +++ b/press/press/doctype/database_server/database_server.py @@ -137,6 +137,10 @@ def on_update(self): if self.flags.in_insert or self.is_new(): return self.update_mariadb_system_variables() + if ( + not self.is_performance_schema_enabled and self.auto_fetch_performance_schema_report + ): + self.auto_fetch_performance_schema_report = False if ( self.has_value_changed("memory_high") or self.has_value_changed("memory_max") @@ -1566,7 +1570,8 @@ def _update_memory_allocator(self, memory_allocator): def fetch_performance_schema_reports(): - pass - # for server in frappe.get_all("Database Server", {"is_performance_schema_enabled": 1}): - # server = frappe.get_doc("Database Server", server.name) - # server.fetch_performance_report() + for server in frappe.get_all( + "Database Server", {"auto_fetch_performance_schema_report": 1} + ): + server: DatabaseServer = frappe.get_doc("Database Server", server.name) + server.fetch_performance_report() From c356d147df14bb8782a60bb57ad0667862874588 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:17:08 +0530 Subject: [PATCH 28/31] chore: rename doctype to db performance report --- .../{performance_report => db_performance_report}/__init__.py | 0 .../db_performance_report.js} | 2 +- .../db_performance_report.json} | 2 +- .../db_performance_report.py} | 2 +- .../test_db_performance_report.py} | 2 +- press/press/doctype/database_server/database_server.py | 2 +- 6 files changed, 5 insertions(+), 5 deletions(-) rename press/database_performance_schema/doctype/{performance_report => db_performance_report}/__init__.py (100%) rename press/database_performance_schema/doctype/{performance_report/performance_report.js => db_performance_report/db_performance_report.js} (95%) rename press/database_performance_schema/doctype/{performance_report/performance_report.json => db_performance_report/db_performance_report.json} (99%) rename press/database_performance_schema/doctype/{performance_report/performance_report.py => db_performance_report/db_performance_report.py} (81%) rename press/database_performance_schema/doctype/{performance_report/test_performance_report.py => db_performance_report/test_db_performance_report.py} (74%) diff --git a/press/database_performance_schema/doctype/performance_report/__init__.py b/press/database_performance_schema/doctype/db_performance_report/__init__.py similarity index 100% rename from press/database_performance_schema/doctype/performance_report/__init__.py rename to press/database_performance_schema/doctype/db_performance_report/__init__.py diff --git a/press/database_performance_schema/doctype/performance_report/performance_report.js b/press/database_performance_schema/doctype/db_performance_report/db_performance_report.js similarity index 95% rename from press/database_performance_schema/doctype/performance_report/performance_report.js rename to press/database_performance_schema/doctype/db_performance_report/db_performance_report.js index 8a275b00bc..672a081ac0 100644 --- a/press/database_performance_schema/doctype/performance_report/performance_report.js +++ b/press/database_performance_schema/doctype/db_performance_report/db_performance_report.js @@ -1,7 +1,7 @@ // Copyright (c) 2024, Frappe and contributors // For license information, please see license.txt -frappe.ui.form.on("Performance Report", { +frappe.ui.form.on("DB Performance Report", { refresh(frm) { frm.add_custom_button(__('Multiply 10^9 with Count & Time Field'), function(){ format_fields_helper(frm.get_doc()); diff --git a/press/database_performance_schema/doctype/performance_report/performance_report.json b/press/database_performance_schema/doctype/db_performance_report/db_performance_report.json similarity index 99% rename from press/database_performance_schema/doctype/performance_report/performance_report.json rename to press/database_performance_schema/doctype/db_performance_report/db_performance_report.json index e79efd8c86..793e5d9172 100644 --- a/press/database_performance_schema/doctype/performance_report/performance_report.json +++ b/press/database_performance_schema/doctype/db_performance_report/db_performance_report.json @@ -549,7 +549,7 @@ "modified": "2024-02-08 10:46:01.135333", "modified_by": "Administrator", "module": "Database Performance Schema", - "name": "Performance Report", + "name": "DB Performance Report", "owner": "Administrator", "permissions": [ { diff --git a/press/database_performance_schema/doctype/performance_report/performance_report.py b/press/database_performance_schema/doctype/db_performance_report/db_performance_report.py similarity index 81% rename from press/database_performance_schema/doctype/performance_report/performance_report.py rename to press/database_performance_schema/doctype/db_performance_report/db_performance_report.py index e7e9401f24..fac0dbdb73 100644 --- a/press/database_performance_schema/doctype/performance_report/performance_report.py +++ b/press/database_performance_schema/doctype/db_performance_report/db_performance_report.py @@ -5,5 +5,5 @@ from frappe.model.document import Document -class PerformanceReport(Document): +class DBPerformanceReport(Document): pass diff --git a/press/database_performance_schema/doctype/performance_report/test_performance_report.py b/press/database_performance_schema/doctype/db_performance_report/test_db_performance_report.py similarity index 74% rename from press/database_performance_schema/doctype/performance_report/test_performance_report.py rename to press/database_performance_schema/doctype/db_performance_report/test_db_performance_report.py index 81d7faf375..e1c50ddd20 100644 --- a/press/database_performance_schema/doctype/performance_report/test_performance_report.py +++ b/press/database_performance_schema/doctype/db_performance_report/test_db_performance_report.py @@ -5,5 +5,5 @@ from frappe.tests.utils import FrappeTestCase -class TestPerformanceReport(FrappeTestCase): +class TestDBPerformanceReport(FrappeTestCase): pass diff --git a/press/press/doctype/database_server/database_server.py b/press/press/doctype/database_server/database_server.py index 85c8955859..cdf8e20250 100644 --- a/press/press/doctype/database_server/database_server.py +++ b/press/press/doctype/database_server/database_server.py @@ -974,7 +974,7 @@ def fetch_performance_report(self): def process_performance_report(self, reports: dict): try: - record = frappe.new_doc("Performance Report") + record = frappe.new_doc("DB Performance Report") record.server = self.name record.recorded_on = frappe.utils.now_datetime() record.total_allocated_memory = self._bytes_to_mb( From cbfaa6b3fa9a3301f9ff673bcd7e7829b7ab2d94 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:23:39 +0530 Subject: [PATCH 29/31] chore: delete perf report of more than 7 day old --- .../db_performance_report.py | 32 ++++++++++++++++++- press/hooks.py | 1 + 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/press/database_performance_schema/doctype/db_performance_report/db_performance_report.py b/press/database_performance_schema/doctype/db_performance_report/db_performance_report.py index fac0dbdb73..71a4270697 100644 --- a/press/database_performance_schema/doctype/db_performance_report/db_performance_report.py +++ b/press/database_performance_schema/doctype/db_performance_report/db_performance_report.py @@ -1,9 +1,39 @@ # Copyright (c) 2024, Frappe and contributors # For license information, please see license.txt -# import frappe +import frappe from frappe.model.document import Document class DBPerformanceReport(Document): pass + + +def clear_performance_reports_older_than_7_days(): + """If any logtype table grows too large then clearing it with DELETE query + is not feasible in reasonable time. This command copies recent data to new + table and replaces current table with new smaller table. + ref: https://mariadb.com/kb/en/big-deletes/#deleting-more-than-half-a-table + """ + from frappe.utils import get_table_name + + original = get_table_name("DB Performance Report") + temporary = f"{original} temp_table" + backup = f"{original} backup_table" + + try: + frappe.db.sql_ddl(f"CREATE TABLE `{temporary}` LIKE `{original}`") + + # Copy all recent data to new table + frappe.db.sql( + f"""INSERT INTO `{temporary}` + SELECT * FROM `{original}` + WHERE `{original}`.`modified` > NOW() - INTERVAL 7 DAY""" + ) + frappe.db.sql_ddl(f"RENAME TABLE `{original}` TO `{backup}`, `{temporary}` TO `{original}`") + except Exception: + frappe.db.rollback() + frappe.db.sql_ddl(f"DROP TABLE IF EXISTS `{temporary}`") + raise + else: + frappe.db.sql_ddl(f"DROP TABLE `{backup}`") \ No newline at end of file diff --git a/press/hooks.py b/press/hooks.py index 0ef8b56c41..08d2e66312 100644 --- a/press/hooks.py +++ b/press/hooks.py @@ -181,6 +181,7 @@ "press.experimental.doctype.referral_bonus.referral_bonus.credit_referral_bonuses", "press.press.doctype.log_counter.log_counter.record_counts", "press.press.doctype.incident.incident.notify_ignored_servers", + "press.database_performance_schema.doctype.db_performance_report.db_performance_report.clear_performance_reports_older_than_7_days", ], "daily_long": [ "press.press.audit.check_bench_fields", From dce0455e16cea0d06ea2ebf4ab1a3daf37df044a Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:24:27 +0530 Subject: [PATCH 30/31] chore: lint --- .../doctype/db_performance_report/db_performance_report.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/press/database_performance_schema/doctype/db_performance_report/db_performance_report.py b/press/database_performance_schema/doctype/db_performance_report/db_performance_report.py index 71a4270697..f8bcd0b886 100644 --- a/press/database_performance_schema/doctype/db_performance_report/db_performance_report.py +++ b/press/database_performance_schema/doctype/db_performance_report/db_performance_report.py @@ -30,10 +30,12 @@ def clear_performance_reports_older_than_7_days(): SELECT * FROM `{original}` WHERE `{original}`.`modified` > NOW() - INTERVAL 7 DAY""" ) - frappe.db.sql_ddl(f"RENAME TABLE `{original}` TO `{backup}`, `{temporary}` TO `{original}`") + frappe.db.sql_ddl( + f"RENAME TABLE `{original}` TO `{backup}`, `{temporary}` TO `{original}`" + ) except Exception: frappe.db.rollback() frappe.db.sql_ddl(f"DROP TABLE IF EXISTS `{temporary}`") raise else: - frappe.db.sql_ddl(f"DROP TABLE `{backup}`") \ No newline at end of file + frappe.db.sql_ddl(f"DROP TABLE `{backup}`") From 96a2a9a32f942d8dfa9a3d258286dd01e2a83a12 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:37:58 +0530 Subject: [PATCH 31/31] chore: typo --- press/press/doctype/database_server/database_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/press/press/doctype/database_server/database_server.py b/press/press/doctype/database_server/database_server.py index cdf8e20250..d73243bfa6 100644 --- a/press/press/doctype/database_server/database_server.py +++ b/press/press/doctype/database_server/database_server.py @@ -1516,7 +1516,7 @@ def update_memory_allocator(self, memory_allocator): self.name, "_update_memory_allocator", memory_allocator=memory_allocator, - enqueue_after_commipt=True, + enqueue_after_commit=True, ) def _update_memory_allocator(self, memory_allocator):