From 41e269d6e028003e24b03092daa4a28e9d7773c0 Mon Sep 17 00:00:00 2001 From: Kumar Aditya Date: Thu, 10 Aug 2023 07:55:25 +0000 Subject: [PATCH] minor fixes --- .../benchmarks/bm_asyncio_websockets/run_benchmark.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pyperformance/data-files/benchmarks/bm_asyncio_websockets/run_benchmark.py b/pyperformance/data-files/benchmarks/bm_asyncio_websockets/run_benchmark.py index 577ba813..1f167f6f 100644 --- a/pyperformance/data-files/benchmarks/bm_asyncio_websockets/run_benchmark.py +++ b/pyperformance/data-files/benchmarks/bm_asyncio_websockets/run_benchmark.py @@ -1,6 +1,8 @@ """ Benchmark for asyncio websocket server and client performance -transferring 10MB of data. +transferring 1MB of data. + +Author: Kumar Aditya """ import pyperf @@ -8,7 +10,7 @@ import websockets.client import asyncio -CHUNK_SIZE = 1024 +CHUNK_SIZE = 1024 ** 2 DATA = b"x" * CHUNK_SIZE stop: asyncio.Event @@ -16,8 +18,7 @@ async def handler(websocket) -> None: for _ in range(100): - data = await websocket.recv() - assert data == DATA + await websocket.recv() stop.set()