Added GET profiling to pecl memcached (like the PHP one has).
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 7 Nov 2012 21:42:31 +0000 (13:42 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 7 Nov 2012 21:42:40 +0000 (13:42 -0800)
Change-Id: Ic92eb740240e2cb46688a174cdeda87c02d4d498

includes/objectcache/MemcachedPeclBagOStuff.php

index 76886eb..7793710 100644 (file)
@@ -107,8 +107,11 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
         * @return Mixed
         */
        public function get( $key ) {
+               wfProfileIn( __METHOD__ );
                $this->debugLog( "get($key)" );
-               return $this->checkResult( $key, parent::get( $key ) );
+               $value = $this->checkResult( $key, parent::get( $key ) );
+               wfProfileOut( __METHOD__ );
+               return $value;
        }
 
        /**
@@ -224,9 +227,11 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
         * @return Array
         */
        public function getMulti( array $keys ) {
+               wfProfileIn( __METHOD__ );
                $this->debugLog( 'getMulti(' . implode( ', ', $keys ) . ')' );
                $callback = array( $this, 'encodeKey' );
                $result = $this->client->getMulti( array_map( $callback, $keys ) );
+               wfProfileOut( __METHOD__ );
                return $this->checkResult( false, $result );
        }