public function PerformanceTestRecorder::getCount in Drupal 10
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Test/PerformanceTestRecorder.php \Drupal\Core\Test\PerformanceTestRecorder::getCount()
File
- core/
lib/ Drupal/ Core/ Test/ PerformanceTestRecorder.php, line 45
Class
- PerformanceTestRecorder
- Records the number of times specific events occur.
Namespace
Drupal\Core\TestCode
public function getCount(string $type, string $name) : int {
$count = 0;
if ($this->state) {
$record = $this->state
->get('drupal.performance_test_recorder', []);
$count += $record[$type][$name] ?? 0;
}
$count += self::$record[$type][$name] ?? 0;
return $count;
}