Skip to content

[model-gateway] Add streaming metrics for harmony gRPC router#15147

Merged
slin1237 merged 1 commit intomainfrom
metric-n/10
Dec 15, 2025
Merged

[model-gateway] Add streaming metrics for harmony gRPC router#15147
slin1237 merged 1 commit intomainfrom
metric-n/10

Conversation

@slin1237
Copy link
Copy Markdown
Collaborator

Add TTFT, TPOT, generation duration, and token count metrics to the harmony streaming processor, matching the metrics added to the regular gRPC streaming router.

Changes:

  • Add BACKEND_HARMONY constant to smg_labels
  • Add timing and first_token_time tracking to process_single_stream
  • Add timing and first_token_time tracking to process_dual_stream
  • Record SmgMetrics at end of both stream processors
  • Optimize: compute token totals once for both usage chunk and metrics

Checklist

Add TTFT, TPOT, generation duration, and token count metrics to the
harmony streaming processor, matching the metrics added to the regular
gRPC streaming router.

Changes:
- Add BACKEND_HARMONY constant to smg_labels
- Add timing and first_token_time tracking to process_single_stream
- Add timing and first_token_time tracking to process_dual_stream
- Record SmgMetrics at end of both stream processors
- Optimize: compute token totals once for both usage chunk and metrics
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@slin1237 slin1237 linked an issue Dec 15, 2025 that may be closed by this pull request
@slin1237 slin1237 merged commit bd9c3a4 into main Dec 15, 2025
63 of 67 checks passed
@slin1237 slin1237 deleted the metric-n/10 branch December 15, 2025 04:54
Liwansi added a commit to iforgetmyname/sglang that referenced this pull request Dec 15, 2025
…n_eagle3_npu

* 'main' of https://github.com/sgl-project/sglang: (89 commits)
  [model-gateway] Remove legacy RouterMetrics and Rename SmgMetrics to Metrics and smg_labels to metrics_labels (sgl-project#15160)
  [diffusion] fix: fix video model sp when resolution is not specified (sgl-project#15047)
  [diffusion] fix: fix pytorch non-writable array warning (sgl-project#15017)
  [diffusion] fix: cache dit with parallel (sgl-project#15163)
  chore: change npu pr-test a2 runner (sgl-project#15152)
  [Feature] Fuse mrope all in 1 kernel (sgl-project#14906)
  Fix num running requests (load) wrong cleared for ongoing requests (sgl-project#15116)
  Fused two elementwise kernels for k_nope and k_pe concat (sgl-project#14862)
  fix: adding date and fixing release name issue (sgl-project#15174)
  [CPU] Add Gemma3RMSNorm kernel in sgl-kernel and add ut (sgl-project#9324)
  feature: PR wheel (sgl-project#15170)
  [diffusion] model: support mutli-image input and qwen-image-edit-2509 (sgl-project#15005)
  fix CompressedTensorsW8A8Int8 min_capability (sgl-project#13914)
  Tiny improve summary text in `bench_one_batch_server.py` (sgl-project#15158)
  [model-gateway] add mcp and discovery metrics (sgl-project#15156)
  fix: move ci-bot (sgl-project#15154)
  Fix import warnings (sgl-project#15144)
  ci: adding errors to Github summary (sgl-project#14778)
  [model-gateway] Add streaming metrics for harmony gRPC router (sgl-project#15147)
  [model-gateway] upgrade axum and axum server (sgl-project#15146)
  ...

# Conflicts:
#	python/sglang/srt/server_args.py
tonyluj pushed a commit to openanolis/sglang that referenced this pull request Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SMG Metrics Design

1 participant