Merge "Don't make two database requests to load the same object, again."
[lhc/web/wiklou.git] / includes / profiler / ProfilerSimple.php
index 1091495..d1d1c5d 100644 (file)
@@ -1,5 +1,22 @@
 <?php
 /**
+ * Base class for simple profiling.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
  * @file
  * @ingroup Profiler
  */
@@ -15,6 +32,11 @@ class ProfilerSimple extends Profiler {
        var $zeroEntry = array('cpu'=> 0.0, 'cpu_sq' => 0.0, 'real' => 0.0, 'real_sq' => 0.0, 'count' => 0);
        var $errorEntry;
 
+       public function isPersistent() {
+               /* Implement in output subclasses */
+               return false;
+       }
+
        protected function addInitialStack() {
                $this->errorEntry = $this->zeroEntry;
                $this->errorEntry['count'] = 1;