You are here

class RemovePriorityQueue in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-stdlib/benchmark/RemovePriorityQueue.php \ZendBench\Stdlib\RemovePriorityQueue

Hierarchy

Expanded class hierarchy of RemovePriorityQueue

File

vendor/zendframework/zend-stdlib/benchmark/RemovePriorityQueue.php, line 16

Namespace

ZendBench\Stdlib
View source
class RemovePriorityQueue extends AthleticEvent {
  public function classSetUp() {
    $this->fastPriorityQueue = new FastPriorityQueue();
    $this->priorityQueue = new PriorityQueue();
    for ($i = 0; $i < 1000; $i += 1) {
      $priority = rand(1, 100);
      $this->fastPriorityQueue
        ->insert('foo', $priority);
      $this->priorityQueue
        ->insert('foo', $priority);
    }
  }

  /**
   * @iterations 1000
   */
  public function removePriorityQueue() {
    $this->priorityQueue
      ->remove('foo');
  }

  /**
   * @iterations 1000
   */
  public function removeFastPriorityQueue() {
    $this->fastPriorityQueue
      ->remove('foo');
  }

}

Members