mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-12 23:17:02 +02:00
stored counter stats
This commit is contained in:
@ -64,12 +64,13 @@ class ControllerHealthWorker extends Controller {
|
||||
$db = Registry::get('db');
|
||||
$db->select_db($db->database);
|
||||
|
||||
list($archivesizeraw, $this->data['counters']) = $this->model_stat_counter->get_counters();
|
||||
list($archivesizeraw, $archivestoredsizeraw, $this->data['counters']) = $this->model_stat_counter->get_counters();
|
||||
|
||||
$oldest_record_timestamp = $this->model_health_health->get_oldest_record_ts();
|
||||
$total_number_days = round( (time() - $this->model_health_health->get_first_email_arrival_ts()) / 86400 );
|
||||
|
||||
$this->data['archive_size'] = nice_size($archivesizeraw, ' ');
|
||||
$this->data['archive_stored_size'] = nice_size($archivestoredsizeraw, ' ');
|
||||
|
||||
$this->data['prefix'] = '';
|
||||
if(isset($this->data['counters'][MEMCACHED_PREFIX . 'rcvd'])) { $this->data['prefix'] = MEMCACHED_PREFIX; }
|
||||
|
@ -13,9 +13,11 @@ class ModelStatCounter extends Model {
|
||||
|
||||
if(isset($counter[MEMCACHED_PREFIX . 'counters_last_update'])) {
|
||||
if(isset($counter[MEMCACHED_PREFIX . 'size'])) { $asize = $counter[MEMCACHED_PREFIX . 'size']; }
|
||||
if(isset($counter[MEMCACHED_PREFIX . 'stored_size'])) { $ssize = $counter[MEMCACHED_PREFIX . 'stored_size']; }
|
||||
unset($counter[MEMCACHED_PREFIX . 'size']);
|
||||
unset($counter[MEMCACHED_PREFIX . 'stored_size']);
|
||||
|
||||
return array ($asize, $counter);
|
||||
return array ($asize, $ssize, $counter);
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,13 +25,15 @@ class ModelStatCounter extends Model {
|
||||
|
||||
if($query->num_rows == 1) {
|
||||
$asize = $query->row['size'];
|
||||
$ssize = $query->row['stored_size'];
|
||||
|
||||
unset($query->row['size']);
|
||||
unset($query->row['stored_size']);
|
||||
|
||||
$counter = $query->row;
|
||||
}
|
||||
|
||||
return array ($asize, $counter);
|
||||
return array ($asize, $ssize, $counter);
|
||||
}
|
||||
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th><?php print $text_archive_size; ?>:</th>
|
||||
<td><?php print $archive_size; ?>B</td>
|
||||
<td><?php print $archive_size; ?>B (<?php print $archive_stored_size; ?>B)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="cellhealthleft"><?php print $text_archive_size; ?></div>
|
||||
<div class="cellhealthright"><?php print $archive_size; ?>B</div>
|
||||
<div class="cellhealthright"><?php print $archive_size; ?>B (<?php print $archive_stored_size; ?>B)</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
Reference in New Issue
Block a user