This repository was archived by the owner on Nov 15, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -152,8 +152,21 @@ impl metrics::Metrics for Metrics {
152152 prometheus:: Histogram :: with_opts (
153153 prometheus:: HistogramOpts :: new (
154154 "pvf_preparation_time" ,
155- "Time spent in preparing PVF artifacts" ,
155+ "Time spent in preparing PVF artifacts in seconds " ,
156156 )
157+ . buckets ( vec ! [
158+ // This is synchronized with COMPILATION_TIMEOUT=60s constant found in
159+ // src/prepare/worker.rs
160+ 0.1 ,
161+ 0.5 ,
162+ 1.0 ,
163+ 10.0 ,
164+ 20.0 ,
165+ 30.0 ,
166+ 40.0 ,
167+ 50.0 ,
168+ 60.0 ,
169+ ] ) ,
157170 ) ?,
158171 registry,
159172 ) ?,
Original file line number Diff line number Diff line change @@ -35,7 +35,9 @@ use std::{sync::Arc, time::Duration};
3535const NICENESS_BACKGROUND : i32 = 10 ;
3636const NICENESS_FOREGROUND : i32 = 0 ;
3737
38- const COMPILATION_TIMEOUT : Duration = Duration :: from_secs ( 10 ) ;
38+ /// The time period after which the preparation worker is considered unresponsive and will be killed.
39+ // NOTE: If you change this make sure to fix the buckets of `pvf_preparation_time` metric.
40+ const COMPILATION_TIMEOUT : Duration = Duration :: from_secs ( 60 ) ;
3941
4042/// Spawns a new worker with the given program path that acts as the worker and the spawn timeout.
4143///
You can’t perform that action at this time.
0 commit comments