[model-gateway] optimize metric labels to avoid unnecessary allocations (#15095)
This commit is contained in:
@@ -971,7 +971,7 @@ impl PDRouter {
|
||||
&self,
|
||||
client: &Client,
|
||||
url: &str,
|
||||
route: &str,
|
||||
route: &'static str,
|
||||
json_request: &Value,
|
||||
headers: Option<&HeaderMap>,
|
||||
connection_close: bool,
|
||||
|
||||
@@ -159,7 +159,7 @@ impl Router {
|
||||
&self,
|
||||
headers: Option<&HeaderMap>,
|
||||
typed_req: &T,
|
||||
route: &str,
|
||||
route: &'static str,
|
||||
model_id: Option<&str>,
|
||||
) -> Response {
|
||||
let start = Instant::now();
|
||||
@@ -210,7 +210,7 @@ impl Router {
|
||||
&self,
|
||||
headers: Option<&HeaderMap>,
|
||||
typed_req: &T,
|
||||
route: &str,
|
||||
route: &'static str,
|
||||
model_id: Option<&str>,
|
||||
is_stream: bool,
|
||||
text: &str,
|
||||
@@ -418,7 +418,7 @@ impl Router {
|
||||
&self,
|
||||
headers: Option<&HeaderMap>,
|
||||
typed_req: &T,
|
||||
route: &str,
|
||||
route: &'static str,
|
||||
worker_url: &str,
|
||||
is_stream: bool,
|
||||
load_incremented: bool, // Whether load was incremented for this request
|
||||
|
||||
Reference in New Issue
Block a user