Skip to content

Commit 4aca0cc

Browse files
Fix perf tests on Python 3.14 + Storage change (#44230)
1 parent 2470205 commit 4aca0cc

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

eng/tools/azure-sdk-tools/devtools_testutils/perfstress_tests/__init__.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,16 @@
2727

2828
def run_perfstress_cmd():
2929
main_loop = _PerfStressRunner()
30-
loop = asyncio.get_event_loop()
31-
loop.run_until_complete(main_loop.start())
30+
asyncio.run(main_loop.start())
3231

3332

3433
def run_perfstress_debug_cmd():
3534
main_loop = _PerfStressRunner(debug=True)
36-
loop = asyncio.get_event_loop()
37-
loop.run_until_complete(main_loop.start())
35+
asyncio.run(main_loop.start())
3836

3937

4038
def run_system_perfstress_tests_cmd():
4139
root_dir = os.path.dirname(os.path.abspath(__file__))
4240
sys_test_dir = os.path.join(root_dir, "system_perfstress")
4341
main_loop = _PerfStressRunner(test_folder_path=sys_test_dir, debug=True)
44-
loop = asyncio.get_event_loop()
45-
loop.run_until_complete(main_loop.start())
42+
asyncio.run(main_loop.start())

sdk/storage/azure-storage-blob/tests/perfstress_tests/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ The options are available for all Blob perf tests:
6565
- `--max-block-size` Maximum size of data in a block within a blob.
6666
- `--max-get-size` Initial chunk size of a Blob download.
6767
- `--buffer-threshold` Minimum block size to prevent full block buffering.
68+
- `--data-block-size` The chunk size used when reading from the network stream.
6869
- `--client-encryption` The version of client-side encryption to use. Leave out for no encryption.
6970

7071
#### List Blobs command line options

sdk/storage/azure-storage-blob/tests/perfstress_tests/_test_base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ def __init__(self, arguments):
3333
self._client_kwargs['max_single_get_size'] = self.args.max_get_size
3434
if self.args.buffer_threshold is not None:
3535
self._client_kwargs['min_large_block_upload_threshold'] = self.args.buffer_threshold
36+
if self.args.data_block_size is not None:
37+
self._client_kwargs['connection_data_block_size'] = self.args.data_block_size
3638
if self.args.client_encryption:
3739
self.key_encryption_key = KeyWrapper()
3840
self._client_kwargs['require_encryption'] = True
@@ -69,6 +71,7 @@ def add_arguments(parser):
6971
parser.add_argument('--max-block-size', nargs='?', type=int, help='Maximum size of data in a block within a blob. Defaults to SDK default.', default=None)
7072
parser.add_argument('--max-get-size', nargs='?', type=int, help='Initial chunk size of a Blob download. Defaults to SDK default.', default=None)
7173
parser.add_argument('--buffer-threshold', nargs='?', type=int, help='Minimum block size to prevent full block buffering. Defaults to SDK default.', default=None)
74+
parser.add_argument('--data-block-size', nargs='?', type=int, help='The chunk size used when reading from the network stream. Defaults to SDK default.', default=None)
7275
parser.add_argument('--client-encryption', nargs='?', type=str, help='The version of client-side encryption to use. Leave out for no encryption.', default=None)
7376
parser.add_argument('--max-concurrency', nargs='?', type=int, help='Maximum number of concurrent threads used for data transfer. Defaults to 1', default=1)
7477
parser.add_argument('-s', '--size', nargs='?', type=int, help='Size of data to transfer. Default is 10240.', default=10240)

0 commit comments

Comments
 (0)