Skip to content

Commit

Permalink
align perf tests with js (#17069)
Browse files Browse the repository at this point in the history
  • Loading branch information
iscai-msft authored Mar 3, 2021
1 parent 0ab62f4 commit d18ddd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ These options are available for all perf tests:

## Example command
```cmd
(env) ~/azure-ai-textanalytics/tests/perfstress_tests> perfstress DetectLanguagePerfStressTest
(env) ~/azure-ai-textanalytics/tests/perfstress_tests> perfstress DetectLanguagePerfStressTest --parallel=50 --warmup=1
```
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def __init__(self, arguments):
endpoint=endpoint,
credential=AzureKeyCredential(key),
)
self.input = ["Detta är ett dokument skrivet på engelska."] * 1000

async def close(self):
"""This is run after cleanup."""
Expand All @@ -35,8 +36,8 @@ async def close(self):

def run_sync(self):
"""The synchronous perf test."""
self.service_client.detect_language(["This is in English"])
self.service_client.detect_language(self.input)

async def run_async(self):
"""The asynchronous perf test."""
await self.async_service_client.detect_language(["This is in English"])
await self.async_service_client.detect_language(self.input)

0 comments on commit d18ddd9

Please sign in to comment.