-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix: fix multiple definition issue.
This related to commit d711c55.
- Loading branch information
1 parent
af84903
commit f1b99f6
Showing
14 changed files
with
172 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include "engine_metrics.h" | ||
|
||
DEFINE_COUNTER(prepare_input_latency_seconds, | ||
"Latency of preparing input in seconds"); | ||
DEFINE_COUNTER_FAMILY(execution_latency_seconds, | ||
"Execution latency in seconds"); | ||
DEFINE_COUNTER_INSTANCE(model_execution_latency_seconds, | ||
execution_latency_seconds, | ||
{{"stage", "model"}}); | ||
DEFINE_COUNTER_INSTANCE(logits_processing_latency_seconds, | ||
execution_latency_seconds, | ||
{{"stage", "logits_processing"}}); | ||
DEFINE_COUNTER_INSTANCE(sampling_latency_seconds, | ||
execution_latency_seconds, | ||
{{"stage", "sampling"}}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#pragma once | ||
|
||
#include "common/metrics.h" | ||
|
||
DECLARE_COUNTER(prepare_input_latency_seconds) | ||
DECLARE_COUNTER_FAMILY(execution_latency_seconds) | ||
DECLARE_COUNTER_INSTANCE(model_execution_latency_seconds) | ||
DECLARE_COUNTER_INSTANCE(logits_processing_latency_seconds) | ||
DECLARE_COUNTER_INSTANCE(sampling_latency_seconds) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#include "handler_metrics.h" | ||
|
||
DEFINE_COUNTER_FAMILY(request_status_total, "Total number of request status"); | ||
DEFINE_COUNTER_INSTANCE(request_ok, request_status_total, {{"code", "OK"}}); | ||
DEFINE_COUNTER_INSTANCE(request_cancelled, | ||
request_status_total, | ||
{{"code", "CANCELLED"}}); | ||
DEFINE_COUNTER_INSTANCE(request_unknown, | ||
request_status_total, | ||
{{"code", "UNKNOWN"}}); | ||
DEFINE_COUNTER_INSTANCE(request_invalid_argument, | ||
request_status_total, | ||
{{"code", "INVALID_ARGUMENT"}}); | ||
DEFINE_COUNTER_INSTANCE(request_deadline_exceeded, | ||
request_status_total, | ||
{{"code", "DEADLINE_EXCEEDED"}}); | ||
DEFINE_COUNTER_INSTANCE(request_resource_exhausted, | ||
request_status_total, | ||
{{"code", "RESOURCE_EXHAUSTED"}}); | ||
DEFINE_COUNTER_INSTANCE(request_unauthenticated, | ||
request_status_total, | ||
{{"code", "UNAUTHENTICATED"}}); | ||
DEFINE_COUNTER_INSTANCE(request_unavailable, | ||
request_status_total, | ||
{{"code", "UNAVAILABLE"}}); | ||
DEFINE_COUNTER_INSTANCE(request_unimplemented, | ||
request_status_total, | ||
{{"code", "UNIMPLEMENTED"}}); | ||
|
||
DEFINE_COUNTER_FAMILY(request_handling_latency_seconds, | ||
"Request handling latency in seconds"); | ||
DEFINE_COUNTER_INSTANCE(chat_handling_latency_seconds, | ||
request_handling_latency_seconds, | ||
{{"type", "chat"}}); | ||
DEFINE_COUNTER_INSTANCE(completion_handling_latency_seconds, | ||
request_handling_latency_seconds, | ||
{{"type", "completion"}}); | ||
|
||
DEFINE_COUNTER(tokenization_latency_seconds, | ||
"Prompt tokenization latency in seconds"); | ||
DEFINE_COUNTER(chat_template_latency_seconds, | ||
"Chat template latency in seconds"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#pragma once | ||
|
||
#include "common/metrics.h" | ||
|
||
DECLARE_COUNTER_FAMILY(request_status_total) | ||
DECLARE_COUNTER_INSTANCE(request_ok) | ||
DECLARE_COUNTER_INSTANCE(request_cancelled) | ||
DECLARE_COUNTER_INSTANCE(request_unknown) | ||
DECLARE_COUNTER_INSTANCE(request_invalid_argument) | ||
DECLARE_COUNTER_INSTANCE(request_deadline_exceeded) | ||
DECLARE_COUNTER_INSTANCE(request_resource_exhausted) | ||
DECLARE_COUNTER_INSTANCE(request_unauthenticated) | ||
DECLARE_COUNTER_INSTANCE(request_unavailable) | ||
DECLARE_COUNTER_INSTANCE(request_unimplemented) | ||
DECLARE_COUNTER_FAMILY(request_handling_latency_seconds) | ||
DECLARE_COUNTER_INSTANCE(chat_handling_latency_seconds) | ||
DECLARE_COUNTER_INSTANCE(completion_handling_latency_seconds) | ||
DECLARE_COUNTER(tokenization_latency_seconds) | ||
DECLARE_COUNTER(chat_template_latency_seconds) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.