Skip to content

Commit bf4b163

Browse files
authored
Add response statistics (#112)
* Add response stats to protobuf * Remove mentioning decoupled on comments
1 parent a506fbe commit bf4b163

File tree

1 file changed

+49
-1
lines changed

1 file changed

+49
-1
lines changed

protobuf/grpc_service.proto

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
// Copyright 2020-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
//
33
// Redistribution and use in source and binary forms, with or without
44
// modification, are permitted provided that the following conditions
@@ -1013,6 +1013,45 @@ message InferStatistics
10131013
StatisticDuration cache_miss = 8;
10141014
}
10151015

1016+
//@@
1017+
//@@.. cpp:var:: message InferResponseStatistics
1018+
//@@
1019+
//@@ Statistics per response.
1020+
//@@
1021+
message InferResponseStatistics
1022+
{
1023+
//@@ .. cpp:var:: StatisticDuration compute_infer
1024+
//@@
1025+
//@@ The count and cumulative duration to compute a response.
1026+
//@@
1027+
StatisticDuration compute_infer = 1;
1028+
1029+
//@@ .. cpp:var:: StatisticDuration compute_output
1030+
//@@
1031+
//@@ The count and cumulative duration to extract the output tensors of a
1032+
//@@ response.
1033+
//@@
1034+
StatisticDuration compute_output = 2;
1035+
1036+
//@@ .. cpp:var:: StatisticDuration success
1037+
//@@
1038+
//@@ The count and cumulative duration for successful responses.
1039+
//@@
1040+
StatisticDuration success = 3;
1041+
1042+
//@@ .. cpp:var:: StatisticDuration fail
1043+
//@@
1044+
//@@ The count and cumulative duration for failed responses.
1045+
//@@
1046+
StatisticDuration fail = 4;
1047+
1048+
//@@ .. cpp:var:: StatisticDuration empty_response
1049+
//@@
1050+
//@@ The count and cumulative duration for empty responses.
1051+
//@@
1052+
StatisticDuration empty_response = 5;
1053+
}
1054+
10161055
//@@
10171056
//@@.. cpp:var:: message InferBatchStatistics
10181057
//@@
@@ -1161,6 +1200,15 @@ message ModelStatistics
11611200
//@@ aligned.
11621201
//@@
11631202
repeated MemoryUsage memory_usage = 8;
1203+
1204+
//@@ .. cpp:var:: map<string, InferResponseStatistics> response_stats
1205+
//@@
1206+
//@@ The key and value pairs for all responses statistics. The key is a
1207+
//@@ string identifying a set of response statistics aggregated together
1208+
//@@ (i.e. index of the response sent). The value is the aggregated
1209+
//@@ response statistics.
1210+
//@@
1211+
map<string, InferResponseStatistics> response_stats = 9;
11641212
}
11651213

11661214
//@@

0 commit comments

Comments
 (0)