Phedenskog has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/294292

Change subject: Include the NewPP report in Performance inspector
......................................................................

Include the NewPP report in Performance inspector

Lets display the information from the NewPP report in the
inspector. To make this work, you will need another patch
that changed the NewPP HTML comment to JSON. The link
to that patch will come here later.

Bug: T110763
Change-Id: I00fb27885bf31222fd4f3ef0bfc13603c130f4a3
---
M extension.json
M i18n/en.json
M i18n/qqq.json
A modules/collectors/ext.PerformanceInspector.newpp.js
A modules/templates/newpp.mustache
5 files changed, 385 insertions(+), 157 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PerformanceInspector 
refs/changes/92/294292/1

diff --git a/extension.json b/extension.json
index b1e8e42..30df323 100644
--- a/extension.json
+++ b/extension.json
@@ -1,86 +1,111 @@
 {
-       "name": "PerformanceInspector",
-       "version": "0.1.0",
-       "author": [ "Peter Hedenskog" ],
-       "url": "https://www.mediawiki.org/wiki/Extension:PerformanceInspector";,
-       "descriptionmsg": "performanceinspector-desc",
-       "license-name": "GPL-2.0+",
-       "type": "other",
-       "Hooks": {
-               "BeforePageDisplay": [ 
"PerformanceInspectorHooks::onBeforePageDisplay" ],
-               "BaseTemplateToolbox": [ 
"PerformanceInspectorHooks::onBaseTemplateToolbox" ],
-               "ResourceLoaderTestModules": 
["PerformanceInspectorHooks::onResourceLoaderTestModules"]
-       },
-       "MessagesDirs": {
-               "BoilerPlate": [ "i18n" ]
-       },
-       "ResourceModules": {
-               "ext.PerformanceInspector.startup": {
-                       "scripts": "ext.PerformanceInspector.startup.js",
-                       "messages": "performanceinspector-portlet-link"
-               },
-               "ext.PerformanceInspector.analyze": {
-                       "scripts": [
-                               "ext.PerformanceInspector.setup.js",
-                               "ext.PerformanceInspector.view.js",
-                               "util/barChart.js",
-                               
"collectors/ext.PerformanceInspector.modules.js",
-                               
"collectors/ext.PerformanceInspector.backendtime.js",
-                               
"collectors/ext.PerformanceInspector.imagesize.js"
-                       ],
-                       "styles": [
-                               "css/ext.PerformanceInspector.css"
-                       ],
-                       "dependencies": [
-                               "oojs",
-                               "oojs-ui"
-                       ],
-                       "templates": {
-                               "summary.mustache": 
"templates/summary.mustache",
-                               "modules.mustache": 
"templates/modules.mustache",
-                               "backendtime.mustache": 
"templates/backendtime.mustache",
-                               "imagesize.mustache": 
"templates/imagesize.mustache"
-                       },
-                       "messages": [
-                               "performanceinspector-dialog-title",
-                               "performanceinspector-dialog-summary",
-                               "performanceinspector-dialog-cancel",
-                               "performanceinspector-modules-summary-top-list",
-                               
"performanceinspector-modules-summary-total-size",
-                               "performanceinspector-modules-css-title",
-                               
"performanceinspector-modules-css-column-module",
-                               
"performanceinspector-modules-css-column-allselectors",
-                               
"performanceinspector-modules-css-column-matchedselectors",
-                               
"performanceinspector-modules-css-column-percentmatched",
-                               
"performanceinspector-modules-localstorage-title",
-                               
"performanceinspector-modules-localstorage-disabled",
-                               
"performanceinspector-modules-localstorage-hits",
-                               
"performanceinspector-modules-localstorage-misses",
-                               
"performanceinspector-modules-localstorage-expired",
-                               
"performanceinspector-modules-localstorage-totalsize",
-                               "performanceinspector-backendtime-time-spent",
-                               "performanceinspector-modules-name",
-                               "performanceinspector-modules-label",
-                               "performanceinspector-backendtime-name",
-                               "performanceinspector-backendtime-label",
-                               
"performanceinspector-backendtime-summary-above-medium",
-                               "performanceinspector-imagesize-name",
-                               "performanceinspector-imagesize-label",
-                               
"performanceinspector-imagesize-column-image-name",
-                               "performanceinspector-imagesize-column-size",
-                               
"performanceinspector-imagesize-column-image-extra",
-                               "performanceinspector-imagesize-too-big",
-                               "performanceinspector-imagesize-description",
-                               "performanceinspector-modules-summary-images"
-                       ]
-               }
-       },
-       "ResourceFileModulePaths": {
-               "localBasePath": "modules",
-               "remoteExtPath": "PerformanceInspector/modules"
-       },
-       "AutoloadClasses": {
-               "PerformanceInspectorHooks": "PerformanceInspector.hooks.php"
-       },
-       "manifest_version": 1
+    "name": "PerformanceInspector",
+    "version": "0.1.0",
+    "author": ["Peter Hedenskog"],
+    "url": "https://www.mediawiki.org/wiki/Extension:PerformanceInspector";,
+    "descriptionmsg": "performanceinspector-desc",
+    "license-name": "GPL-2.0+",
+    "type": "other",
+    "Hooks": {
+        "BeforePageDisplay": 
["PerformanceInspectorHooks::onBeforePageDisplay"],
+        "BaseTemplateToolbox": 
["PerformanceInspectorHooks::onBaseTemplateToolbox"],
+        "ResourceLoaderTestModules": 
["PerformanceInspectorHooks::onResourceLoaderTestModules"]
+    },
+    "MessagesDirs": {
+        "BoilerPlate": ["i18n"]
+    },
+    "ResourceModules": {
+        "ext.PerformanceInspector.startup": {
+            "scripts": "ext.PerformanceInspector.startup.js",
+            "messages": "performanceinspector-portlet-link"
+        },
+        "ext.PerformanceInspector.analyze": {
+            "scripts": [
+                "ext.PerformanceInspector.setup.js",
+                "ext.PerformanceInspector.view.js",
+                "util/barChart.js",
+                "collectors/ext.PerformanceInspector.modules.js",
+                "collectors/ext.PerformanceInspector.backendtime.js",
+                "collectors/ext.PerformanceInspector.imagesize.js",
+                "collectors/ext.PerformanceInspector.newpp.js"
+            ],
+            "styles": [
+                "css/ext.PerformanceInspector.css"
+            ],
+            "dependencies": [
+                "oojs",
+                "oojs-ui"
+            ],
+            "templates": {
+                "summary.mustache": "templates/summary.mustache",
+                "modules.mustache": "templates/modules.mustache",
+                "backendtime.mustache": "templates/backendtime.mustache",
+                "imagesize.mustache": "templates/imagesize.mustache",
+                "newpp.mustache": "templates/newpp.mustache"
+            },
+            "messages": [
+                "performanceinspector-dialog-title",
+                "performanceinspector-dialog-summary",
+                "performanceinspector-dialog-cancel",
+                "performanceinspector-modules-summary-top-list",
+                "performanceinspector-modules-summary-total-size",
+                "performanceinspector-modules-css-title",
+                "performanceinspector-modules-css-column-module",
+                "performanceinspector-modules-css-column-allselectors",
+                "performanceinspector-modules-css-column-matchedselectors",
+                "performanceinspector-modules-css-column-percentmatched",
+                "performanceinspector-modules-localstorage-title",
+                "performanceinspector-modules-localstorage-disabled",
+                "performanceinspector-modules-localstorage-hits",
+                "performanceinspector-modules-localstorage-misses",
+                "performanceinspector-modules-localstorage-expired",
+                "performanceinspector-modules-localstorage-totalsize",
+                "performanceinspector-backendtime-time-spent",
+                "performanceinspector-modules-name",
+                "performanceinspector-modules-label",
+                "performanceinspector-backendtime-name",
+                "performanceinspector-backendtime-label",
+                "performanceinspector-backendtime-summary-above-medium",
+                "performanceinspector-imagesize-name",
+                "performanceinspector-imagesize-label",
+                "performanceinspector-imagesize-column-image-name",
+                "performanceinspector-imagesize-column-size",
+                "performanceinspector-imagesize-column-image-extra",
+                "performanceinspector-imagesize-too-big",
+                "performanceinspector-imagesize-description",
+                "performanceinspector-modules-summary-images",
+                "performanceinspector-newpp-name",
+                "performanceinspector-newpp-label",
+                "performanceinspector-newpp-column-name",
+                "performanceinspector-newpp-column-value",
+                
"performanceinspector-newpp-transclusion-expansion-time-report",
+                "performanceinspector-newpp-template-column-name",
+                "performanceinspector-newpp-template-column-percentreal",
+                "performanceinspector-newpp-template-column-real",
+                "performanceinspector-newpp-template-column-calls",
+                "performanceinspector-newpp-parsed-by",
+                "performanceinspector-newpp-cached-time",
+                "performanceinspector-newpp-cache-exipiry",
+                "performanceinspector-newpp-dynamic-content",
+                "performanceinspector-newpp-hostname",
+                "limitreport-cputime",
+                "limitreport-walltime",
+                "limitreport-ppvisitednodes",
+                "limitreport-ppgeneratednodes",
+                "limitreport-postexpandincludesize",
+                "limitreport-templateargumentsize",
+                "limitreport-expansiondepth",
+                "limitreport-expensivefunctioncount",
+                "limitreport-expensivefunctioncount"
+            ]
+        }
+    },
+    "ResourceFileModulePaths": {
+        "localBasePath": "modules",
+        "remoteExtPath": "PerformanceInspector/modules"
+    },
+    "AutoloadClasses": {
+        "PerformanceInspectorHooks": "PerformanceInspector.hooks.php"
+    },
+    "manifest_version": 1
 }
diff --git a/i18n/en.json b/i18n/en.json
index d8b4a06..9264b87 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -1,44 +1,59 @@
 {
-       "@metadata": {
-               "authors": []
-       },
-       "performanceinspector-desc": "Shows page performance metrics",
-       "performanceinspector-portlet-link": "Performance inspector",
+    "@metadata": {
+        "authors": []
+    },
+    "performanceinspector-desc": "Shows page performance metrics",
+    "performanceinspector-portlet-link": "Performance inspector",
 
-       "performanceinspector-dialog-title": "Performance inspector",
-       "performanceinspector-dialog-summary": "Summary",
-       "performanceinspector-dialog-cancel": "Cancel",
+    "performanceinspector-dialog-title": "Performance inspector",
+    "performanceinspector-dialog-summary": "Summary",
+    "performanceinspector-dialog-cancel": "Cancel",
 
-       "performanceinspector-modules-summary-top-list": "Top three largest 
modules",
-       "performanceinspector-modules-summary-total-size": "The total size of 
all modules ",
+    "performanceinspector-modules-summary-top-list": "Top three largest 
modules",
+    "performanceinspector-modules-summary-total-size": "The total size of all 
modules ",
 
-       "performanceinspector-modules-name": "Modules",
-       "performanceinspector-modules-label": "Modules information",
+    "performanceinspector-modules-name": "Modules",
+    "performanceinspector-modules-label": "Modules information",
 
-       "performanceinspector-modules-css-title": "CSS",
-       "performanceinspector-modules-css-column-module": "Module",
-       "performanceinspector-modules-css-column-allselectors": "allSelectors",
-       "performanceinspector-modules-css-column-matchedselectors": 
"matchedselectors",
-       "performanceinspector-modules-css-column-percentmatched": 
"percentMatched",
+    "performanceinspector-modules-css-title": "CSS",
+    "performanceinspector-modules-css-column-module": "Module",
+    "performanceinspector-modules-css-column-allselectors": "allSelectors",
+    "performanceinspector-modules-css-column-matchedselectors": 
"matchedselectors",
+    "performanceinspector-modules-css-column-percentmatched": "percentMatched",
 
-       "performanceinspector-modules-localstorage-title": "Local storage",
-       "performanceinspector-modules-localstorage-disabled": "Local storage is 
disabled.",
-       "performanceinspector-modules-localstorage-hits": "Hits",
-       "performanceinspector-modules-localstorage-misses": "Misses",
-       "performanceinspector-modules-localstorage-expired": "Expired",
-       "performanceinspector-modules-localstorage-totalsize": "Total size",
+    "performanceinspector-modules-localstorage-title": "Local storage",
+    "performanceinspector-modules-localstorage-disabled": "Local storage is 
disabled.",
+    "performanceinspector-modules-localstorage-hits": "Hits",
+    "performanceinspector-modules-localstorage-misses": "Misses",
+    "performanceinspector-modules-localstorage-expired": "Expired",
+    "performanceinspector-modules-localstorage-totalsize": "Total size",
 
-       "performanceinspector-backendtime-name": "Backend time",
-       "performanceinspector-backendtime-label": "Backend time",
-       "performanceinspector-backendtime-summary-above-medium": "The page took 
$1 {{PLURAL:$1| ms | ms }} to render in the backend.",
-       "performanceinspector-backendtime-time-spent": "The page took $1 
{{PLURAL:$1| ms | ms }} to render in the backend.",
+    "performanceinspector-backendtime-name": "Backend time",
+    "performanceinspector-backendtime-label": "Backend time",
+    "performanceinspector-backendtime-summary-above-medium": "The page took $1 
{{PLURAL:$1| ms | ms }} to render in the backend.",
+    "performanceinspector-backendtime-time-spent": "The page took $1 
{{PLURAL:$1| ms | ms }} to render in the backend.",
 
-       "performanceinspector-imagesize-name": "Image size",
-       "performanceinspector-imagesize-label": "Image size",
-       "performanceinspector-imagesize-column-image-name":"Name",
-       "performanceinspector-imagesize-column-size":"Size",
-       "performanceinspector-imagesize-column-image-extra":"Extra",
-       "performanceinspector-imagesize-too-big": "Warning",
-       "performanceinspector-imagesize-description":"Here are all the images 
loaded on this page.",
-       "performanceinspector-modules-summary-images":  "The page 
{{PLURAL:$1|has|have}} $1 {{PLURAL:$1|image|images}} with a total size of $2."
+    "performanceinspector-imagesize-name": "Image size",
+    "performanceinspector-imagesize-label": "Image size",
+    "performanceinspector-imagesize-column-image-name": "Name",
+    "performanceinspector-imagesize-column-size": "Size",
+    "performanceinspector-imagesize-column-image-extra": "Extra",
+    "performanceinspector-imagesize-too-big": "Warning",
+    "performanceinspector-imagesize-description": "Here are all the images 
loaded on this page.",
+    "performanceinspector-modules-summary-images": "The page 
{{PLURAL:$1|has|have}} $1 {{PLURAL:$1|image|images}} with a total size of $2.",
+
+    "performanceinspector-newpp-name": "NewPP report",
+    "performanceinspector-newpp-label": "NewPP report",
+    "performanceinspector-newpp-column-name": "Name",
+    "performanceinspector-newpp-column-value": "Value",
+    "performanceinspector-newpp-transclusion-expansion-time-report": 
"Transclusion expansion time report",
+    "performanceinspector-newpp-template-time-report-column-name": "Name",
+    "performanceinspector-newpp-template-time-report-column-percentreal": "%",
+    "performanceinspector-newpp-template-time-report-column-real": "Real",
+    "performanceinspector-newpp-template-time-report-column-calls": "Calls",
+    "performanceinspector-newpp-parsed-by": "Parsed by",
+    "performanceinspector-newpp-cached-time": "Cached time",
+    "performanceinspector-newpp-cache-exipiry": "Cache expiry",
+    "performanceinspector-newpp-dynamic-content": "Dynamic content"
+
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 225837a..bd58e47 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -1,40 +1,53 @@
 {
-       "@metadata": {
-               "authors": [
-                       "Liuxinyu970226",
-                       "Robby"
-               ]
-       },
-       "performanceinspector-desc": 
"{{desc|name=PerformanceInspector|url=https://www.mediawiki.org/wiki/Extension:PerformanceInspector}}";,
-       "performanceinspector-portlet-link": "The name of the link in the 
portlet menu, when the inspector is activated.",
-       "performanceinspector-dialog-title": "The heading in the dialog that 
displayes the inspector.",
-       "performanceinspector-dialog-summary": "The name of the summary field 
for all collected data for the inspector\n{{Identical|Summary}}",
-       "performanceinspector-dialog-cancel": "The text of the cancel button in 
the dialog\n{{Identical|Cancel}}",
-       "performanceinspector-modules-summary-top-list": "Heading for the top 
list of largest modules in the summary section.",
-       "performanceinspector-modules-summary-total-size": "The total weight of 
all modules, displayed in the summary section",
-       "performanceinspector-modules-name": "The name of the module part of 
the dialog\n{{Identical|Module}}",
-       "performanceinspector-modules-label": "The label of the module part of 
the dialog",
-       "performanceinspector-modules-css-title": "The heading for the CSS 
section\n{{Identical|CSS}}",
-       "performanceinspector-modules-css-column-module": "The column name for 
modules in the CSS section\n{{Identical|Module}}",
-       "performanceinspector-modules-css-column-allselectors": "The column 
name for allSelectors in the CSS section",
-       "performanceinspector-modules-css-column-matchedselectors": "The column 
name for matchedselectors in the CSS section",
-       "performanceinspector-modules-css-column-percentmatched": "The column 
name for percentMatched in the CSS section",
-       "performanceinspector-modules-localstorage-title": "The heading for the 
Local storage section",
-       "performanceinspector-modules-localstorage-disabled": "This is 
displayed if local storage is disabled",
-       "performanceinspector-modules-localstorage-hits": "The number of hits 
in local storage\n{{Identical|Hit}}",
-       "performanceinspector-modules-localstorage-misses": "The number of 
misses in local storage\n{{Identical|Miss}}",
-       "performanceinspector-modules-localstorage-expired": "The number of 
modules that was expired in local storage\n{{Identical|Expired}}",
-       "performanceinspector-modules-localstorage-totalsize": "The total size 
of modules in local storage",
-       "performanceinspector-backendtime-name": "The name of the backend part 
of the dialog",
-       "performanceinspector-backendtime-label": "The label of the backend 
part of the dialog",
-       "performanceinspector-backendtime-summary-above-medium": "Text 
displayed when the backend time is larger than a predefined value.",
-       "performanceinspector-backendtime-time-spent": "Display the total time 
spent in backend in the dialog",
-       "performanceinspector-imagesize-name": "The name of the page size of 
the dialog",
-       "performanceinspector-imagesize-label": "The label of the page size of 
the dialog",
-       "performanceinspector-imagesize-column-image-name": "Name of the column 
displaying the image name\n{{Identical|Name}}",
-       "performanceinspector-imagesize-column-size": "The name of the column 
displaying the size of the image\n{{Identical|Size}}",
-       "performanceinspector-imagesize-column-image-extra": "The name of the 
column displaying extra information about the images.\n{{Identical|Extra}}",
-       "performanceinspector-imagesize-too-big": "Information displayed in the 
extra column if the image is too big.\n{{Identical|Warning}}",
-       "performanceinspector-imagesize-description": "Description of the image 
section, displayed before the table of images.",
-       "performanceinspector-modules-summary-images": "Information from the 
images displaying the summary information from the image objects."
+    "@metadata": {
+        "authors": [
+            "Liuxinyu970226",
+            "Robby"
+        ]
+    },
+    "performanceinspector-desc": 
"{{desc|name=PerformanceInspector|url=https://www.mediawiki.org/wiki/Extension:PerformanceInspector}}";,
+    "performanceinspector-portlet-link": "The name of the link in the portlet 
menu, when the inspector is activated.",
+    "performanceinspector-dialog-title": "The heading in the dialog that 
displayes the inspector.",
+    "performanceinspector-dialog-summary": "The name of the summary field for 
all collected data for the inspector\n{{Identical|Summary}}",
+    "performanceinspector-dialog-cancel": "The text of the cancel button in 
the dialog\n{{Identical|Cancel}}",
+    "performanceinspector-modules-summary-top-list": "Heading for the top list 
of largest modules in the summary section.",
+    "performanceinspector-modules-summary-total-size": "The total weight of 
all modules, displayed in the summary section",
+    "performanceinspector-modules-name": "The name of the module part of the 
dialog\n{{Identical|Module}}",
+    "performanceinspector-modules-label": "The label of the module part of the 
dialog",
+    "performanceinspector-modules-css-title": "The heading for the CSS 
section\n{{Identical|CSS}}",
+    "performanceinspector-modules-css-column-module": "The column name for 
modules in the CSS section\n{{Identical|Module}}",
+    "performanceinspector-modules-css-column-allselectors": "The column name 
for allSelectors in the CSS section",
+    "performanceinspector-modules-css-column-matchedselectors": "The column 
name for matchedselectors in the CSS section",
+    "performanceinspector-modules-css-column-percentmatched": "The column name 
for percentMatched in the CSS section",
+    "performanceinspector-modules-localstorage-title": "The heading for the 
Local storage section",
+    "performanceinspector-modules-localstorage-disabled": "This is displayed 
if local storage is disabled",
+    "performanceinspector-modules-localstorage-hits": "The number of hits in 
local storage\n{{Identical|Hit}}",
+    "performanceinspector-modules-localstorage-misses": "The number of misses 
in local storage\n{{Identical|Miss}}",
+    "performanceinspector-modules-localstorage-expired": "The number of 
modules that was expired in local storage\n{{Identical|Expired}}",
+    "performanceinspector-modules-localstorage-totalsize": "The total size of 
modules in local storage",
+    "performanceinspector-backendtime-name": "The name of the backend part of 
the dialog",
+    "performanceinspector-backendtime-label": "The label of the backend part 
of the dialog",
+    "performanceinspector-backendtime-summary-above-medium": "Text displayed 
when the backend time is larger than a predefined value.",
+    "performanceinspector-backendtime-time-spent": "Display the total time 
spent in backend in the dialog",
+    "performanceinspector-imagesize-name": "The name of the page size of the 
dialog",
+    "performanceinspector-imagesize-label": "The label of the page size of the 
dialog",
+    "performanceinspector-imagesize-column-image-name": "Name of the column 
displaying the image name\n{{Identical|Name}}",
+    "performanceinspector-imagesize-column-size": "The name of the column 
displaying the size of the image\n{{Identical|Size}}",
+    "performanceinspector-imagesize-column-image-extra": "The name of the 
column displaying extra information about the images.\n{{Identical|Extra}}",
+    "performanceinspector-imagesize-too-big": "Information displayed in the 
extra column if the image is too big.\n{{Identical|Warning}}",
+    "performanceinspector-imagesize-description": "Description of the image 
section, displayed before the table of images.",
+    "performanceinspector-modules-summary-images": "Information from the 
images displaying the summary information from the image objects.",
+    "performanceinspector-newpp-name": "The name of the NewPP report of the 
dialog",
+    "performanceinspector-newpp-label": "The label of the NewPP report part of 
the dialog",
+    "performanceinspector-newpp-column-name": "The name of the column header 
for a metric of the NewPP report",
+    "performanceinspector-newpp-column-value": "The name of the column header 
for the value of the NewPP report",
+    "performanceinspector-newpp-transclusion-expansion-time-report": "The 
header name for the time report",
+    "performanceinspector-newpp-template-time-report-column-name": "The column 
header name for the template name",
+    "performanceinspector-newpp-template-time-report-column-percentreal": "The 
column header name for time spent in percentage",
+    "performanceinspector-newpp-template-time-report-column-real": "The column 
header name for time spent",
+    "performanceinspector-newpp-template-time-report-column-calls": "The 
column header name for number of calls per template",
+    "performanceinspector-newpp-parsed-by": "The hostname of the server that 
parsed the page",
+    "performanceinspector-newpp-cached-time": "When the page was cached",
+    "performanceinspector-newpp-cache-exipiry": "When the cache will expire",
+    "performanceinspector-newpp-dynamic-content": "Is the page dynamic content"
 }
diff --git a/modules/collectors/ext.PerformanceInspector.newpp.js 
b/modules/collectors/ext.PerformanceInspector.newpp.js
new file mode 100644
index 0000000..903ff31
--- /dev/null
+++ b/modules/collectors/ext.PerformanceInspector.newpp.js
@@ -0,0 +1,20 @@
+( function ( mw ) {
+
+       var newppCollector = function runNewPPCollector() {
+               var template = mw.template.get( 
'ext.PerformanceInspector.analyze', 'newpp.mustache' );
+
+               return {
+                       summary: {
+                       },
+                       view: {
+                               name: 'performanceinspector-newpp-name',
+                               label: 'performanceinspector-newpp-label',
+                               template: template,
+                               data: {
+                                       parserReport: mw.config.get( 
'wgParserReport' )
+                               }
+                       }
+               };
+       };
+       module.exports.collectors.push( newppCollector );
+}( mediaWiki ) );
diff --git a/modules/templates/newpp.mustache b/modules/templates/newpp.mustache
new file mode 100644
index 0000000..bad9429
--- /dev/null
+++ b/modules/templates/newpp.mustache
@@ -0,0 +1,155 @@
+<h4>{{#msg}}performanceinspector-newpp-title{{/msg}}</h4>
+
+<table class="wikitable">
+       <thead>
+               <tr>
+                       <th>
+                               
{{#msg}}performanceinspector-newpp-column-name{{/msg}}
+                       </th>
+                       <th>
+                               
{{#msg}}performanceinspector-newpp-column-value{{/msg}}
+                       </th>
+               </tr>
+               {{#parserReport.parsedBy}}
+               <tr>
+                       <td>
+                               
{{#msg}}performanceinspector-newpp-parsed-by{{/msg}}
+                       </td>
+                       <td>
+                               {{this}}
+                       </td>
+               </tr>
+               {{/parserReport.parsedBy}}
+               <tr>
+                       <td>
+                               
{{#msg}}performanceinspector-newpp-cached-time{{/msg}}
+                       </td>
+                       <td>
+                               {{parserReport.cachedTime}}
+                       </td>
+               </tr>
+               <tr>
+                       <td>
+                               
{{#msg}}performanceinspector-newpp-cache-exipiry{{/msg}}
+                       </td>
+                       <td>
+                               {{parserReport.cacheExpiry}}
+                       </td>
+               </tr>
+               <tr>
+                       <td>
+                               
{{#msg}}performanceinspector-newpp-dynamic-content{{/msg}}
+                       </td>
+                       <td>
+                               {{parserReport.dynamicContent}}
+                       </td>
+               </tr>
+               <tr>
+                       <td>
+                               {{#msg}}limitreport-cputime{{/msg}}
+                       </td>
+                       <td>
+                               {{parserReport.limitreport-cputime}}
+                       </td>
+               </tr>
+               <tr>
+                       <td>
+                               {{#msg}}limitreport-walltime{{/msg}}
+                       </td>
+                       <td>
+                               {{parserReport.limitreport-walltime}}
+                       </td>
+               </tr>
+               <tr>
+                       <td>
+                               {{#msg}}limitreport-ppvisitednodes{{/msg}}
+                       </td>
+                       <td>
+                               {{parserReport.limitreport-ppvisitednodes}}
+                       </td>
+               </tr>
+               <tr>
+                       <td>
+                               {{#msg}}limitreport-ppgeneratednodes{{/msg}}
+                       </td>
+                       <td>
+                               {{parserReport.limitreport-ppgeneratednodes}}
+                       </td>
+               </tr>
+               <tr>
+                       <td>
+                               
{{#msg}}limitreport-postexpandincludesize{{/msg}}
+                       </td>
+                       <td>
+                               
{{parserReport.limitreport-postexpandincludesize}}
+                       </td>
+               </tr>
+               <tr>
+                       <td>
+                               {{#msg}}limitreport-templateargumentsize{{/msg}}
+                       </td>
+                       <td>
+                               
{{parserReport.limitreport-templateargumentsize}}
+                       </td>
+               </tr>
+               <tr>
+                       <td>
+                               {{#msg}}limitreport-expansiondepth{{/msg}}
+                       </td>
+                       <td>
+                               {{parserReport.limitreport-expansiondepth}}
+                       </td>
+               </tr>
+               <tr>
+                       <td>
+                               
{{#msg}}limitreport-expensivefunctioncount{{/msg}}
+                       </td>
+                       <td>
+                               
{{parserReport.limitreport-expensivefunctioncount}}
+                       </td>
+               </tr>
+               <tr>
+                       <td>
+                               
{{#msg}}limitreport-expensivefunctioncount{{/msg}}
+                       </td>
+                       <td>
+                               
{{parserReport.limitreport-expensivefunctioncount}}
+                       </td>
+               </tr>
+</table>
+
+<h5>{{#msg}}performanceinspector-newpp-transclusion-expansion-time-report{{/msg}}</h5>
+<table class="wikitable">
+       <thead>
+               <tr>
+                       <th>
+                               
{{#msg}}performanceinspector-newpp-template-time-report-column-name{{/msg}}
+                       </th>
+                       <th>
+                               
{{#msg}}performanceinspector-newpp-template-time-report-column-percentreal{{/msg}}
+                       </th>
+                       <th>
+                               
{{#msg}}performanceinspector-newpp-template-time-report-column-real{{/msg}}
+                       </th>
+                       <th>
+                               
{{#msg}}performanceinspector-newpp-template-column-time-report-calls{{/msg}}
+                       </th>
+               </tr>
+       </thead>
+       {{#parserReport.transclusionExpansionTimeReport.templates}}
+               <tr>
+                       <td>
+                               {{name}}
+                       </td>
+                       <td>
+                               {{percentreal}}
+                       </td>
+                       <td>
+                               {{real}}
+                       </td>
+                       <td>
+                               {{calls}}
+                       </td>
+               </tr>
+       {{/parserReport.transclusionExpansionTimeReport.templates}}
+</table>

-- 
To view, visit https://gerrit.wikimedia.org/r/294292
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I00fb27885bf31222fd4f3ef0bfc13603c130f4a3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PerformanceInspector
Gerrit-Branch: master
Gerrit-Owner: Phedenskog <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to