DriverInterface.php 856 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * Interface for profiler driver.
  4. *
  5. * Implementation of this interface is responsible for logic of profiling.
  6. *
  7. * Copyright © Magento, Inc. All rights reserved.
  8. * See COPYING.txt for license details.
  9. */
  10. namespace Magento\Framework\Profiler;
  11. /**
  12. * @api
  13. * @since 100.0.2
  14. */
  15. interface DriverInterface
  16. {
  17. /**
  18. * Start timer
  19. *
  20. * @param string $timerId
  21. * @param array|null $tags
  22. * @return void
  23. */
  24. public function start($timerId, array $tags = null);
  25. /**
  26. * Stop timer
  27. *
  28. * @param string $timerId
  29. * @return void
  30. */
  31. public function stop($timerId);
  32. /**
  33. * Clear collected statistics for specified timer or for whole profiler if timer name is omitted.
  34. *
  35. * @param string|null $timerId
  36. * @return void
  37. */
  38. public function clear($timerId = null);
  39. }