forked from near/nearcore
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chain: ShardManager: add metrics for partial encoded chunk response (n…
…ear#6431) This is commit e92e894 upstream. Add near_partial_encoded_chunk_request_processing_time metric which returns how much time processing partial encoded chunk requests took. The metric is split by the method used to create a response and also whether in the end the response has been prepared or not. Issue: near#6242
- Loading branch information
Showing
4 changed files
with
75 additions
and
18 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,20 @@ | ||
use once_cell::sync::Lazy; | ||
|
||
pub static PARTIAL_ENCODED_CHUNK_REQUEST_PROCESSING_TIME: Lazy<near_metrics::HistogramVec> = | ||
Lazy::new(|| { | ||
near_metrics::try_create_histogram_vec( | ||
"near_partial_encoded_chunk_request_processing_time", | ||
concat!( | ||
"Time taken to prepare responses to partial encoded chuck ", | ||
"requests. The ‘method’ key describes how we tried to fulfil ", | ||
"the request and ‘success’ describes whether we managed to ", | ||
"create a response (‘ok’) or not (‘failed’). Note that ", | ||
"success does not mean that we managed to send the response ", | ||
"over network; the count is taken before we attempt to send ", | ||
"the data out." | ||
), | ||
&["method", "success"], | ||
Some(prometheus::exponential_buckets(0.001, 2.0, 16).unwrap()), | ||
) | ||
.unwrap() | ||
}); |