Skip to content

Commit

Permalink
Added benchmark result
Browse files Browse the repository at this point in the history
  • Loading branch information
thecaliskan committed Jan 3, 2024
1 parent f89471c commit 6501130
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 8 deletions.
4 changes: 3 additions & 1 deletion app/Console/Commands/BenchmarkCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ public function generateCpuUsageTable(): void
$serverEnum->getTitle(),
...$this->getStatisticsData($serverEnum, $endpointEnum)
->pluck('CPUPerc')
->slice(0, $endpointEnum->getBenchmarkDuration())
->map(fn ($percentage) => str_replace('%', '', $percentage)),
];
}
Expand All @@ -213,7 +214,8 @@ public function generateMemoryUsageTable(): void
$serverEnum->getTitle(),
...$this->getStatisticsData($serverEnum, $endpointEnum)
->pluck('MemUsage')
->map(fn ($usage) => explode('MiB', $usage)[0]),
->slice(0, $endpointEnum->getBenchmarkDuration())
->map(fn ($usage) => str($usage)->contains('GiB /') ? explode('GiB', $usage)[0] * 1024 : explode('MiB', $usage)[0]),
];
}
$this->arrayToCsv('memory-usage-'.$endpointEnum->getKebabCase(), $data);
Expand Down
2 changes: 1 addition & 1 deletion app/Services/HttpService.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
class HttpService
{
private CurlHandle $curlHandle;

public function __construct()
{
$this->curlHandle = curl_init();
Expand All @@ -19,5 +20,4 @@ public function get(string $url): string

return curl_exec($this->curlHandle);
}

}
1 change: 0 additions & 1 deletion routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

use App\Services\HttpService;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Response;
use Illuminate\Support\Facades\Route;

Expand Down
2 changes: 1 addition & 1 deletion storage/table/cpu-usage-http-request.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Server,00:01,00:02,00:03,00:04,00:05,00:06,00:07,00:08,00:09,00:10,00:11,00:12,00:13,00:14,00:15,00:16,00:17,00:18,00:19,00:20,00:21,00:22,00:23,00:24,00:25,00:26,00:27,00:28,00:29,00:30
OpenSwoole,936.66,883.73,965.26,867.35,926.42,900.80,915.31,921.78,890.32,946.94,893.52,942.62,896.19,932.42,915.54,905.99,909.59,907.35,925.09,907.53,924.72,907.09,926.33,916.78,897.35,927.93,889.23,933.58,734.96,0.21
Swoole,914.07,922.83,917.29,921.41,941.28,868.66,953.94,902.28,941.12,912.67,931.92,907.55,931.01,943.13,915.76,929.01,920.33,903.22,938.19,901.02,939.49,914.55,926.60,919.81,948.60,902.36,939.65,907.30,945.93,74.39,0.21
Swoole,914.07,922.83,917.29,921.41,941.28,868.66,953.94,902.28,941.12,912.67,931.92,907.55,931.01,943.13,915.76,929.01,920.33,903.22,938.19,901.02,939.49,914.55,926.60,919.81,948.60,902.36,939.65,907.30,945.93,74.39
RoadRunner,1024.89,930.86,1035.39,939.94,1031.25,955.60,1008.65,1022.63,930.52,1033.73,948.72,1019.24,1022.22,925.23,1034.47,945.39,1032.06,1008.87,950.39,1036.15,942.46,1040.97,991.65,967.89,1027.98,932.41,1033.21,982.15,903.04,0.47
FrankenPHP,903.18,900.77,898.70,903.75,894.39,910.23,898.19,914.66,911.25,878.60,892.06,939.38,875.46,885.39,949.77,870.71,886.56,875.83,974.13,865.37,879.58,887.52,900.37,1001.77,869.94,886.76,886.59,885.02,892.61,232.04
2 changes: 1 addition & 1 deletion storage/table/memory-usage-health-check.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ Server,00:01,00:02,00:03,00:04,00:05,00:06,00:07,00:08,00:09,00:10,00:11,00:12,0
OpenSwoole,560.9,565.6,554.9,563.8,573.9,557.4,568.7,590.3,588.6,571.4,571.4,590,590,569.9,591.2,586.6,589.7,580.2,581,580.9,558.5,590.7,579.9,591.4,589,576,586.8,581.7,587.4,587.4
Swoole,607.1,603.9,616.7,585.7,604.3,599.5,591.1,604.1,589.4,600.1,597.6,610.6,606.4,598.9,605,596,610.1,599.1,613.9,598.2,617,613.4,612.6,616.8,616.5,593.4,597.8,604.9,591.4,613.4
RoadRunner,423.9,407.4,417.3,427.7,418.9,424.3,417.1,418,413.1,407.3,417.9,427.6,427.5,442.1,435.5,434.8,454,452.7,454.9,456.4,443.6,430.4,440.7,455.1,431.4,450.3,454.6,432.6,451,450.7
FrankenPHP,268,377.4,448.3,527.6,632.2,764,777.6,932.6,946.2,"1.119GiB / 30.61GiB","1.14GiB / 30.61GiB","1.215GiB / 30.61GiB","1.391GiB / 30.61GiB","1.391GiB / 30.61GiB","1.413GiB / 30.61GiB","1.621GiB / 30.61GiB","1.693GiB / 30.61GiB","1.706GiB / 30.61GiB","1.707GiB / 30.61GiB","1.895GiB / 30.61GiB","2.068GiB / 30.61GiB","2.099GiB / 30.61GiB","2.099GiB / 30.61GiB","2.1GiB / 30.61GiB","2.265GiB / 30.61GiB","2.468GiB / 30.61GiB","2.614GiB / 30.61GiB","2.643GiB / 30.61GiB","2.644GiB / 30.61GiB","2.643GiB / 30.61GiB"
FrankenPHP,268,377.4,448.3,527.6,632.2,764,777.6,932.6,946.2,1145.856,1167.36,1244.16,1424.384,1424.384,1446.912,1659.904,1733.632,1746.944,1747.968,1940.48,2117.632,2149.376,2149.376,2150.4,2319.36,2527.232,2676.736,2706.432,2707.456,2706.432
4 changes: 2 additions & 2 deletions storage/table/memory-usage-http-request.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Server,00:01,00:02,00:03,00:04,00:05,00:06,00:07,00:08,00:09,00:10,00:11,00:12,00:13,00:14,00:15,00:16,00:17,00:18,00:19,00:20,00:21,00:22,00:23,00:24,00:25,00:26,00:27,00:28,00:29,00:30
OpenSwoole,580.9,589.6,590.4,581.8,590.9,580.5,589.7,586.4,590.6,589.8,590.3,588.5,583.2,590.9,582.2,588.4,589.7,590.2,575.5,571.9,586.5,588.7,587.9,574.7,590.7,580.5,589.1,587.7,588.7,588.6
Swoole,606.9,615.5,577.3,615.6,616.1,615.2,612.5,603.2,612.2,610.1,616.1,595.4,591.1,616.2,603.3,615.9,607.3,616.1,589.4,614.2,609.8,594.6,616.7,616.2,615.9,607.3,615.5,616,604,613.8,613.8
Swoole,606.9,615.5,577.3,615.6,616.1,615.2,612.5,603.2,612.2,610.1,616.1,595.4,591.1,616.2,603.3,615.9,607.3,616.1,589.4,614.2,609.8,594.6,616.7,616.2,615.9,607.3,615.5,616,604,613.8
RoadRunner,456.8,458.7,460.2,459.1,459.8,328.4,459.4,461.4,459,462.5,412.5,462.3,450.9,462.3,463,421.9,463.8,406.2,462.1,463,450,462.6,378.7,469.1,469.3,456.8,470,441.2,474.7,474.7
FrankenPHP,212.2,248.7,281.1,332,373.2,434.4,503.9,515.2,610.9,615.9,693.6,748.4,748.5,840.1,912.8,915.5,937.2,"1.037GiB / 30.61GiB","1.085GiB / 30.61GiB","1.093GiB / 30.61GiB","1.092GiB / 30.61GiB","1.179GiB / 30.61GiB","1.298GiB / 30.61GiB","1.339GiB / 30.61GiB","1.339GiB / 30.61GiB","1.34GiB / 30.61GiB","1.352GiB / 30.61GiB","1.463GiB / 30.61GiB","1.586GiB / 30.61GiB","1.616GiB / 30.61GiB"
FrankenPHP,212.2,248.7,281.1,332,373.2,434.4,503.9,515.2,610.9,615.9,693.6,748.4,748.5,840.1,912.8,915.5,937.2,1061.888,1111.04,1119.232,1118.208,1207.296,1329.152,1371.136,1371.136,1372.16,1384.448,1498.112,1624.064,1654.784
2 changes: 1 addition & 1 deletion storage/table/memory-usage-static.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ Server,00:01,00:02,00:03,00:04,00:05,00:06,00:07,00:08,00:09,00:10,00:11,00:12,0
OpenSwoole,579.5,561.3,569.5,590.7,591.3,573.5,564.8,585.9,574,570,576.3,571.6,549,547.2,578.4,575.3,577.8,580.5,580.7,581.1,591,569.7,583,588.2,590.7,591.4,579.3,546.4,579.8,587.6
Swoole,581.6,607.3,612.1,609.7,606.4,583,615.6,585.2,603.8,615.9,598.7,586.3,604.3,616.9,616.3,587,572.7,604.2,605,606.1,605.3,616.2,611.9,595.6,587.9,600.2,616,585.8,611.2,613.4
RoadRunner,458.8,459,459.3,458.8,459,459.1,446.6,427.1,403.3,386.6,379.7,459.1,455.9,460.8,452.2,484.5,466.6,466.6,481.6,482.1,484.9,481.5,465.6,446.8,424,413.1,410.5,454.4,493.6,493.6
FrankenPHP,262.2,358.4,423.8,516.4,602.4,728.2,791.3,896.6,946,"1.047GiB / 30.61GiB","1.053GiB / 30.61GiB","1.234GiB / 30.61GiB","1.269GiB / 30.61GiB","1.275GiB / 30.61GiB","1.475GiB / 30.61GiB","1.549GiB / 30.61GiB","1.55GiB / 30.61GiB","1.621GiB / 30.61GiB","1.832GiB / 30.61GiB","1.882GiB / 30.61GiB","1.882GiB / 30.61GiB","1.894GiB / 30.61GiB","2.091GiB / 30.61GiB","2.304GiB / 30.61GiB","2.429GiB / 30.61GiB","2.43GiB / 30.61GiB","2.429GiB / 30.61GiB","2.429GiB / 30.61GiB","2.559GiB / 30.61GiB","2.564GiB / 30.61GiB"
FrankenPHP,262.2,358.4,423.8,516.4,602.4,728.2,791.3,896.6,946,1072.128,1078.272,1263.616,1299.456,1305.6,1510.4,1586.176,1587.2,1659.904,1875.968,1927.168,1927.168,1939.456,2141.184,2359.296,2487.296,2488.32,2487.296,2487.296,2620.416,2625.536

0 comments on commit 6501130

Please sign in to comment.