Skip to content

Commit

Permalink
changed number default + infection coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
CamillH committed Feb 9, 2024
1 parent 1e8e6f9 commit eb61d15
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Classes/Service/ConfigService.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ final class ConfigService
/**
* @var int
*/
private const DEFAULT_NUMBER_TIMINGS = 70;
private const DEFAULT_NUMBER_TIMINGS = 30;

public function stopWatchLimit(): int
{
Expand Down
3 changes: 2 additions & 1 deletion Classes/Utility/TimingUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,10 @@ public function shutdown(ScriptResult $result): ?ResponseInterface

rsort($durations);

Check warning on line 148 in Classes/Utility/TimingUtility.php

View check run for this annotation

Codecov / codecov/patch

Classes/Utility/TimingUtility.php#L148

Added line #L148 was not covered by tests

$maxNumberOfTimings = $durations[$this->configService->getMaxNumberOfTimings() - 1] ?? 0;
foreach ($stopWatches as $index => $time) {
$duration = $time->getDuration();
if ($duration >= ($durations[$this->configService->getMaxNumberOfTimings() - 1] ?? 0)) {
if ($duration >= $maxNumberOfTimings) {
$timings[] = $this->timingString($index, trim($time->key . ' ' . $time->info . ' ' . $duration), $duration);

Check warning on line 154 in Classes/Utility/TimingUtility.php

View check run for this annotation

Codecov / codecov/patch

Classes/Utility/TimingUtility.php#L150-L154

Added lines #L150 - L154 were not covered by tests
}
}
Expand Down
2 changes: 1 addition & 1 deletion ext_conf_template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sentry_sample_rate =
sentry_cli_sample_rate =

# cat=sentry; type=integer; label=Number of timings (reduce to make header output smaller. Try out when you get regularly 502 responses).
number_of_timings = 70
number_of_timings = 30

# cat=sentry; type=integer; label=Length of description (reduce to make header output smaller. Try out when you get regularly 502 responses).
length_of_description = 100
2 changes: 1 addition & 1 deletion infection.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"text": "Resources/Public/test-result/infection.log",
"html": "Resources/Public/test-result/infection.html"
},
"minCoveredMsi": 98,
"minCoveredMsi": 95,
"initialTestsPhpOptions": "-d pcov.enabled=1",
"mutators": {
"@default": true
Expand Down

0 comments on commit eb61d15

Please sign in to comment.