Performance Profiling
+ ${this._profilingStatus
+ ? html`
+
+ Umbraco currently runs in debug mode. This means you can use the built-in performance profiler to assess
+ the performance when rendering pages.
+
+
+ If you want to activate the profiler for a specific page rendering, simply add
+ umbDebug=true to the querystring when requesting the page.
+
+
+
+ If you want the profiler to be activated by default for all page renderings, you can use the toggle
+ below. It will set a cookie in your browser, which then activates the profiler automatically. In other
+ words, the profiler will only be active by default in your browser - not everyone else's.
+
+
+
+
+ Friendly reminder
+
+ You should never let a production site run in debug mode. Debug mode is turned off by setting
+ Umbraco:CMS:Hosting:Debug to false in appsettings.json, appsettings.{Environment}.json or via an
+ environment variable.
+
+ `
+ : html`
+
+ Umbraco currently does not run in debug mode, so you can't use the built-in profiler. This is how it
+ should be for a production site.
+
+
+ Debug mode is turned on by setting debug="true" on the <compilation /> element in
+ web.config.
+
+ `}
`;
}
diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/sections/settings/settings-section.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/sections/settings/settings-section.element.ts
index ecafb69f32..22c9c08c4a 100644
--- a/src/Umbraco.Web.UI.Client/src/backoffice/sections/settings/settings-section.element.ts
+++ b/src/Umbraco.Web.UI.Client/src/backoffice/sections/settings/settings-section.element.ts
@@ -65,6 +65,19 @@ export class UmbSectionSettingsElement extends LitElement {
pathname: 'published-status',
},
},
+ {
+ type: 'dashboard',
+ alias: 'Umb.Dashboard.Profiling',
+ name: 'Profiling',
+ elementName: 'umb-dashboard-performance-profiling',
+ loader: () => import('../../dashboards/performance-profiling/dashboard-performance-profiling.element'),
+ weight: 101,
+ meta: {
+ label: 'Profiling',
+ sections: ['Umb.Section.Settings'],
+ pathname: 'profiling',
+ },
+ },
{
type: 'dashboard',
alias: 'Umb.Dashboard.Telemetry',
diff --git a/src/Umbraco.Web.UI.Client/src/core/mocks/browser-handlers.ts b/src/Umbraco.Web.UI.Client/src/core/mocks/browser-handlers.ts
index a72c20b0bb..3ab2447f5d 100644
--- a/src/Umbraco.Web.UI.Client/src/core/mocks/browser-handlers.ts
+++ b/src/Umbraco.Web.UI.Client/src/core/mocks/browser-handlers.ts
@@ -13,6 +13,7 @@ import { handlers as usersHandlers } from './domains/users.handlers';
import { handlers as userGroupsHandlers } from './domains/user-groups.handlers';
import { handlers as examineManagementHandlers } from './domains/examine-management.handlers';
import { handlers as modelsBuilderHandlers } from './domains/modelsbuilder.handlers';
+import { handlers as profilingHandlers } from './domains/performance-profiling.handlers';
const handlers = [
serverHandlers.serverVersionHandler,
@@ -30,6 +31,7 @@ const handlers = [
...userGroupsHandlers,
...examineManagementHandlers,
...modelsBuilderHandlers,
+ ...profilingHandlers,
];
switch (import.meta.env.VITE_UMBRACO_INSTALL_STATUS) {
diff --git a/src/Umbraco.Web.UI.Client/src/core/mocks/domains/performance-profiling.handlers.ts b/src/Umbraco.Web.UI.Client/src/core/mocks/domains/performance-profiling.handlers.ts
new file mode 100644
index 0000000000..1016e922b8
--- /dev/null
+++ b/src/Umbraco.Web.UI.Client/src/core/mocks/domains/performance-profiling.handlers.ts
@@ -0,0 +1,14 @@
+import { rest } from 'msw';
+
+import { umbracoPath } from '@umbraco-cms/utils';
+import { ProfilingStatus } from '@umbraco-cms/backend-api';
+
+export const handlers = [
+ rest.get(umbracoPath('/profiling/status'), (_req, res, ctx) => {
+ return res(
+ // Respond with a 200 status code
+ ctx.status(200),
+ ctx.json