This repository has been archived by the owner on Jun 10, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleanup sonarqube warnings, switch from tabs to spaces
- Loading branch information
Showing
28 changed files
with
2,464 additions
and
2,130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,32 @@ | ||
<?php | ||
|
||
spl_autoload_register(function($class) { | ||
include __DIR__ . '/../inc/' . strtolower($class) . '_class.php'; | ||
}); | ||
|
||
$iCount=0; | ||
$aPerf=array(); | ||
$l = null; | ||
try { | ||
$config = new AdminConfig(); | ||
|
||
$state = new LggrState(); | ||
$state->setLocalCall(true); | ||
|
||
$l = new Lggr($state, $config); | ||
|
||
$iCount = $l->purgeOldMessages(); | ||
$aPerf = $l->getPerf(); | ||
} catch(LggrException $e) { | ||
die($e->getMessage()); | ||
} // try | ||
|
||
$pCount = count($aPerf); | ||
$pTime = 0; | ||
foreach($aPerf as $perf) { | ||
$aTmp = $perf->getPerf(); | ||
$pTime += $aTmp['time']; | ||
} // foreach | ||
|
||
<?php | ||
spl_autoload_register(function ($class) { | ||
include __DIR__ . '/../inc/' . strtolower($class) . '_class.php'; | ||
}); | ||
|
||
$iCount = 0; | ||
$aPerf = array(); | ||
$l = null; | ||
try { | ||
$config = new AdminConfig(); | ||
|
||
$state = new LggrState(); | ||
$state->setLocalCall(true); | ||
|
||
$l = new Lggr($state, $config); | ||
|
||
$iCount = $l->purgeOldMessages(); | ||
$aPerf = $l->getPerf(); | ||
} catch (LggrException $e) { | ||
die($e->getMessage()); | ||
} // try | ||
|
||
$pCount = count($aPerf); | ||
$pTime = 0; | ||
foreach ($aPerf as $perf) { | ||
$aTmp = $perf->getPerf(); | ||
$pTime += $aTmp['time']; | ||
} // foreach | ||
|
||
?> | ||
Purging <?= $iCount ?> old messages with <?= $pCount ?> queries in <?= $pTime ?> seconds. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,32 @@ | ||
<?php | ||
|
||
spl_autoload_register(function($class) { | ||
include __DIR__ . '/../inc/' . strtolower($class) . '_class.php'; | ||
}); | ||
|
||
$iCountServers=0; | ||
$aPerf=array(); | ||
$l = null; | ||
try { | ||
$config = new AdminConfig(); | ||
|
||
$state = new LggrState(); | ||
$state->setLocalCall(true); | ||
|
||
$l = new Lggr($state, $config); | ||
|
||
$iCountServers = $l->updateServers(); | ||
|
||
$aPerf = $l->getPerf(); | ||
} catch(LggrException $e) { | ||
die($e->getMessage()); | ||
} // try | ||
|
||
$pCount = count($aPerf); | ||
$pTime = 0; | ||
foreach($aPerf as $perf) { | ||
$aTmp = $perf->getPerf(); | ||
$pTime += $aTmp['time']; | ||
} // foreach | ||
|
||
<?php | ||
spl_autoload_register(function ($class) { | ||
include __DIR__ . '/../inc/' . strtolower($class) . '_class.php'; | ||
}); | ||
|
||
$iCountServers = 0; | ||
$aPerf = array(); | ||
$l = null; | ||
try { | ||
$config = new AdminConfig(); | ||
|
||
$state = new LggrState(); | ||
$state->setLocalCall(true); | ||
|
||
$l = new Lggr($state, $config); | ||
|
||
$iCountServers = $l->updateServers(); | ||
|
||
$aPerf = $l->getPerf(); | ||
} catch (LggrException $e) { | ||
die($e->getMessage()); | ||
} // try | ||
|
||
$pCount = count($aPerf); | ||
$pTime = 0; | ||
foreach ($aPerf as $perf) { | ||
$aTmp = $perf->getPerf(); | ||
$pTime += $aTmp['time']; | ||
} // foreach | ||
|
||
?> | ||
Purging updating <?= $iCountServers ?> servers with <?= $pCount ?> queries in <?= $pTime ?> seconds. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
<?php | ||
|
||
spl_autoload_register(function($class) { | ||
include __DIR__ . '/../inc/' . strtolower($class) . '_class.php'; | ||
}); | ||
|
||
$iCount=0; | ||
$a=array(); | ||
$l = null; | ||
try { | ||
$config = new AdminConfig(); | ||
|
||
$state = new LggrState(); | ||
$state->setLocalCall(true); | ||
|
||
$l = new Lggr($state, $config); | ||
|
||
$l->normalizeHosts(); | ||
|
||
$a = $l->getPerf(); | ||
} catch(LggrException $e) { | ||
die($e->getMessage()); | ||
<?php | ||
spl_autoload_register(function ($class) { | ||
include __DIR__ . '/../inc/' . strtolower($class) . '_class.php'; | ||
}); | ||
|
||
$iCount = 0; | ||
$a = array(); | ||
$l = null; | ||
try { | ||
$config = new AdminConfig(); | ||
|
||
$state = new LggrState(); | ||
$state->setLocalCall(true); | ||
|
||
$l = new Lggr($state, $config); | ||
|
||
$l->normalizeHosts(); | ||
|
||
$a = $l->getPerf(); | ||
} catch (LggrException $e) { | ||
die($e->getMessage()); | ||
} // try | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,33 @@ | ||
<?php | ||
|
||
spl_autoload_register(function($class) { | ||
include 'inc/' . strtolower($class) . '_class.php'; | ||
}); | ||
|
||
session_start(); | ||
|
||
if(!isset($_REQUEST['a'])) { | ||
header('Location: index.php'); | ||
exit; | ||
} // if | ||
|
||
$config = new Config(); | ||
$state = new LggrState(); | ||
$l = new Lggr($state, $config); | ||
|
||
switch($_REQUEST['a']) { | ||
|
||
case 'latest': | ||
$id = intval($_REQUEST['id']); | ||
$aEvents = $l->getNewer($id); | ||
|
||
header('Content-Type: application/json; charset=utf8'); | ||
|
||
echo json_encode($aEvents); | ||
|
||
break; | ||
|
||
default: | ||
// ignore | ||
break; | ||
<?php | ||
spl_autoload_register(function ($class) { | ||
include 'inc/' . strtolower($class) . '_class.php'; | ||
}); | ||
|
||
session_start(); | ||
|
||
if (! isset($_REQUEST['a'])) { | ||
header('Location: index.php'); | ||
exit(); | ||
} // if | ||
|
||
$config = new Config(); | ||
$state = new LggrState(); | ||
$l = new Lggr($state, $config); | ||
|
||
switch ($_REQUEST['a']) { | ||
|
||
case 'latest': | ||
$id = intval($_REQUEST['id']); | ||
$aEvents = $l->getNewer($id); | ||
|
||
header('Content-Type: application/json; charset=utf8'); | ||
|
||
echo json_encode($aEvents); | ||
|
||
break; | ||
|
||
default: | ||
// ignore | ||
break; | ||
} // switch | ||
|
Oops, something went wrong.