Skip to content

Commit

Permalink
Align iterations to match regardless of language.
Browse files Browse the repository at this point in the history
  • Loading branch information
shachlanAmazon committed May 23, 2023
1 parent 22baa17 commit ace631e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion benchmarks/csharp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
15 changes: 10 additions & 5 deletions benchmarks/python/python_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)


Expand Down Expand Up @@ -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),
Expand All @@ -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),
Expand All @@ -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__":
Expand Down

0 comments on commit ace631e

Please sign in to comment.