original_string: protected function addServerTimingHeaders(Response $response)
      {
          if ($this->hasCollector('time')) {
              $collector = $this->getCollector('time');
  
              $headers = [];
              foreach ($collector->collect()['measures'] as $k => $m) {
                  $headers[] = sprintf('%d=%F; "%s"', $k, $m['duration'] * 1000, str_replace('"', "'", $m['label']));
              }
  
              $response->headers->set('Server-Timing', $headers, false);
          }
      }
code: protected function addServerTimingHeaders(Response $response)
      {
          if ($this->hasCollector('time')) {
              $collector = $this->getCollector('time');
  
              $headers = [];
              foreach ($collector->collect()['measures'] as $k => $m) {
                  $headers[] = sprintf('%d=%F; "%s"', $k, $m['duration'] * 1000, str_replace('"', "'", $m['label']));
              }
  
              $response->headers->set('Server-Timing', $headers, false);
          }
      }
code_tokens: protected function addServerTimingHeaders ( Response $ response ) { if ( $ this -> hasCollector ( 'time' ) ) { $ collector = $ this -> getCollector ( 'time' ) ; $ headers = [ ] ; foreach ( $ collector -> collect ( ) [ 'measures' ] as $ k => $ m ) { $ headers [ ] = sprintf ( '%d=%F; "%s"' , $ k , $ m [ 'duration' ] * 1000 , str_replace ( '"' , "'" , $ m [ 'label' ] ) ) ; } $ response -> headers -> set ( 'Server-Timing' , $ headers , false ) ; } }
docstring: Add Server-Timing headers for the TimeData collector
  
  @see https://www.w3.org/TR/server-timing/
  @param Response $response
docstring_tokens: Add Server - Timing headers for the TimeData collector