diff --git a/benchmarks/csharp/Program.cs b/benchmarks/csharp/Program.cs index 31e2f7784..754274f6f 100644 --- a/benchmarks/csharp/Program.cs +++ b/benchmarks/csharp/Program.cs @@ -350,7 +350,7 @@ await run_clients( private static int number_of_iterations(int num_of_concurrent_tasks) { - return Math.Max(1, num_of_concurrent_tasks * 1); + return Math.min(Math.Max(100000, num_of_concurrent_tasks * 10000), 10000000); } public static async Task Main(string[] args) diff --git a/benchmarks/python/python_benchmark.py b/benchmarks/python/python_benchmark.py index 72173bae4..3b4747a37 100644 --- a/benchmarks/python/python_benchmark.py +++ b/benchmarks/python/python_benchmark.py @@ -7,15 +7,16 @@ from datetime import datetime from enum import Enum from statistics import mean + import numpy as np import redis.asyncio as redispy from pybushka import ( + AddressInfo, ClientConfiguration, + LogLevel, RedisAsyncFFIClient, RedisAsyncSocketClient, - LogLevel, set_logger_config, - AddressInfo ) @@ -257,7 +258,9 @@ async def main( or clients_to_run == "babushka" ): # Babushka FFI - config = ClientConfiguration([AddressInfo(host=host, port=PORT)], use_tls=use_tls) + config = ClientConfiguration( + [AddressInfo(host=host, port=PORT)], use_tls=use_tls + ) clients = await create_clients( client_count, lambda: RedisAsyncFFIClient.create(config), @@ -277,7 +280,9 @@ async def main( or clients_to_run == "babushka" ): # Babushka Socket - config = ClientConfiguration([AddressInfo(host=host, port=PORT)], use_tls=use_tls) + config = ClientConfiguration( + [AddressInfo(host=host, port=PORT)], use_tls=use_tls + ) clients = await create_clients( client_count, lambda: RedisAsyncSocketClient.create(config), @@ -293,7 +298,7 @@ async def main( def number_of_iterations(num_of_concurrent_tasks): - return max(100000, num_of_concurrent_tasks * 10000) + return min(max(100000, num_of_concurrent_tasks * 10000), 10000000) if __name__ == "__main__":