Skip to content

Commit

Permalink
Add response stats to protobuf
Browse files Browse the repository at this point in the history
  • Loading branch information
kthui committed Feb 7, 2024
1 parent a506fbe commit 315806f
Showing 1 changed file with 49 additions and 1 deletion.
50 changes: 49 additions & 1 deletion protobuf/grpc_service.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// Copyright 2020-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -1013,6 +1013,45 @@ message InferStatistics
StatisticDuration cache_miss = 8;
}

//@@
//@@.. cpp:var:: message InferResponseStatistics
//@@
//@@ Statistics per decoupled response.
//@@
message InferResponseStatistics
{
//@@ .. cpp:var:: StatisticDuration compute_infer
//@@
//@@ The count and cumulative duration to compute a response.
//@@
StatisticDuration compute_infer = 1;

//@@ .. cpp:var:: StatisticDuration compute_output
//@@
//@@ The count and cumulative duration to extract the output tensors of a
//@@ response.
//@@
StatisticDuration compute_output = 2;

//@@ .. cpp:var:: StatisticDuration success
//@@
//@@ The count and cumulative duration for successful responses.
//@@
StatisticDuration success = 3;

//@@ .. cpp:var:: StatisticDuration fail
//@@
//@@ The count and cumulative duration for failed responses.
//@@
StatisticDuration fail = 4;

//@@ .. cpp:var:: StatisticDuration empty_response
//@@
//@@ The count and cumulative duration for empty responses.
//@@
StatisticDuration empty_response = 5;
}

//@@
//@@.. cpp:var:: message InferBatchStatistics
//@@
Expand Down Expand Up @@ -1161,6 +1200,15 @@ message ModelStatistics
//@@ aligned.
//@@
repeated MemoryUsage memory_usage = 8;

//@@ .. cpp:var:: map<string, InferResponseStatistics> response_stats
//@@
//@@ The key and value pairs for all decoupled responses statistics. The
//@@ key is a string identifying a set of response statistics aggregated
//@@ together (i.e. index of the response sent). The value is the
//@@ aggregated response statistics.
//@@
map<string, InferResponseStatistics> response_stats = 9;
}

//@@
Expand Down

0 comments on commit 315806f

Please sign in to comment.