Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions benchmarks/bench_credential_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def bench_no_cache(n: int) -> list[float]:
times = []
for _ in range(n):
start = time.perf_counter()
cred = DefaultAzureCredential()
cred = DefaultAzureCredential() # CodeQL [SM05139] Development-only microbenchmark, not product code; intentionally uses DefaultAzureCredential to measure credential instance caching overhead.
Comment thread
gargsaumya marked this conversation as resolved.
cred.get_token("https://database.windows.net/.default")
times.append(time.perf_counter() - start)
return times
Expand All @@ -36,7 +36,7 @@ def bench_with_cache(n: int) -> list[float]:
"""Simulate the NEW behavior: reuse a single credential instance."""
from azure.identity import DefaultAzureCredential

cred = DefaultAzureCredential()
cred = DefaultAzureCredential() # CodeQL [SM05139] Development-only microbenchmark, not product code; intentionally uses DefaultAzureCredential to measure credential instance caching overhead.
Comment thread
gargsaumya marked this conversation as resolved.
times = []
for _ in range(n):
start = time.perf_counter()
Expand Down
Loading