chore: initial import for test contour

This commit is contained in:
sova-bootstrap
2026-05-27 19:36:32 +03:00
commit 166cdb148e
282 changed files with 84872 additions and 0 deletions
@@ -0,0 +1,36 @@
<?php
namespace App\Service\Performance;
class PerformanceTrackerService
{
private ?float $startTime = null;
private ?float $endTime = null;
public function start(): void
{
$this->startTime = microtime(true);
$this->endTime = null;
}
public function stop(): void
{
$this->endTime = microtime(true);
}
public function getDurationMs(): int
{
if (!$this->startTime) {
return 0;
}
$endTime = $this->endTime ?? microtime(true);
return (int)round(($endTime - $this->startTime) * 1000);
}
public function reset(): void
{
$this->startTime = null;
$this->endTime = null;
}
}