mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[PR #1130] [MERGED] feat(metrics): add task completion latency tracking and reporting #2031
Labels
No labels
ascend
auto-closed
bug
bug
CI/Build
Common
documentation
enhancement
feature request
good first issue
help wanted
high priority
MetaX
nightly-failure
pull-request
PyTorch Backend
question
RFC
Roadmap
stale
Store
Tests
Transfer Engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/Mooncake#2031
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/Mooncake/pull/1130
Author: @staryxchen
Created: 11/27/2025
Status: ✅ Merged
Merged: 12/17/2025
Merged by: @stmatengss
Base:
main← Head:feat/add-task-latency-metrics📝 Commits (3)
2f4050bfeat(metrics): add task completion latency tracking and reporting013237arefactor(metrics): improve latency distribution logging logica648ee3Merge branch 'kvcache-ai:main' into feat/add-task-latency-metrics📊 Changes
2 files changed (+215 additions, -12 deletions)
View changed files
📝
mooncake-transfer-engine/include/transfer_engine.h(+80 -3)📝
mooncake-transfer-engine/src/transfer_engine.cpp(+135 -9)📄 Description
Add Transfer Task Latency Distribution Metrics
Summary
This PR adds histogram-based latency distribution tracking for transfer tasks in the Transfer Engine metrics system.
Motivation
Understanding task completion latency distribution is crucial for:
Previously, only throughput metrics were available. This enhancement provides detailed visibility into task-level performance.
Changes
Core Implementation
Modified Files:
mooncake-transfer-engine/include/transfer_engine.hmooncake-transfer-engine/src/transfer_engine.cppKey Components:
Latency Tracking
getTransferStatus()callylt::metric::histogram_tfor efficient distribution trackingHistogram Buckets
Interval-based Reporting
Output Format
Features:
Usage
Design Decisions
histogram_tdoesn't support reset; snapshot-based interval calculation is standard practice (Prometheus)Performance Impact
WITH_METRICScompile flagTesting Instructions:
Expected output will show latency distribution every 5 seconds alongside throughput metrics.
Type of Change
How Has This Been Tested?
WITH_METRICSenabled/disabledChecklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.