Skip to content

Commit

Permalink
Added benchmark operation
Browse files Browse the repository at this point in the history
  • Loading branch information
Emre Çalışkan committed Jan 1, 2024
1 parent 55885fb commit 74c4fc0
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions app/Console/Commands/BenchmarkCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down Expand Up @@ -106,7 +104,7 @@ public function generateTables(): void
$this->generateMemoryUsageTable();
}

public function generateRequestPerSecondTable()
public function generateRequestPerSecondTable(): void
{
$data = [['Server']];

Expand All @@ -124,7 +122,7 @@ public function generateRequestPerSecondTable()
$this->arrayToCsv('request-per-second', $data);
}

public function generateRequestsTable()
public function generateRequestsTable(): void
{
$data = [['Server']];

Expand All @@ -142,7 +140,7 @@ public function generateRequestsTable()
$this->arrayToCsv('requests', $data);
}

public function generateTransferPerSecondTable()
public function generateTransferPerSecondTable(): void
{
$data = [['Server']];

Expand All @@ -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%']];
Expand All @@ -175,7 +173,7 @@ public function generateLatencyDistributionTable()
}
}

public function generateCpuUsageTable()
public function generateCpuUsageTable(): void
{
foreach (EndpointEnum::cases() as $endpointEnum) {
$data = [[
Expand All @@ -197,7 +195,7 @@ public function generateCpuUsageTable()
}
}

public function generateMemoryUsageTable()
public function generateMemoryUsageTable(): void
{
foreach (EndpointEnum::cases() as $endpointEnum) {
$data = [[
Expand Down

0 comments on commit 74c4fc0

Please sign in to comment.