/**
  * @Web\Route("", name="_advanced_profiler")
  */
 public function indexAction()
 {
     $this->init();
     $tokens = $this->profiler->find(null, null, PHP_INT_MAX, null, null, null);
     /** @var Profile[] $profiles */
     $profiles = [];
     foreach ($tokens as $token) {
         $profiles[] = $this->profiler->loadProfile($token['token']);
     }
     return $this->render('YchuAdvancedProfilerBundle:Default:index.html.twig', ['requests' => $profiles]);
 }
Exemplo n.º 2
0
 public function testFindWorksWithInvalidDates()
 {
     $profiler = new Profiler($this->storage);
     $this->assertCount(0, $profiler->find(null, null, null, null, 'some string', ''));
 }
Exemplo n.º 3
0
 public function testFindWorksWithStatusCode()
 {
     $profiler = new Profiler($this->storage);
     $this->assertCount(0, $profiler->find(null, null, null, null, null, null, '204'));
 }
Exemplo n.º 4
0
 /**
  * @param string $ip
  * @param string $url
  * @param int    $limit
  * @param string $method
  * @param string $start
  * @param string $end
  * @return array
  */
 public function find($ip = null, $url = null, $limit = null, $method = null, $start = null, $end = null)
 {
     $limit = $limit ?: $this->defaultLimit;
     return $this->profiler->find($ip, $url, $limit, $method, $start, $end);
 }