[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Move TransactionProfiler to /libs/rdbms

2016-09-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Move TransactionProfiler to /libs/rdbms
..


Move TransactionProfiler to /libs/rdbms

Change-Id: I13173facc9f101bca69e3bf3e85f292f8468e855
---
M autoload.php
R includes/libs/rdbms/TransactionProfiler.php
2 files changed, 5 insertions(+), 4 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index a71d943..4b5d9e8 100644
--- a/autoload.php
+++ b/autoload.php
@@ -1419,7 +1419,7 @@
'TitleValue' => __DIR__ . '/includes/title/TitleValue.php',
'TrackBlobs' => __DIR__ . '/maintenance/storage/trackBlobs.php',
'TraditionalImageGallery' => __DIR__ . 
'/includes/gallery/TraditionalImageGallery.php',
-   'TransactionProfiler' => __DIR__ . 
'/includes/profiler/TransactionProfiler.php',
+   'TransactionProfiler' => __DIR__ . 
'/includes/libs/rdbms/TransactionProfiler.php',
'TransformParameterError' => __DIR__ . 
'/includes/media/MediaTransformOutput.php',
'TransformTooBigImageAreaError' => __DIR__ . 
'/includes/media/MediaTransformOutput.php',
'TransformationalImageHandler' => __DIR__ . 
'/includes/media/TransformationalImageHandler.php',
diff --git a/includes/profiler/TransactionProfiler.php 
b/includes/libs/rdbms/TransactionProfiler.php
similarity index 97%
rename from includes/profiler/TransactionProfiler.php
rename to includes/libs/rdbms/TransactionProfiler.php
index bf26573..5c9976d 100644
--- a/includes/profiler/TransactionProfiler.php
+++ b/includes/libs/rdbms/TransactionProfiler.php
@@ -198,8 +198,9 @@
$elapsed = ( $eTime - $sTime );
 
if ( $isWrite && $n > $this->expect['maxAffected'] ) {
-   $this->logger->info( "Query affected $n row(s):\n" . 
$query . "\n" .
-   wfBacktrace( true ) );
+   $this->logger->info(
+   "Query affected $n row(s):\n" . $query . "\n" .
+   ( new RuntimeException() )->getTraceAsString() 
);
}
 
// Report when too many writes/queries happen...
@@ -322,7 +323,7 @@
 
$this->logger->info(
"Expectation ($expect <= $n) by $by not 
met$actual:\n$query\n" .
-   wfBacktrace( true )
+   ( new RuntimeException() )->getTraceAsString()
);
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I13173facc9f101bca69e3bf3e85f292f8468e855
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Move TransactionProfiler to /libs/rdbms

2016-09-14 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Move TransactionProfiler to /libs/rdbms
..

Move TransactionProfiler to /libs/rdbms

Change-Id: I13173facc9f101bca69e3bf3e85f292f8468e855
---
M autoload.php
R includes/libs/rdbms/TransactionProfiler.php
2 files changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/34/310534/1

diff --git a/autoload.php b/autoload.php
index a71d943..4b5d9e8 100644
--- a/autoload.php
+++ b/autoload.php
@@ -1419,7 +1419,7 @@
'TitleValue' => __DIR__ . '/includes/title/TitleValue.php',
'TrackBlobs' => __DIR__ . '/maintenance/storage/trackBlobs.php',
'TraditionalImageGallery' => __DIR__ . 
'/includes/gallery/TraditionalImageGallery.php',
-   'TransactionProfiler' => __DIR__ . 
'/includes/profiler/TransactionProfiler.php',
+   'TransactionProfiler' => __DIR__ . 
'/includes/libs/rdbms/TransactionProfiler.php',
'TransformParameterError' => __DIR__ . 
'/includes/media/MediaTransformOutput.php',
'TransformTooBigImageAreaError' => __DIR__ . 
'/includes/media/MediaTransformOutput.php',
'TransformationalImageHandler' => __DIR__ . 
'/includes/media/TransformationalImageHandler.php',
diff --git a/includes/profiler/TransactionProfiler.php 
b/includes/libs/rdbms/TransactionProfiler.php
similarity index 97%
rename from includes/profiler/TransactionProfiler.php
rename to includes/libs/rdbms/TransactionProfiler.php
index bf26573..5c9976d 100644
--- a/includes/profiler/TransactionProfiler.php
+++ b/includes/libs/rdbms/TransactionProfiler.php
@@ -198,8 +198,9 @@
$elapsed = ( $eTime - $sTime );
 
if ( $isWrite && $n > $this->expect['maxAffected'] ) {
-   $this->logger->info( "Query affected $n row(s):\n" . 
$query . "\n" .
-   wfBacktrace( true ) );
+   $this->logger->info(
+   "Query affected $n row(s):\n" . $query . "\n" .
+   ( new RuntimeException() )->getTraceAsString() 
);
}
 
// Report when too many writes/queries happen...
@@ -322,7 +323,7 @@
 
$this->logger->info(
"Expectation ($expect <= $n) by $by not 
met$actual:\n$query\n" .
-   wfBacktrace( true )
+   ( new RuntimeException() )->getTraceAsString()
);
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I13173facc9f101bca69e3bf3e85f292f8468e855
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits