You are here

private static function CleanerMysqlOptimizeEventSubscriber::getTimerResult in Cleaner 8.2

Extract and format the timer results.

Return value

string Formatted timer results.

1 call to CleanerMysqlOptimizeEventSubscriber::getTimerResult()
CleanerMysqlOptimizeEventSubscriber::optimizeMysql in src/EventSubscriber/CleanerMysqlOptimizeEventSubscriber.php
Cleaner MySQL optimization.

File

src/EventSubscriber/CleanerMysqlOptimizeEventSubscriber.php, line 133

Class

CleanerMysqlOptimizeEventSubscriber
Class CleanerMysqlOptimizeEventSubscriber.

Namespace

Drupal\cleaner\EventSubscriber

Code

private static function getTimerResult() {

  // Get raw timer's data in milliseconds.
  $raw = Timer::read('cleaner_db_optimization');

  // Convert it to seconds.
  $raw /= 1000;

  // Convert it to the correct number format.
  return number_format($raw, 3);
}