Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileSession: set greater gc probability #585

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
bar: errors panel => warnings
  • Loading branch information
dg committed Aug 7, 2024
commit ad521b6503877cc6dc657d5bce6894879f7a6866
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if (empty($data)) {
}
?>
<style class="tracy-debug">
#tracy-debug .tracy-ErrorTab {
#tracy-debug .tracy-WarningsTab {
display: block;
background: #D51616;
color: white;
Expand All @@ -19,7 +19,7 @@ if (empty($data)) {
padding: 1px .4em;
}
</style>
<span class="tracy-ErrorTab">
<span class="tracy-WarningsTab">
<svg viewBox="0 0 2048 2048"><path fill="#fff" d="M1152 1503v-190q0-14-9.5-23.5t-22.5-9.5h-192q-13 0-22.5 9.5t-9.5 23.5v190q0 14 9.5 23.5t22.5 9.5h192q13 0 22.5-9.5t9.5-23.5zm-2-374l18-459q0-12-10-19-13-11-24-11h-220q-11 0-24 11-10 7-10 21l17 457q0 10 10 16.5t24 6.5h185q14 0 23.5-6.5t10.5-16.5zm-14-934l768 1408q35 63-2 126-17 29-46.5 46t-63.5 17h-1536q-34 0-63.5-17t-46.5-46q-37-63-2-126l768-1408q17-31 47-49t65-18 65 18 47 49z"/>
</svg><span class="tracy-label"><?= $sum = array_sum($data), $sum > 1 ? ' warnings' : ' warning' ?></span>
</span>
2 changes: 1 addition & 1 deletion src/Tracy/Debugger/Debugger.php
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ public static function getBar(): Bar
self::$bar = new Bar;
self::$bar->addPanel($info = new DefaultBarPanel('info'), 'Tracy:info');
$info->cpuUsage = self::$cpuUsage;
self::$bar->addPanel(new DefaultBarPanel('errors'), 'Tracy:errors'); // filled by errorHandler()
self::$bar->addPanel(new DefaultBarPanel('warnings'), 'Tracy:warnings'); // filled by errorHandler()
}

return self::$bar;
Expand Down
2 changes: 1 addition & 1 deletion src/Tracy/Debugger/DevelopmentStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function handleError(
}

$message = Helpers::errorTypeToString($severity) . ': ' . Helpers::improveError($message);
$count = &$this->bar->getPanel('Tracy:errors')->data["$file|$line|$message"];
$count = &$this->bar->getPanel('Tracy:warnings')->data["$file|$line|$message"];

if (!$count++ && !Helpers::isHtmlMode() && !Helpers::isAjax()) {
echo "\n$message in $file on line $line\n";
Expand Down