You are here

class TidewaysXHProfExtension in XHProf 8

Implements support for tideways xhprof extension.

Hierarchy

Expanded class hierarchy of TidewaysXHProfExtension

See also

https://github.com/tideways/php-xhprof-extension

1 file declares its use of TidewaysXHProfExtension
Profiler.php in src/Profiler.php

File

src/Extension/TidewaysXHProfExtension.php, line 10

Namespace

Drupal\xhprof\Extension
View source
class TidewaysXHProfExtension implements ExtensionInterface {

  /**
   * {@inheritdoc}
   */
  public static function isLoaded() {
    return extension_loaded('tideways_xhprof');
  }

  /**
   * {@inheritdoc}
   */
  public function getOptions() {
    return [
      'FLAGS_CPU' => 'TIDEWAYS_XHPROF_FLAGS_CPU',
      'FLAGS_MEMORY' => 'TIDEWAYS_XHPROF_FLAGS_MEMORY',
      'FLAGS_NO_BUILTINS' => 'TIDEWAYS_XHPROF_FLAGS_NO_BUILTINS',
    ];
  }

  /**
   * {@inheritdoc}
   */
  public function enable($modifier, $options) {
    tideways_xhprof_enable($modifier);
  }

  /**
   * {@inheritdoc}
   */
  public function disable() {
    return tideways_xhprof_disable();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
TidewaysXHProfExtension::disable public function Disables the extension. Overrides ExtensionInterface::disable
TidewaysXHProfExtension::enable public function Enables the profiling with the extension. Overrides ExtensionInterface::enable
TidewaysXHProfExtension::getOptions public function Returns the options supported by this extension. Overrides ExtensionInterface::getOptions
TidewaysXHProfExtension::isLoaded public static function Returns TRUE if this extension is loaded into the PHP interpreter. Overrides ExtensionInterface::isLoaded