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

@@ -6,14 +6,13 @@ namespace Tests\Framework\Queue\Performance;
use App\Framework\Queue\Jobs\Job;
use App\Framework\Queue\Jobs\JobRequest;
use App\Framework\Queue\Jobs\JobResult;
use App\Framework\Queue\Jobs\JobStatus;
use App\Framework\Queue\Queue\JobPriority;
use App\Framework\Queue\Queue\QueueName;
use App\Framework\Queue\Workers\Worker;
use App\Framework\Queue\Workers\WorkerCapacity;
use App\Framework\Queue\Workers\WorkerId;
use App\Framework\Queue\Workers\WorkerStatus;
use App\Framework\Queue\Queue\QueueName;
use App\Framework\Queue\Queue\JobPriority;
final readonly class PerformanceTestHelper
{
@@ -61,6 +60,7 @@ final readonly class PerformanceTestHelper
payload: ['batch_id' => $i, 'data' => str_repeat('x', 100)]
);
}
return $jobs;
}
@@ -81,7 +81,7 @@ final readonly class PerformanceTestHelper
return [
'result' => $result,
'time_ms' => ($end - $start) * 1000
'time_ms' => ($end - $start) * 1000,
];
}
@@ -96,7 +96,7 @@ final readonly class PerformanceTestHelper
'median' => 0,
'p95' => 0,
'p99' => 0,
'stddev' => 0
'stddev' => 0,
];
}
@@ -132,7 +132,7 @@ final readonly class PerformanceTestHelper
'median' => round($median, 3),
'p95' => round($p95, 3),
'p99' => round($p99, 3),
'stddev' => round($stddev, 3)
'stddev' => round($stddev, 3),
];
}
@@ -141,12 +141,18 @@ final readonly class PerformanceTestHelper
return sprintf(
"Count: %d, Min: %.3f%s, Max: %.3f%s, Avg: %.3f%s, P95: %.3f%s, P99: %.3f%s, StdDev: %.3f%s",
$stats['count'],
$stats['min'], $unit,
$stats['max'], $unit,
$stats['avg'], $unit,
$stats['p95'], $unit,
$stats['p99'], $unit,
$stats['stddev'], $unit
$stats['min'],
$unit,
$stats['max'],
$unit,
$stats['avg'],
$unit,
$stats['p95'],
$unit,
$stats['p99'],
$unit,
$stats['stddev'],
$unit
);
}
@@ -187,7 +193,7 @@ final readonly class PerformanceTestHelper
'current_mb' => round(memory_get_usage(true) / 1024 / 1024, 2),
'peak_mb' => round(memory_get_peak_usage(true) / 1024 / 1024, 2),
'current_real_mb' => round(memory_get_usage(false) / 1024 / 1024, 2),
'peak_real_mb' => round(memory_get_peak_usage(false) / 1024 / 1024, 2)
'peak_real_mb' => round(memory_get_peak_usage(false) / 1024 / 1024, 2),
];
}
@@ -204,7 +210,7 @@ final readonly class PerformanceTestHelper
$operations = [];
for ($i = 0; $i < $concurrency; $i++) {
$operations[] = function() use ($operation, $i) {
$operations[] = function () use ($operation, $i) {
return $operation($i);
};
}
@@ -233,7 +239,7 @@ final readonly class PerformanceTestHelper
// Execute concurrent operations
for ($i = 0; $i < $batchSize; $i++) {
$result = self::measureTimeWithResult(function() use ($operation, $batch, $i) {
$result = self::measureTimeWithResult(function () use ($operation, $batch, $i) {
return $operation($batch * $concurrency + $i);
});
$batchResults[] = $result;
@@ -253,7 +259,7 @@ final readonly class PerformanceTestHelper
'results' => $results,
'operations_completed' => $operationsCompleted,
'duration_seconds' => microtime(true) - $startTime,
'throughput_ops_per_sec' => $operationsCompleted / (microtime(true) - $startTime)
'throughput_ops_per_sec' => $operationsCompleted / (microtime(true) - $startTime),
];
}
@@ -292,4 +298,4 @@ final readonly class PerformanceTestHelper
return $report;
}
}
}