[Frontend][Benchmark] Add duplex performance metrics to refactored full-duplex framework (#7714)

Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com>
This commit is contained in:
ZacheryAUandamy-why-3459 authored and GitHub committed 2026-09-22 03:04:22 -07:00
1 parent 9ebef4b1d3
commit 0582844a41
21 files changed
+1449 -170

No files matched your search

+14
View File
@@ -17,10 +17,24 @@ from vllm_omni.benchmarks.metrics.metrics import (
print_stage_durations_metrics,
)
from vllm_omni.benchmarks.patch.patch import MixRequestFuncOutput
from vllm_omni.metrics.definitions import stage_modality_flags
pytestmark = [pytest.mark.core_model, pytest.mark.benchmark, pytest.mark.cpu]
def test_stage_modality_flags_match_print_stage():
text = stage_modality_flags("text", "")
audio = stage_modality_flags("", "audio")
stream = stage_modality_flags("latent", "stream")
video_frames = stage_modality_flags("video", "image")
assert text.is_text_stage and not text.is_audio_stage
assert audio.is_audio_stage and not audio.is_internal_stream_stage
assert stream.is_internal_stream_stage and not stream.is_text_stage
assert video_frames.is_video_stage and not video_frames.is_image_stage
assert not stage_modality_flags(None, None).is_text_stage
def test_tpot_matches_mean_itl_per_request():
"""TPOT and pooled ITL should agree when output_len tracks ITL samples."""
output = MixRequestFuncOutput()
+6
View File
@@ -198,6 +198,12 @@ def test_response_metrics_include_engine_tpot_and_stream_window():
"tpot_ms": {"count": 2, "mean": 15.0, "p50": 10.0, "p99": 20.0},
"ttfp_ms": {"count": 2, "mean": 300.0, "p50": 200.0, "p99": 400.0},
"rtf": {"count": 2, "mean": 2.0, "p50": 2.0, "p99": 2.0},
"stages": {
"0": {
"ttft_ms": {"count": 2, "mean": 0.0, "p50": 0.0, "p99": 0.0},
"tpot_ms": {"count": 2, "mean": 15.0, "p50": 10.0, "p99": 20.0},
}
},
"stream_ttft_ms": 200.0,
"stream_ttfp_ms": 300.0,
"stream_rtf": 8.333333,