Apply "Squiz" code style on old (pre-2014) files

This commit is contained in:
Job Snijders
2015-07-10 13:36:21 +02:00
parent e4f4eb44dc
commit ebd0f6fc35
539 changed files with 13591 additions and 13223 deletions

View File

@@ -2,12 +2,14 @@
$data = $agent_data['app']['memcached'][$app['app_instance']];
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-memcached-".$app['app_id'].".rrd";
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/app-memcached-'.$app['app_id'].'.rrd';
echo("memcached(".$app['app_instance'].") ");
echo 'memcached('.$app['app_instance'].') ';
if (!is_file($rrd_filename)) {
rrdtool_create ($rrd_filename, "--step 300 \
if (!is_file($rrd_filename)) {
rrdtool_create(
$rrd_filename,
'--step 300 \
DS:uptime:GAUGE:600:0:125000000000 \
DS:threads:GAUGE:600:0:125000000000 \
DS:rusage_user_ms:DERIVE:600:0:125000000000 \
@@ -26,18 +28,34 @@ echo("memcached(".$app['app_instance'].") ");
DS:evictions:DERIVE:600:0:125000000000 \
DS:bytes_read:DERIVE:600:0:125000000000 \
DS:bytes_written:DERIVE:600:0:125000000000 \
".$config['rrd_rra']);
}
'.$config['rrd_rra']
);
}
$dslist = array('uptime', 'threads', 'rusage_user_microseconds','rusage_system_microseconds','curr_items','total_items','limit_maxbytes','curr_connections','total_connections',
'connection_structures','bytes','cmd_get','cmd_set','get_hits','get_misses','evictions','bytes_read','bytes_written');
$dslist = array(
'uptime',
'threads',
'rusage_user_microseconds',
'rusage_system_microseconds',
'curr_items',
'total_items',
'limit_maxbytes',
'curr_connections',
'total_connections',
'connection_structures',
'bytes',
'cmd_get',
'cmd_set',
'get_hits',
'get_misses',
'evictions',
'bytes_read',
'bytes_written',
);
$values = array();
foreach ($dslist as $ds)
{
$values[] = isset($data[$ds]) ? $data[$ds] : -1;
}
$values = array();
foreach ($dslist as $ds) {
$values[] = isset($data[$ds]) ? $data[$ds] : (-1);
}
rrdtool_update($rrd_filename, "N:".implode(":", $values));
?>
rrdtool_update($rrd_filename, 'N:'.implode(':', $values));