You are here

public function Profiler::getExtensions in XHProf 8

Returns a list of available PHP extensions for profiling.

Return value

array Keyed array of extension name and its description.

Overrides ProfilerInterface::getExtensions

1 call to Profiler::getExtensions()
Profiler::isLoaded in src/Profiler.php
Is any profiler extension loaded.

File

src/Profiler.php, line 153

Class

Profiler
Provides profiler service.

Namespace

Drupal\xhprof

Code

public function getExtensions() {
  $extensions = [];
  if (XHProfExtension::isLoaded()) {
    $extensions['xhprof'] = 'XHProf';
  }
  if (UprofilerExtension::isLoaded()) {
    $extensions['uprofiler'] = 'UProfiler';
  }
  if (TidewaysExtension::isLoaded()) {
    $extensions['tideways'] = 'Tideways';
  }
  if (TidewaysXHProfExtension::isLoaded()) {
    $extensions['tideways_xhprof'] = 'Tideways xhprof';
  }
  return $extensions;
}