mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Setup/Profiler exclusions
* set time limit to generation of profiler exclusions file * remove some unused logging
This commit is contained in:
@@ -375,21 +375,13 @@ if (!CLI)
|
||||
/******************/
|
||||
$scripts[] = function() use (&$exclusions)
|
||||
{
|
||||
$s = count($exclusions);
|
||||
$i = $n = 0;
|
||||
CLI::write('applying '.$s.' baseline exclusions');
|
||||
set_time_limit(2);
|
||||
|
||||
CLI::write('applying '.count($exclusions).' baseline exclusions');
|
||||
DB::Aowow()->query('DELETE FROM ?_profiler_excludes WHERE comment = ""');
|
||||
|
||||
foreach ($exclusions as $ex)
|
||||
{
|
||||
DB::Aowow()->query('REPLACE INTO ?_profiler_excludes (?#) VALUES (?a)', array_keys($ex), array_values($ex));
|
||||
if ($i >= 500)
|
||||
{
|
||||
$i = 0;
|
||||
CLI::write(' * '.$n.' / '.$s.' ('.Lang::nf(100 * $n / $s, 1).'%)');
|
||||
}
|
||||
$i++;
|
||||
$n++;
|
||||
}
|
||||
|
||||
// excludes; type => [excludeGroupBit => [typeIds]]
|
||||
$excludes = [];
|
||||
|
||||
Reference in New Issue
Block a user