Skip to content

Commit 8bde1d2

Browse files
committed
fix subsystem prefix in processing latency metric tests
Signed-off-by: satyamg1620 <Satyam.Gupta.3@ibm.com>
1 parent 2bc0c34 commit 8bde1d2

5 files changed

Lines changed: 43 additions & 33 deletions

File tree

docs/metrics.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,15 @@ Label `{name}` (the pool name).
103103
| `scheduler_e2e_duration_seconds` | Histogram | End-to-end scheduling latency. |
104104
| `scheduler_attempts_total` | Counter | Scheduling attempts; labels `{status, target_model_name, endpoint_name, namespace, port}`. |
105105

106+
### EPP processing overhead
107+
108+
Unlabelled. Together these cover the EPP's own cost on the request and response paths.
109+
110+
| Name | Type | Notes |
111+
|---|---|---|
112+
| `request_processing_duration_seconds` | Histogram | Request orchestration latency, from receipt through endpoint selection and request preparation; excludes admission control. |
113+
| `response_processing_duration_seconds` | Histogram | Response handling latency, accumulated across the response handlers; excludes model-server generation time. |
114+
106115
### Plugin, info, and model rewrite
107116

108117
| Name | Type | Notes |

pkg/epp/metrics/metrics.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,8 @@ func RecordSchedulerE2ELatency(duration time.Duration) {
756756
}
757757

758758
// RecordRequestProcessingLatency records the EPP request processing latency,
759-
// measured from request receipt until an endpoint is selected.
759+
// measured from request receipt through endpoint selection and request
760+
// preparation, excluding admission-control time.
760761
func RecordRequestProcessingLatency(duration time.Duration) {
761762
llmdRequestProcessingLatency.WithLabelValues().Observe(duration.Seconds())
762763
}

pkg/epp/metrics/metrics_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ func TestRequestProcessingLatency(t *testing.T) {
903903
t.Fatal(err)
904904
}
905905
defer want.Close()
906-
if err := promtestutil.GatherAndCompare(metrics.Registry, want, "llm_d_router_epp_request_processing_duration_seconds"); err != nil {
906+
if err := promtestutil.GatherAndCompare(metrics.Registry, want, "llm_d_epp_request_processing_duration_seconds"); err != nil {
907907
t.Error(err)
908908
}
909909
}
@@ -930,7 +930,7 @@ func TestResponseProcessingLatency(t *testing.T) {
930930
t.Fatal(err)
931931
}
932932
defer want.Close()
933-
if err := promtestutil.GatherAndCompare(metrics.Registry, want, "llm_d_router_epp_response_processing_duration_seconds"); err != nil {
933+
if err := promtestutil.GatherAndCompare(metrics.Registry, want, "llm_d_epp_response_processing_duration_seconds"); err != nil {
934934
t.Error(err)
935935
}
936936
}
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# HELP llm_d_router_epp_request_processing_duration_seconds [ALPHA] EPP request orchestration latency distribution in seconds, from request receipt through endpoint selection and request preparation, excluding admission-control time.
2-
# TYPE llm_d_router_epp_request_processing_duration_seconds histogram
3-
llm_d_router_epp_request_processing_duration_seconds_bucket{le="0.0001"} 0
4-
llm_d_router_epp_request_processing_duration_seconds_bucket{le="0.0002"} 1
5-
llm_d_router_epp_request_processing_duration_seconds_bucket{le="0.0005"} 1
6-
llm_d_router_epp_request_processing_duration_seconds_bucket{le="0.001"} 2
7-
llm_d_router_epp_request_processing_duration_seconds_bucket{le="0.002"} 3
8-
llm_d_router_epp_request_processing_duration_seconds_bucket{le="0.005"} 4
9-
llm_d_router_epp_request_processing_duration_seconds_bucket{le="0.01"} 5
10-
llm_d_router_epp_request_processing_duration_seconds_bucket{le="0.02"} 6
11-
llm_d_router_epp_request_processing_duration_seconds_bucket{le="0.05"} 7
12-
llm_d_router_epp_request_processing_duration_seconds_bucket{le="0.1"} 8
13-
llm_d_router_epp_request_processing_duration_seconds_bucket{le="+Inf"} 9
14-
llm_d_router_epp_request_processing_duration_seconds_sum 0.2835
15-
llm_d_router_epp_request_processing_duration_seconds_count 9
1+
# HELP llm_d_epp_request_processing_duration_seconds [ALPHA] EPP request orchestration latency distribution in seconds, from request receipt through endpoint selection and request preparation, excluding admission-control time.
2+
# TYPE llm_d_epp_request_processing_duration_seconds histogram
3+
llm_d_epp_request_processing_duration_seconds_bucket{le="0.0001"} 0
4+
llm_d_epp_request_processing_duration_seconds_bucket{le="0.0002"} 1
5+
llm_d_epp_request_processing_duration_seconds_bucket{le="0.0005"} 1
6+
llm_d_epp_request_processing_duration_seconds_bucket{le="0.001"} 2
7+
llm_d_epp_request_processing_duration_seconds_bucket{le="0.002"} 3
8+
llm_d_epp_request_processing_duration_seconds_bucket{le="0.005"} 4
9+
llm_d_epp_request_processing_duration_seconds_bucket{le="0.01"} 5
10+
llm_d_epp_request_processing_duration_seconds_bucket{le="0.02"} 6
11+
llm_d_epp_request_processing_duration_seconds_bucket{le="0.05"} 7
12+
llm_d_epp_request_processing_duration_seconds_bucket{le="0.1"} 8
13+
llm_d_epp_request_processing_duration_seconds_bucket{le="+Inf"} 9
14+
llm_d_epp_request_processing_duration_seconds_sum 0.2835
15+
llm_d_epp_request_processing_duration_seconds_count 9
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# HELP llm_d_router_epp_response_processing_duration_seconds [ALPHA] EPP response processing latency distribution in seconds, accumulated across response handlers and excluding model server generation time.
2-
# TYPE llm_d_router_epp_response_processing_duration_seconds histogram
3-
llm_d_router_epp_response_processing_duration_seconds_bucket{le="0.0001"} 0
4-
llm_d_router_epp_response_processing_duration_seconds_bucket{le="0.0002"} 1
5-
llm_d_router_epp_response_processing_duration_seconds_bucket{le="0.0005"} 1
6-
llm_d_router_epp_response_processing_duration_seconds_bucket{le="0.001"} 2
7-
llm_d_router_epp_response_processing_duration_seconds_bucket{le="0.002"} 3
8-
llm_d_router_epp_response_processing_duration_seconds_bucket{le="0.005"} 4
9-
llm_d_router_epp_response_processing_duration_seconds_bucket{le="0.01"} 5
10-
llm_d_router_epp_response_processing_duration_seconds_bucket{le="0.02"} 6
11-
llm_d_router_epp_response_processing_duration_seconds_bucket{le="0.05"} 7
12-
llm_d_router_epp_response_processing_duration_seconds_bucket{le="0.1"} 8
13-
llm_d_router_epp_response_processing_duration_seconds_bucket{le="+Inf"} 9
14-
llm_d_router_epp_response_processing_duration_seconds_sum 0.2835
15-
llm_d_router_epp_response_processing_duration_seconds_count 9
1+
# HELP llm_d_epp_response_processing_duration_seconds [ALPHA] EPP response processing latency distribution in seconds, accumulated across response handlers and excluding model server generation time.
2+
# TYPE llm_d_epp_response_processing_duration_seconds histogram
3+
llm_d_epp_response_processing_duration_seconds_bucket{le="0.0001"} 0
4+
llm_d_epp_response_processing_duration_seconds_bucket{le="0.0002"} 1
5+
llm_d_epp_response_processing_duration_seconds_bucket{le="0.0005"} 1
6+
llm_d_epp_response_processing_duration_seconds_bucket{le="0.001"} 2
7+
llm_d_epp_response_processing_duration_seconds_bucket{le="0.002"} 3
8+
llm_d_epp_response_processing_duration_seconds_bucket{le="0.005"} 4
9+
llm_d_epp_response_processing_duration_seconds_bucket{le="0.01"} 5
10+
llm_d_epp_response_processing_duration_seconds_bucket{le="0.02"} 6
11+
llm_d_epp_response_processing_duration_seconds_bucket{le="0.05"} 7
12+
llm_d_epp_response_processing_duration_seconds_bucket{le="0.1"} 8
13+
llm_d_epp_response_processing_duration_seconds_bucket{le="+Inf"} 9
14+
llm_d_epp_response_processing_duration_seconds_sum 0.2835
15+
llm_d_epp_response_processing_duration_seconds_count 9

0 commit comments

Comments
 (0)