public function FileStorage::__construct in XHProf 8
Parameters
string $dir:
File
- src/
XHProfLib/ Storage/ FileStorage.php, line 25  
Class
- FileStorage
 - Provides file storage backend for xhprof runs.
 
Namespace
Drupal\xhprof\XHProfLib\StorageCode
public function __construct($dir = NULL) {
  if ($dir) {
    $this->dir = $dir;
  }
  else {
    $this->dir = ini_get("xhprof.output_dir") ?: sys_get_temp_dir();
  }
  $factory = \Drupal::configFactory();
  $extension = $factory
    ->get('xhprof.config')
    ->get('extension');
  if ($extension == 'uprofiler') {
    $this->suffix = 'uprofiler';
  }
  else {
    $this->suffix = 'xhprof';
  }
}