MaxSem has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/370599 )
Change subject: Get rid of deprecated manual profiling
......................................................................
Get rid of deprecated manual profiling
Change-Id: Iefbfb4b9937ed265156fb1b644889fd9e2b29a2e
---
M includes/AbuseFilter.class.php
M includes/parser/AbuseFilterParser.php
2 files changed, 1 insertion(+), 15 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter
refs/changes/99/370599/1
diff --git a/includes/AbuseFilter.class.php b/includes/AbuseFilter.class.php
index 1713d99..6bdf837 100644
--- a/includes/AbuseFilter.class.php
+++ b/includes/AbuseFilter.class.php
@@ -1105,8 +1105,6 @@
$var_dump = self::storeVarDump( $vars );
$var_dump = "stored-text:$var_dump"; // To distinguish from
stuff stored directly
- wfProfileIn( __METHOD__ . '-hitstats' );
-
$stash = ObjectCache::getMainStashInstance();
// Increment trigger counter
@@ -1206,8 +1204,6 @@
// Check for emergency disabling.
$total = $stash->get( self::filterUsedKey( $group ) );
self::checkEmergencyDisable( $group, $logged_local_filters,
$total );
-
- wfProfileOut( __METHOD__ . '-hitstats' );
}
/**
diff --git a/includes/parser/AbuseFilterParser.php
b/includes/parser/AbuseFilterParser.php
index 4f1534e..097e248 100644
--- a/includes/parser/AbuseFilterParser.php
+++ b/includes/parser/AbuseFilterParser.php
@@ -448,13 +448,11 @@
// We can go on quickly as either one statement with |
is true or on with & is false
if ( ( $op == '&' && !$result->toBool() ) || ( $op ==
'|' && $result->toBool() ) ) {
- wfProfileIn( __METHOD__ . '-shortcircuit' );
$orig = $this->mShortCircuit;
$this->mShortCircuit = $this->mAllowShort;
$this->doLevelCompares( $r2 );
$this->mShortCircuit = $orig;
$result = new AFPData( AFPData::DBOOL,
$result->toBool() );
- wfProfileOut( __METHOD__ . '-shortcircuit' );
continue;
}
@@ -575,9 +573,8 @@
}
AbuseFilter::triggerLimiter();
- wfProfileIn( __METHOD__ . "-$func" );
+
$result = AFPData::$func( $result, $r2,
$this->mCur->pos );
- wfProfileOut( __METHOD__ . "-$func" );
}
}
@@ -677,7 +674,6 @@
return; // The result doesn't matter.
}
- wfProfileIn( __METHOD__ . '-loadargs' );
$args = [];
do {
$r = new AFPData();
@@ -697,10 +693,6 @@
}
$this->move();
- wfProfileOut( __METHOD__ . '-loadargs' );
-
- wfProfileIn( __METHOD__ . "-$func" );
-
$funcHash = md5( $func . serialize( $args ) );
if ( isset( self::$funcCache[$funcHash] ) &&
@@ -715,8 +707,6 @@
if ( count( self::$funcCache ) > 1000 ) {
self::$funcCache = [];
}
-
- wfProfileOut( __METHOD__ . "-$func" );
} else {
$this->doLevelAtom( $result );
}
--
To view, visit https://gerrit.wikimedia.org/r/370599
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iefbfb4b9937ed265156fb1b644889fd9e2b29a2e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits