Skip to content

Commit 4031b7c

Browse files
committed
Use fixed width for CLI tests
1 parent b917220 commit 4031b7c

File tree

2 files changed

+36
-38
lines changed

2 files changed

+36
-38
lines changed

tests/unit/entrypoints/assets/benchmarks_stripped_output.txt

Lines changed: 34 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,44 @@
33
Benchmarks Metadata:
44
Run id:93e36b31-b454-471d-ba62-6b2671585485
55
Duration:30.2 seconds
6-
Profile:type=sweep, strategies=['synchronous', 'throughput', 'constant',
7-
'constant', 'constant', 'constant', 'constant', 'constant', 'constant',
8-
'constant'], max_concurrency=None
9-
Args:max_number=None, max_duration=30.0, warmup_number=None,
10-
warmup_duration=None, cooldown_number=None, cooldown_duration=None
11-
Worker:type_='generative_requests_worker' backend_type='openai_http'
12-
backend_target='example_target' backend_model='example_model'
13-
backend_info={'max_output_tokens': 16384, 'timeout': 300, 'http2': True,
14-
'authorization': False, 'organization': None, 'project': None,
15-
'text_completions_path': '/v1/completions', 'chat_completions_path':
16-
'/v1/chat/completions'}
17-
Request Loader:type_='generative_request_loader'
18-
data='prompt_tokens=256,output_tokens=128' data_args=None
19-
processor='example_processor' processor_args=None
6+
Profile:type=sweep, strategies=['synchronous', 'throughput', 'constant', 'constant', 'constant', 'constant',
7+
'constant', 'constant', 'constant', 'constant'], max_concurrency=None
8+
Args:max_number=None, max_duration=30.0, warmup_number=None, warmup_duration=None, cooldown_number=None,
9+
cooldown_duration=None
10+
Worker:type_='generative_requests_worker' backend_type='openai_http' backend_target='example_target'
11+
backend_model='example_model' backend_info={'max_output_tokens': 16384, 'timeout': 300, 'http2': True,
12+
'authorization': False, 'organization': None, 'project': None, 'text_completions_path': '/v1/completions',
13+
'chat_completions_path': '/v1/chat/completions'}
14+
Request Loader:type_='generative_request_loader' data='prompt_tokens=256,output_tokens=128' data_args=None
15+
processor='example_processor' processor_args=None
2016
Extras:None
2117

2218

2319
Benchmarks Info:
24-
================================================================================
25-
===================================================================
26-
Metadata |||| Requests Made ||| Prompt
27-
Tok/Req ||| Output Tok/Req ||| Prompt Tok Total||| Output Tok Total ||
28-
Benchmark| Start Time| End Time| Duration (s)| Comp| Inc| Err| Comp|
29-
Inc| Err| Comp| Inc| Err| Comp| Inc| Err| Comp| Inc| Err
30-
-----------|-----------|---------|-------------|------|-----|-----|------|------
31-
|----|-------|-----|-----|-------|-----|-----|-------|------|------
32-
synchronous| 16:59:28| 16:59:58| 30.0| 46| 1| 0| 257.1|
33-
256.0| 0.0| 128.0| 0.0| 0.0| 11827| 256| 0| 5888| 0| 0
34-
================================================================================
35-
===================================================================
20+
========================================================================================================================
21+
===========================
22+
Metadata |||| Requests Made ||| Prompt Tok/Req ||| Output Tok/Req ||| Prompt Tok
23+
Total||| Output Tok Total ||
24+
Benchmark| Start Time| End Time| Duration (s)| Comp| Inc| Err| Comp| Inc| Err| Comp| Inc| Err| Comp| Inc|
25+
Err| Comp| Inc| Err
26+
-----------|-----------|---------|-------------|------|-----|-----|------|------|----|-------|-----|-----|-------|-----|
27+
-----|-------|------|------
28+
synchronous| 16:59:28| 16:59:58| 30.0| 46| 1| 0| 257.1| 256.0| 0.0| 128.0| 0.0| 0.0| 11827| 256|
29+
0| 5888| 0| 0
30+
========================================================================================================================
31+
===========================
3632

3733

3834
Benchmarks Stats:
39-
================================================================================
40-
===============================================================
41-
Metadata | Request Stats || Out Tok/sec| Tot Tok/sec| Req Latency
42-
(sec) ||| TTFT (ms) ||| ITL (ms) ||| TPOT (ms) ||
43-
Benchmark| Per Second| Concurrency| mean| mean| mean| median|
44-
p99| mean| median| p99| mean| median| p99| mean| median| p99
45-
-----------|-----------|------------|------------|------------|------|--------|-
46-
-----|-----|-------|-----|-----|-------|----|-----|-------|----
47-
synchronous| 1.55| 1.00| 198.1| 992.7| 0.64| 0.64|
48-
0.69| 16.8| 16.4| 21.3| 4.9| 4.9| 5.3| 4.9| 4.9| 5.2
49-
================================================================================
50-
===============================================================
35+
========================================================================================================================
36+
=======================
37+
Metadata | Request Stats || Out Tok/sec| Tot Tok/sec| Req Latency (sec) ||| TTFT (ms) ||| ITL (ms)
38+
||| TPOT (ms) ||
39+
Benchmark| Per Second| Concurrency| mean| mean| mean| median| p99| mean| median| p99| mean| median|
40+
p99| mean| median| p99
41+
-----------|-----------|------------|------------|------------|------|--------|------|-----|-------|-----|-----|-------|
42+
----|-----|-------|----
43+
synchronous| 1.55| 1.00| 198.1| 992.7| 0.64| 0.64| 0.69| 16.8| 16.4| 21.3| 4.9| 4.9|
44+
5.3| 4.9| 4.9| 5.2
45+
========================================================================================================================
46+
=======================

tests/unit/entrypoints/test_display_entrypoint.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import unittest
23
from pathlib import Path
34

@@ -31,6 +32,7 @@ def test_display_entrypoint_yaml(capfd, get_test_asset_dir):
3132

3233

3334
def generic_test_display_entrypoint(filename, capfd, get_test_asset_dir):
35+
os.environ['COLUMNS'] = "120" # CLI output depends on terminal width.
3436
asset_dir = get_test_asset_dir()
3537
display_benchmarks_report(asset_dir / filename)
3638
out, err = capfd.readouterr()

0 commit comments

Comments
 (0)