@@ -168,6 +168,15 @@ pub struct EnvVars {
168
168
/// Set by the flag `GRAPH_LOG_TRIGGER_DATA`. Off by
169
169
/// default.
170
170
pub log_trigger_data : bool ,
171
+ /// Set by the environment variable `GRAPH_EXPLORER_TTL`
172
+ /// (expressed in seconds). The default value is 10s.
173
+ pub explorer_ttl : Duration ,
174
+ /// Set by the environment variable `GRAPH_EXPLORER_LOCK_THRESHOLD`
175
+ /// (expressed in milliseconds). The default value is 100ms.
176
+ pub explorer_lock_threshold : Duration ,
177
+ /// Set by the environment variable `GRAPH_EXPLORER_QUERY_THRESHOLD`
178
+ /// (expressed in milliseconds). The default value is 500ms.
179
+ pub explorer_query_threshold : Duration ,
171
180
/// Set by the environment variable `EXTERNAL_HTTP_BASE_URL`. No default
172
181
/// value is provided.
173
182
pub external_http_base_url : Option < String > ,
@@ -319,6 +328,9 @@ impl EnvVars {
319
328
postpone_attribute_index_creation : inner. postpone_attribute_index_creation . 0
320
329
|| cfg ! ( debug_assertions) ,
321
330
log_trigger_data : inner. log_trigger_data . 0 ,
331
+ explorer_ttl : Duration :: from_secs ( inner. explorer_ttl_in_secs ) ,
332
+ explorer_lock_threshold : Duration :: from_millis ( inner. explorer_lock_threshold_in_msec ) ,
333
+ explorer_query_threshold : Duration :: from_millis ( inner. explorer_query_threshold_in_msec ) ,
322
334
external_http_base_url : inner. external_http_base_url ,
323
335
external_ws_base_url : inner. external_ws_base_url ,
324
336
static_filters_threshold : inner. static_filters_threshold ,
@@ -480,6 +492,12 @@ struct Inner {
480
492
postpone_attribute_index_creation : EnvVarBoolean ,
481
493
#[ envconfig( from = "GRAPH_LOG_TRIGGER_DATA" , default = "false" ) ]
482
494
log_trigger_data : EnvVarBoolean ,
495
+ #[ envconfig( from = "GRAPH_EXPLORER_TTL" , default = "10" ) ]
496
+ explorer_ttl_in_secs : u64 ,
497
+ #[ envconfig( from = "GRAPH_EXPLORER_LOCK_THRESHOLD" , default = "100" ) ]
498
+ explorer_lock_threshold_in_msec : u64 ,
499
+ #[ envconfig( from = "GRAPH_EXPLORER_QUERY_THRESHOLD" , default = "500" ) ]
500
+ explorer_query_threshold_in_msec : u64 ,
483
501
#[ envconfig( from = "EXTERNAL_HTTP_BASE_URL" ) ]
484
502
external_http_base_url : Option < String > ,
485
503
#[ envconfig( from = "EXTERNAL_WS_BASE_URL" ) ]
0 commit comments