From 74c4fc061a5d0af9ba42639dc36db9a4c81e89d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emre=20=C3=87al=C4=B1=C5=9Fkan?= Date: Mon, 1 Jan 2024 23:24:45 +0300 Subject: [PATCH] Added benchmark operation --- app/Console/Commands/BenchmarkCommand.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/Console/Commands/BenchmarkCommand.php b/app/Console/Commands/BenchmarkCommand.php index 7d498da..6900671 100644 --- a/app/Console/Commands/BenchmarkCommand.php +++ b/app/Console/Commands/BenchmarkCommand.php @@ -32,8 +32,6 @@ public function handle() { foreach (ServerEnum::cases() as $serverEnum) { foreach (EndpointEnum::cases() as $endpointEnum) { - $this->info($serverEnum->getBenchmarkCommand($endpointEnum)); - $process = Process::start($serverEnum->getBenchmarkCommand($endpointEnum)); $statistics = []; @@ -106,7 +104,7 @@ public function generateTables(): void $this->generateMemoryUsageTable(); } - public function generateRequestPerSecondTable() + public function generateRequestPerSecondTable(): void { $data = [['Server']]; @@ -124,7 +122,7 @@ public function generateRequestPerSecondTable() $this->arrayToCsv('request-per-second', $data); } - public function generateRequestsTable() + public function generateRequestsTable(): void { $data = [['Server']]; @@ -142,7 +140,7 @@ public function generateRequestsTable() $this->arrayToCsv('requests', $data); } - public function generateTransferPerSecondTable() + public function generateTransferPerSecondTable(): void { $data = [['Server']]; @@ -160,7 +158,7 @@ public function generateTransferPerSecondTable() $this->arrayToCsv('transfer-per-second', $data); } - public function generateLatencyDistributionTable() + public function generateLatencyDistributionTable(): void { foreach (EndpointEnum::cases() as $endpointEnum) { $data = [['Server', '50%', '75%', '90%', '99%', '99.99%']]; @@ -175,7 +173,7 @@ public function generateLatencyDistributionTable() } } - public function generateCpuUsageTable() + public function generateCpuUsageTable(): void { foreach (EndpointEnum::cases() as $endpointEnum) { $data = [[ @@ -197,7 +195,7 @@ public function generateCpuUsageTable() } } - public function generateMemoryUsageTable() + public function generateMemoryUsageTable(): void { foreach (EndpointEnum::cases() as $endpointEnum) { $data = [[