/** * Return the class of this DbObject * * This method is similar to {@link http://www.php.net/get_class}, except * that it accepts an optional parameter to allow the return value to * be overridden. If an override class name (see {@link DbObject::DbObject}) * then it will be used instead of the actual class if the allow override * parameter passed to this function evaluates to boolean true. * * @param allow_override - (optional) allow a class name passed to the constructor * to override which class this actually is, default false. * @return String - the class name of this object * @access public * @see DbObject::DbObject,http://www.php.net/get_class */ public function getClass($allow_override = false) { if ($this->override_class_name && $allow_override) { $ret = $this->override_class_name; } else { $ret = FormOption::getClass(); } return $ret; }
} $time = microtime(true) - $time; $this->enterResult($time); } public function run() { $this->name = "form_option"; $this->category = "Miscellaneous"; $this->description = "Tests form_option"; //$this->randomTest(); $this->constantTest(); } } //end of FormOption //run WpInsertPost $test = new FormOption($suite, $runs); $test->run(); class UpdateOption extends PerformanceTest { protected function constantTest() { $post_id_1 = 0; $time = microtime(true); for ($i = 0; $i < $this->runNumber; $i++) { update_option("long option name", "the value of the option", "the description of the option", "yes"); } $time = microtime(true) - $time; $this->enterResult($time); } public function run() {