@@ -168,6 +168,15 @@ pub struct EnvVars {
168168 /// Set by the flag `GRAPH_LOG_TRIGGER_DATA`. Off by
169169 /// default.
170170 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 ,
171180 /// Set by the environment variable `EXTERNAL_HTTP_BASE_URL`. No default
172181 /// value is provided.
173182 pub external_http_base_url : Option < String > ,
@@ -319,6 +328,9 @@ impl EnvVars {
319328 postpone_attribute_index_creation : inner. postpone_attribute_index_creation . 0
320329 || cfg ! ( debug_assertions) ,
321330 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 ) ,
322334 external_http_base_url : inner. external_http_base_url ,
323335 external_ws_base_url : inner. external_ws_base_url ,
324336 static_filters_threshold : inner. static_filters_threshold ,
@@ -480,6 +492,12 @@ struct Inner {
480492 postpone_attribute_index_creation : EnvVarBoolean ,
481493 #[ envconfig( from = "GRAPH_LOG_TRIGGER_DATA" , default = "false" ) ]
482494 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 ,
483501 #[ envconfig( from = "EXTERNAL_HTTP_BASE_URL" ) ]
484502 external_http_base_url : Option < String > ,
485503 #[ envconfig( from = "EXTERNAL_WS_BASE_URL" ) ]
0 commit comments