You are here

function _acquia_purge_diagnostics_capacity in Acquia Purge 7

Capacity.

Parameters

string $t: Name of the t() function to call.

AcquiaPurgeService $service: The Acquia Purge service.

Return value

array Associative array with the following elements:

1 string reference to '_acquia_purge_diagnostics_capacity'
acquia_purge_acquia_purge_diagnostics in ./acquia_purge.module
Implements hook_acquia_purge_diagnostics().

File

./acquia_purge.diagnostics.inc, line 873
Diagnostic self-tests and reports that aim to prevent runtime misery.

Code

function _acquia_purge_diagnostics_capacity($t, $service) {
  $capacity = $service
    ->capacity();
  $maxitems = $capacity
    ->queueClaimsLimit();
  $factor = $capacity
    ->httpRequestsFactor();
  $test = array(
    'title' => $t('Capacity'),
    'severity' => ACQUIA_PURGE_SEVLEVEL_OK,
    'value' => $t('@items items/batch, slowdown factor=@factorX', array(
      '@items' => $maxitems,
      '@factor' => $factor,
    )),
  );
  return $test;
}