/**
  * @param \Drupal\xhprof\XHProfLib\Run $run
  * @param \Symfony\Component\HttpFoundation\Request $request
  *
  * @return string
  */
 public function runAction(Run $run, Request $request)
 {
     $length = $request->get('length', 100);
     $sort = $request->get('sort', 'wt');
     $report = $this->reportEngine->getReport(NULL, NULL, $run, NULL, NULL, $sort, NULL, NULL);
     $build['#title'] = $this->t('XHProf view report for %id', array('%id' => $run->getId()));
     $descriptions = ReportConstants::getDescriptions();
     $build['summary'] = array('title' => array('#type' => 'inline_template', '#template' => '<h3>Summary</h3>'), 'table' => array('#theme' => 'table', '#header' => array(), '#rows' => $this->getSummaryRows($report, $descriptions)));
     $build['length'] = array('#type' => 'inline_template', '#template' => $length == -1 ? '<h3>Displaying all functions, sorted by {{ sort }}.</h3>' : '<h3>Displaying top {{ length }} functions, sorted by {{ sort }}. [{{ all }}]</h3>', '#context' => array('length' => $length, 'all' => $this->l($this->t('show all'), new Url('xhprof.run', array('run' => $run->getId(), 'length' => -1))), 'sort' => Xss::filter($descriptions[$sort], array())));
     $build['table'] = array('#theme' => 'table', '#header' => $this->getRunHeader($report, $descriptions), '#rows' => $this->getRunRows($report, $length), '#attributes' => array('class' => array('responsive')), '#attached' => array('library' => array('xhprof/xhprof')));
     return $build;
 }