diff --git a/opentelemetry-sdk/benchmarks/logs/test_benchmark_logs.py b/opentelemetry-sdk/benchmarks/logs/test_benchmark_logs.py index 197e053eaf..aef0f1655a 100644 --- a/opentelemetry-sdk/benchmarks/logs/test_benchmark_logs.py +++ b/opentelemetry-sdk/benchmarks/logs/test_benchmark_logs.py @@ -9,7 +9,7 @@ ) -def set_up_logging_handler(level): +def _set_up_logging_handler(level): logger_provider = LoggerProvider() exporter = InMemoryLogExporter() processor = SimpleLogRecordProcessor(exporter=exporter) @@ -18,21 +18,21 @@ def set_up_logging_handler(level): return handler -def create_logger(handler, name): +def _create_logger(handler, name): logger = logging.getLogger(name) logger.addHandler(handler) return logger -@pytest.mark.parametrize("num_loggers", [1, 10, 100, 1000, 10000]) +@pytest.mark.parametrize("num_loggers", [1, 10, 100, 1000]) def test_simple_get_logger_different_names(benchmark, num_loggers): - handler = set_up_logging_handler(level=logging.DEBUG) + handler = _set_up_logging_handler(level=logging.DEBUG) loggers = [ - create_logger(handler, str(f"logger_{i}")) for i in range(num_loggers) + _create_logger(handler, str(f"logger_{i}")) for i in range(num_loggers) ] def benchmark_get_logger(): - for i in range(10000): + for i in range(1000): loggers[i % num_loggers].warning("test message") benchmark(benchmark_get_logger)