Skip to content

Commit

Permalink
make prom metric names consistent (kubeflow#2577)
Browse files Browse the repository at this point in the history
* make prom metric names consistent

Signed-off-by: alexagriffith <agriffith50@bloomberg.net>

* updating docs

Signed-off-by: alexagriffith <agriffith50@bloomberg.net>

Signed-off-by: alexagriffith <agriffith50@bloomberg.net>
  • Loading branch information
alexagriffith authored Dec 2, 2022
1 parent 48427d6 commit 11b2d53
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions python/kserve/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ It supports the following storage providers:
For latency metrics, send a request to `/metrics`. Prometheus latency histograms are emitted for each of the steps (pre/postprocessing, explain, predict).
Additionally, the latencies of each step are logged per request.

| Metric Name | Description | Type |
|------------------------------------|--------------------------------|-----------|
| request_preprocessing_seconds | pre-processing request latency | Histogram |
| request_explain_processing_seconds | explain request latency | Histogram |
| request_predict_processing_seconds | prediction request latency | Histogram |
| request_postprocessing_seconds | pre-processing request latency | Histogram |
| Metric Name | Description | Type |
|-----------------------------------|--------------------------------|-----------|
| request_preprocess_seconds | pre-processing request latency | Histogram |
| request_explain_seconds | explain request latency | Histogram |
| request_predict_seconds | prediction request latency | Histogram |
| request_postprocess_seconds | pre-processing request latency | Histogram |


## KServe Client
Expand Down
8 changes: 4 additions & 4 deletions python/kserve/kserve/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
PREDICTOR_V2_URL_FORMAT = "http://{0}/v2/models/{1}/infer"
EXPLAINER_V2_URL_FORMAT = "http://{0}/v2/models/{1}/explain"

PRE_HIST_TIME = Histogram('request_preprocessing_seconds', 'pre-processing request latency')
POST_HIST_TIME = Histogram('request_postprocessing_seconds', 'post-processing request latency')
PREDICT_HIST_TIME = Histogram('request_predict_processing_seconds', 'prediction request latency')
EXPLAIN_HIST_TIME = Histogram('request_explain_processing_seconds', 'explain request latency')
PRE_HIST_TIME = Histogram('request_preprocess_seconds', 'pre-process request latency')
POST_HIST_TIME = Histogram('request_postprocess_seconds', 'post-process request latency')
PREDICT_HIST_TIME = Histogram('request_predict_seconds', 'predict request latency')
EXPLAIN_HIST_TIME = Histogram('request_explain_seconds', 'explain request latency')


class ModelType(Enum):
Expand Down

0 comments on commit 11b2d53

Please sign in to comment.