Exemplo n.º 1
0
 /**
  * Render the profiler output.
  *
  * @return  \stdClass
  *
  * @since   1.0
  */
 private function getProfile()
 {
     $points = $this->profiler->getPoints();
     $pointStart = $points[0]->getName();
     $pointEnd = $points[count($points) - 1]->getName();
     $profile = new \stdClass();
     $profile->peak = $this->profiler->getMemoryBytesBetween($pointStart, $pointEnd);
     $profile->time = $this->profiler->getTimeBetween($pointStart, $pointEnd);
     return $profile;
 }
Exemplo n.º 2
0
 /**
  * @covers  \Joomla\Profiler\Profiler::getPoints
  */
 public function testTheProfilerReturnsTheMarkedPoints()
 {
     $this->assertEmpty($this->instance->getPoints());
 }
Exemplo n.º 3
0
 /**
  * Tests the getPoints method.
  *
  * @return  void
  *
  * @covers  \Joomla\Profiler\Profiler::getPoints
  * @since   1.0
  */
 public function testGetPoints()
 {
     TestHelper::setValue($this->instance, 'points', false);
     $this->assertFalse($this->instance->getPoints());
 }