Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
black
  • Loading branch information
swathipil committed Feb 23, 2024
commit a448e4419e21c3031ff53214517b4c7ca5f436e5
25 changes: 14 additions & 11 deletions sdk/core/corehttp/tests/perf_tests/_test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
HeadersPolicy,
ProxyPolicy,
NetworkTraceLoggingPolicy,
# HttpLoggingPolicy,
# HttpLoggingPolicy,
RetryPolicy,
# CustomHookPolicy,
# RedirectPolicy,
# CustomHookPolicy,
# RedirectPolicy,
AsyncRetryPolicy,
# AsyncRedirectPolicy,
# AsyncRedirectPolicy,
BearerTokenCredentialPolicy,
AsyncBearerTokenCredentialPolicy,
)
Expand All @@ -46,6 +46,7 @@

_LETTERS = string.ascii_letters


class _ServiceTest(PerfStressTest):
transport = None
async_transport = None
Expand All @@ -72,7 +73,9 @@ def __init__(self, arguments):
try:
self.sync_transport = sync_transport_types[self.args.transport]
except KeyError:
raise ValueError(f"Invalid sync transport:{self.args.transport}\n Valid options are:\n- requests\n- httpx\n")
raise ValueError(
f"Invalid sync transport:{self.args.transport}\n Valid options are:\n- requests\n- httpx\n"
)
# if async, override async default
else:
try:
Expand All @@ -96,9 +99,9 @@ def _build_sync_pipeline_client(self, auth_policy):
ProxyPolicy,
NetworkTraceLoggingPolicy,
RetryPolicy,
#HttpLoggingPolicy,
#CustomHookPolicy,
#RedirectPolicy,
# HttpLoggingPolicy,
# CustomHookPolicy,
# RedirectPolicy,
]

if self.args.policies is None:
Expand Down Expand Up @@ -129,9 +132,9 @@ def _build_async_pipeline_client(self, auth_policy):
ProxyPolicy,
NetworkTraceLoggingPolicy,
AsyncRetryPolicy,
#HttpLoggingPolicy,
#CustomHookPolicy,
#AsyncRedirectPolicy,
# HttpLoggingPolicy,
# CustomHookPolicy,
# AsyncRedirectPolicy,
]
if self.args.policies is None:
# if None, only auth policy is passed in
Expand Down
3 changes: 2 additions & 1 deletion sdk/core/corehttp/tests/perf_tests/upload_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@

import logging
import sys

handler = logging.StreamHandler(stream=sys.stdout)
logger = logging.getLogger('corehttp')
logger = logging.getLogger("corehttp")
logger.setLevel(logging.DEBUG)
logger.addHandler(handler)

Expand Down