From 02f7b4f65dc1f9859d69196272471c094d4cd779 Mon Sep 17 00:00:00 2001 From: Mathieu Carbou Date: Tue, 12 Nov 2024 01:46:16 +0100 Subject: [PATCH] update doc --- README.md | 40 +++++++++++++++++++++++++++++++++++++--- docs/index.md | 40 +++++++++++++++++++++++++++++++++++++--- 2 files changed, 74 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6cf43af..65dc478 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,9 @@ This fork is based on [yubox-node-org/ESPAsyncWebServer](https://github.com/yubo - (perf) Lot of code cleanup and optimizations - (perf) Performance improvements in terms of memory, speed and size ------ -WARNING: Important notes about future version 4.x ------ +--- + +## WARNING: Important notes about future version 4.x This ESPAsyncWebServer fork is now at version 3.x. @@ -124,6 +124,40 @@ With `https://github.com/mathieucarbou/AsyncTCPSock/archive/refs/tags/v1.0.3-dev [![](https://mathieu.carbou.me/ESPAsyncWebServer/perf-c10-asynctcpsock.png)](https://mathieu.carbou.me/ESPAsyncWebServer/perf-c10-asynctcpsock.png) +**SSE performance** + +In the example, there is an endpoint `/events` with some comments showing how these metrics are calculated. + +Test is running for 20 seconds with 10 connections. + +``` +// With AsyncTCP, with 10 workers: no message discarded from the queue +// +// Total: 1875 events, 468.75000000000000000000 events / second +// Total: 1870 events, 467.50000000000000000000 events / second +// Total: 1871 events, 467.75000000000000000000 events / second +// Total: 1875 events, 468.75000000000000000000 events / second +// Total: 1871 events, 467.75000000000000000000 events / second +// Total: 1805 events, 451.25000000000000000000 events / second +// Total: 1803 events, 450.75000000000000000000 events / second +// Total: 1873 events, 468.25000000000000000000 events / second +// Total: 1872 events, 468.00000000000000000000 events / second +// Total: 1805 events, 451.25000000000000000000 events / second +// +// With AsyncTCPSock, with 10 workers: no message discarded from the queue +// +// Total: 1242 events, 310.50000000000000000000 events / second +// Total: 1242 events, 310.50000000000000000000 events / second +// Total: 1242 events, 310.50000000000000000000 events / second +// Total: 1242 events, 310.50000000000000000000 events / second +// Total: 1181 events, 295.25000000000000000000 events / second +// Total: 1182 events, 295.50000000000000000000 events / second +// Total: 1240 events, 310.00000000000000000000 events / second +// Total: 1181 events, 295.25000000000000000000 events / second +// Total: 1181 events, 295.25000000000000000000 events / second +// Total: 1183 events, 295.75000000000000000000 events / second +``` + ## Important recommendations Most of the crashes are caused by improper configuration of the library for the project. diff --git a/docs/index.md b/docs/index.md index 6cf43af..65dc478 100644 --- a/docs/index.md +++ b/docs/index.md @@ -52,9 +52,9 @@ This fork is based on [yubox-node-org/ESPAsyncWebServer](https://github.com/yubo - (perf) Lot of code cleanup and optimizations - (perf) Performance improvements in terms of memory, speed and size ------ -WARNING: Important notes about future version 4.x ------ +--- + +## WARNING: Important notes about future version 4.x This ESPAsyncWebServer fork is now at version 3.x. @@ -124,6 +124,40 @@ With `https://github.com/mathieucarbou/AsyncTCPSock/archive/refs/tags/v1.0.3-dev [![](https://mathieu.carbou.me/ESPAsyncWebServer/perf-c10-asynctcpsock.png)](https://mathieu.carbou.me/ESPAsyncWebServer/perf-c10-asynctcpsock.png) +**SSE performance** + +In the example, there is an endpoint `/events` with some comments showing how these metrics are calculated. + +Test is running for 20 seconds with 10 connections. + +``` +// With AsyncTCP, with 10 workers: no message discarded from the queue +// +// Total: 1875 events, 468.75000000000000000000 events / second +// Total: 1870 events, 467.50000000000000000000 events / second +// Total: 1871 events, 467.75000000000000000000 events / second +// Total: 1875 events, 468.75000000000000000000 events / second +// Total: 1871 events, 467.75000000000000000000 events / second +// Total: 1805 events, 451.25000000000000000000 events / second +// Total: 1803 events, 450.75000000000000000000 events / second +// Total: 1873 events, 468.25000000000000000000 events / second +// Total: 1872 events, 468.00000000000000000000 events / second +// Total: 1805 events, 451.25000000000000000000 events / second +// +// With AsyncTCPSock, with 10 workers: no message discarded from the queue +// +// Total: 1242 events, 310.50000000000000000000 events / second +// Total: 1242 events, 310.50000000000000000000 events / second +// Total: 1242 events, 310.50000000000000000000 events / second +// Total: 1242 events, 310.50000000000000000000 events / second +// Total: 1181 events, 295.25000000000000000000 events / second +// Total: 1182 events, 295.50000000000000000000 events / second +// Total: 1240 events, 310.00000000000000000000 events / second +// Total: 1181 events, 295.25000000000000000000 events / second +// Total: 1181 events, 295.25000000000000000000 events / second +// Total: 1183 events, 295.75000000000000000000 events / second +``` + ## Important recommendations Most of the crashes are caused by improper configuration of the library for the project.