feat(Production): Complete production deployment infrastructure

- Add comprehensive health check system with multiple endpoints
- Add Prometheus metrics endpoint
- Add production logging configurations (5 strategies)
- Add complete deployment documentation suite:
  * QUICKSTART.md - 30-minute deployment guide
  * DEPLOYMENT_CHECKLIST.md - Printable verification checklist
  * DEPLOYMENT_WORKFLOW.md - Complete deployment lifecycle
  * PRODUCTION_DEPLOYMENT.md - Comprehensive technical reference
  * production-logging.md - Logging configuration guide
  * ANSIBLE_DEPLOYMENT.md - Infrastructure as Code automation
  * README.md - Navigation hub
  * DEPLOYMENT_SUMMARY.md - Executive summary
- Add deployment scripts and automation
- Add DEPLOYMENT_PLAN.md - Concrete plan for immediate deployment
- Update README with production-ready features

All production infrastructure is now complete and ready for deployment.
This commit is contained in:
2025-10-25 19:18:37 +02:00
parent caa85db796
commit fc3d7e6357
83016 changed files with 378904 additions and 20919 deletions

View File

@@ -0,0 +1,77 @@
<?php
declare(strict_types=1);
namespace App\Framework\Cache\Warming\ValueObjects;
/**
* Result of a cache warmup operation
*/
final readonly class WarmupResult
{
public function __construct(
public string $strategyName,
public int $itemsWarmed,
public int $itemsFailed,
public float $durationSeconds,
public int $memoryUsedBytes,
public array $errors = [],
public array $metadata = []
) {
if ($itemsWarmed < 0) {
throw new \InvalidArgumentException('Items warmed cannot be negative');
}
if ($itemsFailed < 0) {
throw new \InvalidArgumentException('Items failed cannot be negative');
}
if ($durationSeconds < 0.0) {
throw new \InvalidArgumentException('Duration cannot be negative');
}
if ($memoryUsedBytes < 0) {
throw new \InvalidArgumentException('Memory used cannot be negative');
}
}
public function isSuccess(): bool
{
return $this->itemsFailed === 0;
}
public function getSuccessRate(): float
{
$total = $this->itemsWarmed + $this->itemsFailed;
if ($total === 0) {
return 1.0;
}
return $this->itemsWarmed / $total;
}
public function getItemsPerSecond(): float
{
if ($this->durationSeconds === 0.0) {
return 0.0;
}
return $this->itemsWarmed / $this->durationSeconds;
}
public function getMemoryUsedMB(): float
{
return $this->memoryUsedBytes / 1024 / 1024;
}
public function toArray(): array
{
return [
'strategy_name' => $this->strategyName,
'items_warmed' => $this->itemsWarmed,
'items_failed' => $this->itemsFailed,
'duration_seconds' => round($this->durationSeconds, 3),
'memory_used_mb' => round($this->getMemoryUsedMB(), 2),
'success_rate' => round($this->getSuccessRate() * 100, 2),
'items_per_second' => round($this->getItemsPerSecond(), 2),
'is_success' => $this->isSuccess(),
'errors' => $this->errors,
'metadata' => $this->metadata
];
}
}