jenkins-bot has submitted this change and it was merged.

Change subject: Allow to send the memory usage with UDP profiler.
......................................................................


Allow to send the memory usage with UDP profiler.

Mention the possibility in $wgUDPProfilerFormatString's
documentation, but do not change it to keep backward
compatibility.

Change-Id: I86f6c47927380d6e2f5cfd75aeb39d4b0cedc6b8
---
M includes/DefaultSettings.php
M includes/profiler/ProfilerSimpleUDP.php
2 files changed, 5 insertions(+), 4 deletions(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 5d35c42..b99d3f9 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -5107,9 +5107,9 @@
 
 /**
  * Format string for the UDP profiler. The UDP profiler invokes sprintf() with
- * (profile id, count, cpu, cpu_sq, real, real_sq, entry name) as arguments.
- * You can use sprintf's argument numbering/swapping capability to repeat,
- * re-order or omit fields.
+ * (profile id, count, cpu, cpu_sq, real, real_sq, entry name, memory) as
+ * arguments. You can use sprintf's argument numbering/swapping capability to
+ * repeat, re-order or omit fields.
  *
  * @see $wgStatsFormatString
  * @since 1.22
diff --git a/includes/profiler/ProfilerSimpleUDP.php 
b/includes/profiler/ProfilerSimpleUDP.php
index 22d5cd4..627b4de 100644
--- a/includes/profiler/ProfilerSimpleUDP.php
+++ b/includes/profiler/ProfilerSimpleUDP.php
@@ -58,7 +58,8 @@
                                continue;
                        }
                        $pfline = sprintf( $wgUDPProfilerFormatString, 
$this->getProfileID(), $pfdata['count'],
-                               $pfdata['cpu'], $pfdata['cpu_sq'], 
$pfdata['real'], $pfdata['real_sq'], $entry );
+                               $pfdata['cpu'], $pfdata['cpu_sq'], 
$pfdata['real'], $pfdata['real_sq'], $entry,
+                               $pfdata['memory'] );
                        $length = strlen( $pfline );
                        /* printf("<!-- $pfline -->"); */
                        if ( $length + $plength > 1400 ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I86f6c47927380d6e2f5cfd75aeb39d4b0cedc6b8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: IAlex <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to