diff --git a/Tests/CodexContinuousTests/deploy-and-run.sh b/Tests/CodexContinuousTests/deploy-and-run.sh index dfc5e10..78e5e5c 100644 --- a/Tests/CodexContinuousTests/deploy-and-run.sh +++ b/Tests/CodexContinuousTests/deploy-and-run.sh @@ -24,7 +24,8 @@ do --block-ttl=99999999 \ --block-mi=99999999 \ --block-mn=100 \ - --metrics=1 \ + --metrics-endpoints=1 \ + --metrics-scraper=1 \ --check-connect=1 \ -y diff --git a/Tools/CodexNetDeployer/CodexNodeStarter.cs b/Tools/CodexNetDeployer/CodexNodeStarter.cs index 6ed6528..e1b1aa9 100644 --- a/Tools/CodexNetDeployer/CodexNodeStarter.cs +++ b/Tools/CodexNetDeployer/CodexNodeStarter.cs @@ -39,9 +39,9 @@ namespace CodexNetDeployer s.WithLogLevel(config.CodexLogLevel, new CodexLogCustomTopics(config.Discv5LogLevel, config.Libp2pLogLevel)); s.WithStorageQuota(config.StorageQuota!.Value.MB()); s.EnableMarketplace(gethNode, contracts, 100.Eth(), config.InitialTestTokens.TestTokens(), validatorsLeft > 0); - s.EnableMetrics(); if (bootstrapNode != null) s.WithBootstrapNode(bootstrapNode); + if (config.MetricsEndpoints) s.EnableMetrics(); if (config.BlockTTL != Configuration.SecondsIn1Day) s.WithBlockTTL(TimeSpan.FromSeconds(config.BlockTTL)); if (config.BlockMI != Configuration.TenMinutes) s.WithBlockMaintenanceInterval(TimeSpan.FromSeconds(config.BlockMI)); if (config.BlockMN != 1000) s.WithBlockMaintenanceNumber(config.BlockMN); diff --git a/Tools/CodexNetDeployer/Configuration.cs b/Tools/CodexNetDeployer/Configuration.cs index f37e342..4592756 100644 --- a/Tools/CodexNetDeployer/Configuration.cs +++ b/Tools/CodexNetDeployer/Configuration.cs @@ -67,8 +67,11 @@ namespace CodexNetDeployer [Uniform("block-mn", "bmn", "BLOCKMN", false, "Number of blocks maintained per interval. Default is 1000 blocks.")] public int BlockMN { get; set; } = 1000; - [Uniform("metrics", "m", "METRICS", false, "[true, false]. Determines if metrics will be recorded. Default is false.")] - public bool Metrics { get; set; } = false; + [Uniform("metrics-endpoints", "me", "METRICSENDPOINTS", false, "[true, false]. Determines if metric endpoints will be enabled. Default is false.")] + public bool MetricsEndpoints { get; set; } = false; + + [Uniform("metrics-scraper", "ms", "METRICSSCRAPER", false, "[true, false]. Determines if metrics scraper service will be deployed. (Required for certain tests.) Default is false.")] + public bool MetricsScraper { get; set; } = false; [Uniform("teststype-podlabel", "ttpl", "TESTSTYPE-PODLABEL", false, "Each kubernetes pod will be created with a label 'teststype' with value 'continuous'. " + "set this option to override the label value.")] diff --git a/Tools/CodexNetDeployer/Deployer.cs b/Tools/CodexNetDeployer/Deployer.cs index 6aa0945..1f6288c 100644 --- a/Tools/CodexNetDeployer/Deployer.cs +++ b/Tools/CodexNetDeployer/Deployer.cs @@ -100,7 +100,7 @@ namespace CodexNetDeployer private RunningContainer? StartMetricsService(CoreInterface ci, List startResults) { - if (!config.Metrics) return null; + if (!config.MetricsScraper) return null; Log("Starting metrics service..."); diff --git a/Tools/CodexNetDeployer/deploy-continuous-testnet.sh b/Tools/CodexNetDeployer/deploy-continuous-testnet.sh index 2fe63a5..25175e5 100644 --- a/Tools/CodexNetDeployer/deploy-continuous-testnet.sh +++ b/Tools/CodexNetDeployer/deploy-continuous-testnet.sh @@ -14,5 +14,6 @@ dotnet run \ --block-ttl=180 \ --block-mi=120 \ --block-mn=10000 \ - --metrics=1 \ + --metrics-endpoints=1 \ + --metrics-scraper=1 \ --check-connect=1