Skip to content

Commit

Permalink
Activate Query Stats
Browse files Browse the repository at this point in the history
  • Loading branch information
Sawchord authored and DFINITYManu committed Apr 18, 2024
1 parent abcea3e commit 0a51fd7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ic-os/guestos/rootfs/opt/ic/bin/generate-replica-config.sh
Expand Up @@ -234,8 +234,8 @@ BACKUP_PURGING_INTERVAL_SECS="${backup_purging_interval_secs:-3600}"
REPLICA_LOG_DEBUG_OVERRIDES="${replica_log_debug_overrides:-[]}"
# Default is null (None)
MALICIOUS_BEHAVIOR="${malicious_behavior:-null}"
# Defaults to disabled
QUERY_STATS_AGGREGATION="${query_stats_aggregation:-\"Disabled\"}"
# Defaults to enabled
QUERY_STATS_AGGREGATION="${query_stats_aggregation:-\"Enabled\"}"
# Default is 600 blocks i.e. around 10min
QUERY_STATS_EPOCH_LENGTH="${query_stats_epoch_length:-600}"

Expand Down
2 changes: 1 addition & 1 deletion rs/config/src/execution_environment.rs
Expand Up @@ -328,7 +328,7 @@ impl Default for Config {
query_cache_max_expiry_time: QUERY_CACHE_MAX_EXPIRY_TIME,
query_cache_data_certificate_expiry_time: QUERY_CACHE_DATA_CERTIFICATE_EXPIRY_TIME,
max_compilation_cache_size: MAX_COMPILATION_CACHE_SIZE,
query_stats_aggregation: FlagStatus::Disabled,
query_stats_aggregation: FlagStatus::Enabled,
query_stats_epoch_length: QUERY_STATS_EPOCH_LENGTH,
wasm_chunk_store: FlagStatus::Enabled,
stop_canister_timeout_duration: STOP_CANISTER_TIMEOUT_DURATION,
Expand Down
4 changes: 2 additions & 2 deletions rs/orchestrator/src/firewall.rs
Expand Up @@ -671,8 +671,8 @@ mod tests {
.replace("{{ replica_log_debug_overrides }}", "[]")
.replace("{{ nns_url }}", "http://www.fakeurl.com/")
.replace("{{ malicious_behavior }}", "null")
.replace("{{ query_stats_aggregation }}", "\"Disabled\"")
.replace("{{ query_stats_epoch_length }}", "1800");
.replace("{{ query_stats_aggregation }}", "\"Enabled\"")
.replace("{{ query_stats_epoch_length }}", "600");
let config_source = ConfigSource::Literal(cfg);

let config: ConfigOptional = config_source.load().unwrap();
Expand Down
4 changes: 2 additions & 2 deletions rs/tests/src/util.rs
Expand Up @@ -1358,8 +1358,8 @@ pub fn get_config() -> ConfigOptional {
.replace("{{ replica_log_debug_overrides }}", "[]")
.replace("{{ nns_url }}", "http://www.fakeurl.com/")
.replace("{{ malicious_behavior }}", "null")
.replace("{{ query_stats_aggregation }}", "\"Disabled\"")
.replace("{{ query_stats_epoch_length }}", "1800");
.replace("{{ query_stats_aggregation }}", "\"Enabled\"")
.replace("{{ query_stats_epoch_length }}", "600");

json5::from_str::<ConfigOptional>(&cfg).expect("Could not parse json5")
}
Expand Down

0 comments on commit 0a51fd7

Please sign in to comment.