Add TTFT & ITL Metrics for LLM Inference #28

Merged
rock merged 11 commits from feat/sse-optimization-31-32-33 into main 2026-09-15 08:54:00 +00:00
2 changed files with 2 additions and 3 deletions
Showing only changes of commit 94c0cf6fe6 - Show all commits
-1
View File
@@ -51,7 +51,6 @@ func (p *PrometheusExporter) exportTTFT(lines *[]string) {
model := extractModel(key)
sum := sumInt64(samples)
avg := sum / int64(len(samples))
// Export histogram buckets (in seconds)
buckets := []float64{0.001, 0.01, 0.05, 0.1, 0.5, 1.0, 5.0}
+2 -2
View File
@@ -5,6 +5,7 @@ import (
"fmt"
"io"
"net"
"net/http"
"strings"
"time"
@@ -149,5 +150,4 @@ func (w *ResponseWriterWrapper) Hijack() (net.Conn, *bufio.ReadWriter, error) {
return nil, nil, fmt.Errorf("response writer does not implement Hijacker")
}
// Import http package
import "net/http"