You are here

private static function CleanerMySqlOptimizationController::getTimerResult in Cleaner 8

Extract and format the timer results.

Return value

string Formatted timer results.

1 call to CleanerMySqlOptimizationController::getTimerResult()
CleanerMySqlOptimizationController::mysqlOptimize in src/Controller/CleanerMySqlOptimizationController.php
MySQL optimizer.

File

src/Controller/CleanerMySqlOptimizationController.php, line 100

Class

CleanerMySqlOptimizationController
Class CleanerMySqlOptimizationController.

Namespace

Drupal\cleaner\Controller

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);
}