Search in sources :

Example 1 with EVENTBUS

use of tech.pegasys.teku.infrastructure.metrics.TekuMetricCategory.EVENTBUS in project teku by ConsenSys.

the class MetricsOptionsTest method metricsCategories_shouldAcceptMultipleValues.

@Test
public void metricsCategories_shouldAcceptMultipleValues() {
    TekuConfiguration tekuConfiguration = getTekuConfigurationFromArguments("--metrics-categories", "LIBP2P,NETWORK,EVENTBUS,PROCESS");
    final MetricsConfig config = tekuConfiguration.metricsConfig();
    assertThat(config.getMetricsCategories()).isEqualTo(Set.of(LIBP2P, NETWORK, EVENTBUS, PROCESS));
    assertThat(createConfigBuilder().metrics(b -> b.metricsCategories(Set.of(LIBP2P, NETWORK, EVENTBUS, PROCESS))).build()).usingRecursiveComparison().withComparatorForFields(SET_COMPARATOR, SET_FIELDS).isEqualTo(tekuConfiguration);
}
Also used : Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) Set(java.util.Set) EnumSource(org.junit.jupiter.params.provider.EnumSource) EVENTBUS(tech.pegasys.teku.infrastructure.metrics.TekuMetricCategory.EVENTBUS) MetricsConfig(tech.pegasys.teku.infrastructure.metrics.MetricsConfig) Test(org.junit.jupiter.api.Test) PROCESS(org.hyperledger.besu.metrics.StandardMetricCategory.PROCESS) LIBP2P(tech.pegasys.teku.infrastructure.metrics.TekuMetricCategory.LIBP2P) List(java.util.List) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) TekuMetricCategory(tech.pegasys.teku.infrastructure.metrics.TekuMetricCategory) StandardMetricCategory(org.hyperledger.besu.metrics.StandardMetricCategory) TekuConfiguration(tech.pegasys.teku.config.TekuConfiguration) JVM(org.hyperledger.besu.metrics.StandardMetricCategory.JVM) NETWORK(tech.pegasys.teku.infrastructure.metrics.TekuMetricCategory.NETWORK) AbstractBeaconNodeCommandTest(tech.pegasys.teku.cli.AbstractBeaconNodeCommandTest) MetricCategory(org.hyperledger.besu.plugin.services.metrics.MetricCategory) Comparator(java.util.Comparator) TekuConfiguration(tech.pegasys.teku.config.TekuConfiguration) MetricsConfig(tech.pegasys.teku.infrastructure.metrics.MetricsConfig) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) AbstractBeaconNodeCommandTest(tech.pegasys.teku.cli.AbstractBeaconNodeCommandTest)

Aggregations

Comparator (java.util.Comparator)1 List (java.util.List)1 Set (java.util.Set)1 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)1 StandardMetricCategory (org.hyperledger.besu.metrics.StandardMetricCategory)1 JVM (org.hyperledger.besu.metrics.StandardMetricCategory.JVM)1 PROCESS (org.hyperledger.besu.metrics.StandardMetricCategory.PROCESS)1 MetricCategory (org.hyperledger.besu.plugin.services.metrics.MetricCategory)1 Test (org.junit.jupiter.api.Test)1 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)1 EnumSource (org.junit.jupiter.params.provider.EnumSource)1 AbstractBeaconNodeCommandTest (tech.pegasys.teku.cli.AbstractBeaconNodeCommandTest)1 TekuConfiguration (tech.pegasys.teku.config.TekuConfiguration)1 MetricsConfig (tech.pegasys.teku.infrastructure.metrics.MetricsConfig)1 TekuMetricCategory (tech.pegasys.teku.infrastructure.metrics.TekuMetricCategory)1 EVENTBUS (tech.pegasys.teku.infrastructure.metrics.TekuMetricCategory.EVENTBUS)1 LIBP2P (tech.pegasys.teku.infrastructure.metrics.TekuMetricCategory.LIBP2P)1 NETWORK (tech.pegasys.teku.infrastructure.metrics.TekuMetricCategory.NETWORK)1