diff --git a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/ThreadPantheonNodeRunner.java b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/ThreadPantheonNodeRunner.java index dcc6bad139..19f530ee09 100644 --- a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/ThreadPantheonNodeRunner.java +++ b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/ThreadPantheonNodeRunner.java @@ -26,7 +26,7 @@ import tech.pegasys.pantheon.ethereum.eth.transactions.TransactionPoolConfigurat import tech.pegasys.pantheon.ethereum.graphql.GraphQLConfiguration; import tech.pegasys.pantheon.ethereum.p2p.peers.EnodeURL; import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.metrics.ObservableMetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; import tech.pegasys.pantheon.plugin.services.PantheonEvents; import tech.pegasys.pantheon.plugin.services.PicoCLIOptions; @@ -90,7 +90,7 @@ public class ThreadPantheonNodeRunner implements PantheonNodeRunner { commandLine.parseArgs(node.getConfiguration().getExtraCLIOptions().toArray(new String[0])); - final MetricsSystem noOpMetricsSystem = new NoOpMetricsSystem(); + final ObservableMetricsSystem noOpMetricsSystem = new NoOpMetricsSystem(); final List bootnodes = node.getConfiguration().getBootnodes().stream() .map(EnodeURL::fromURI) diff --git a/consensus/clique/src/test/java/tech/pegasys/pantheon/consensus/clique/blockcreation/CliqueBlockCreatorTest.java b/consensus/clique/src/test/java/tech/pegasys/pantheon/consensus/clique/blockcreation/CliqueBlockCreatorTest.java index fbc7133bb7..3ed775bee8 100644 --- a/consensus/clique/src/test/java/tech/pegasys/pantheon/consensus/clique/blockcreation/CliqueBlockCreatorTest.java +++ b/consensus/clique/src/test/java/tech/pegasys/pantheon/consensus/clique/blockcreation/CliqueBlockCreatorTest.java @@ -45,8 +45,8 @@ import tech.pegasys.pantheon.ethereum.eth.transactions.PendingTransactions; import tech.pegasys.pantheon.ethereum.eth.transactions.TransactionPoolConfiguration; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateArchive; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.testutil.TestClock; import tech.pegasys.pantheon.util.bytes.BytesValue; diff --git a/consensus/clique/src/test/java/tech/pegasys/pantheon/consensus/clique/blockcreation/CliqueMinerExecutorTest.java b/consensus/clique/src/test/java/tech/pegasys/pantheon/consensus/clique/blockcreation/CliqueMinerExecutorTest.java index d48996178f..ab917aabc5 100644 --- a/consensus/clique/src/test/java/tech/pegasys/pantheon/consensus/clique/blockcreation/CliqueMinerExecutorTest.java +++ b/consensus/clique/src/test/java/tech/pegasys/pantheon/consensus/clique/blockcreation/CliqueMinerExecutorTest.java @@ -38,8 +38,8 @@ import tech.pegasys.pantheon.ethereum.core.Util; import tech.pegasys.pantheon.ethereum.core.Wei; import tech.pegasys.pantheon.ethereum.eth.transactions.PendingTransactions; import tech.pegasys.pantheon.ethereum.eth.transactions.TransactionPoolConfiguration; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.testutil.TestClock; import tech.pegasys.pantheon.util.bytes.BytesValue; diff --git a/consensus/ibft/src/integration-test/java/tech/pegasys/pantheon/consensus/ibft/support/TestContextBuilder.java b/consensus/ibft/src/integration-test/java/tech/pegasys/pantheon/consensus/ibft/support/TestContextBuilder.java index a5a0d58b4d..655982a4a1 100644 --- a/consensus/ibft/src/integration-test/java/tech/pegasys/pantheon/consensus/ibft/support/TestContextBuilder.java +++ b/consensus/ibft/src/integration-test/java/tech/pegasys/pantheon/consensus/ibft/support/TestContextBuilder.java @@ -65,8 +65,8 @@ import tech.pegasys.pantheon.ethereum.eth.transactions.PendingTransactions; import tech.pegasys.pantheon.ethereum.eth.transactions.TransactionPoolConfiguration; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateArchive; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.testutil.TestClock; import tech.pegasys.pantheon.util.Subscribers; import tech.pegasys.pantheon.util.bytes.BytesValue; diff --git a/consensus/ibft/src/test/java/tech/pegasys/pantheon/consensus/ibft/blockcreation/IbftBlockCreatorTest.java b/consensus/ibft/src/test/java/tech/pegasys/pantheon/consensus/ibft/blockcreation/IbftBlockCreatorTest.java index 3f50fb3a98..ff6a8d08c4 100644 --- a/consensus/ibft/src/test/java/tech/pegasys/pantheon/consensus/ibft/blockcreation/IbftBlockCreatorTest.java +++ b/consensus/ibft/src/test/java/tech/pegasys/pantheon/consensus/ibft/blockcreation/IbftBlockCreatorTest.java @@ -38,8 +38,8 @@ import tech.pegasys.pantheon.ethereum.eth.transactions.TransactionPoolConfigurat import tech.pegasys.pantheon.ethereum.mainnet.BlockHeaderValidator; import tech.pegasys.pantheon.ethereum.mainnet.HeaderValidationMode; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.testutil.TestClock; import tech.pegasys.pantheon.util.bytes.BytesValue; diff --git a/consensus/ibftlegacy/src/main/java/tech/pegasys/pantheon/consensus/ibftlegacy/protocol/Istanbul64ProtocolManager.java b/consensus/ibftlegacy/src/main/java/tech/pegasys/pantheon/consensus/ibftlegacy/protocol/Istanbul64ProtocolManager.java index d07f1bfdc1..3ce70079aa 100644 --- a/consensus/ibftlegacy/src/main/java/tech/pegasys/pantheon/consensus/ibftlegacy/protocol/Istanbul64ProtocolManager.java +++ b/consensus/ibftlegacy/src/main/java/tech/pegasys/pantheon/consensus/ibftlegacy/protocol/Istanbul64ProtocolManager.java @@ -19,7 +19,7 @@ import tech.pegasys.pantheon.ethereum.eth.EthProtocolConfiguration; import tech.pegasys.pantheon.ethereum.eth.manager.EthProtocolManager; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.Capability; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateArchive; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.math.BigInteger; import java.time.Clock; diff --git a/consensus/ibftlegacy/src/test/java/tech/pegasys/pantheon/consensus/ibftlegacy/blockcreation/IbftBlockCreatorTest.java b/consensus/ibftlegacy/src/test/java/tech/pegasys/pantheon/consensus/ibftlegacy/blockcreation/IbftBlockCreatorTest.java index 2163e0fe71..43c9062520 100644 --- a/consensus/ibftlegacy/src/test/java/tech/pegasys/pantheon/consensus/ibftlegacy/blockcreation/IbftBlockCreatorTest.java +++ b/consensus/ibftlegacy/src/test/java/tech/pegasys/pantheon/consensus/ibftlegacy/blockcreation/IbftBlockCreatorTest.java @@ -38,8 +38,8 @@ import tech.pegasys.pantheon.ethereum.eth.transactions.TransactionPoolConfigurat import tech.pegasys.pantheon.ethereum.mainnet.BlockHeaderValidator; import tech.pegasys.pantheon.ethereum.mainnet.HeaderValidationMode; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.testutil.TestClock; import tech.pegasys.pantheon.util.bytes.BytesValue; diff --git a/ethereum/blockcreation/src/test/java/tech/pegasys/pantheon/ethereum/blockcreation/BlockTransactionSelectorTest.java b/ethereum/blockcreation/src/test/java/tech/pegasys/pantheon/ethereum/blockcreation/BlockTransactionSelectorTest.java index 7df6bc1166..17f959b250 100644 --- a/ethereum/blockcreation/src/test/java/tech/pegasys/pantheon/ethereum/blockcreation/BlockTransactionSelectorTest.java +++ b/ethereum/blockcreation/src/test/java/tech/pegasys/pantheon/ethereum/blockcreation/BlockTransactionSelectorTest.java @@ -47,8 +47,8 @@ import tech.pegasys.pantheon.ethereum.mainnet.TransactionProcessor; import tech.pegasys.pantheon.ethereum.mainnet.TransactionValidator.TransactionInvalidReason; import tech.pegasys.pantheon.ethereum.mainnet.ValidationResult; import tech.pegasys.pantheon.ethereum.vm.TestBlockchain; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.testutil.TestClock; import tech.pegasys.pantheon.util.bytes.BytesValue; import tech.pegasys.pantheon.util.uint.UInt256; diff --git a/ethereum/blockcreation/src/test/java/tech/pegasys/pantheon/ethereum/blockcreation/EthHashBlockCreatorTest.java b/ethereum/blockcreation/src/test/java/tech/pegasys/pantheon/ethereum/blockcreation/EthHashBlockCreatorTest.java index 8cef84c22f..ffbac64041 100644 --- a/ethereum/blockcreation/src/test/java/tech/pegasys/pantheon/ethereum/blockcreation/EthHashBlockCreatorTest.java +++ b/ethereum/blockcreation/src/test/java/tech/pegasys/pantheon/ethereum/blockcreation/EthHashBlockCreatorTest.java @@ -30,8 +30,8 @@ import tech.pegasys.pantheon.ethereum.mainnet.EthHashSolver; import tech.pegasys.pantheon.ethereum.mainnet.EthHasher.Light; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolScheduleBuilder; import tech.pegasys.pantheon.ethereum.mainnet.ValidationTestUtils; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.testutil.TestClock; import tech.pegasys.pantheon.util.bytes.BytesValue; import tech.pegasys.pantheon.util.uint.UInt256; diff --git a/ethereum/blockcreation/src/test/java/tech/pegasys/pantheon/ethereum/blockcreation/EthHashMinerExecutorTest.java b/ethereum/blockcreation/src/test/java/tech/pegasys/pantheon/ethereum/blockcreation/EthHashMinerExecutorTest.java index 3cd5b6a818..a67f42e5db 100644 --- a/ethereum/blockcreation/src/test/java/tech/pegasys/pantheon/ethereum/blockcreation/EthHashMinerExecutorTest.java +++ b/ethereum/blockcreation/src/test/java/tech/pegasys/pantheon/ethereum/blockcreation/EthHashMinerExecutorTest.java @@ -18,8 +18,8 @@ import tech.pegasys.pantheon.ethereum.core.MiningParameters; import tech.pegasys.pantheon.ethereum.core.MiningParametersTestBuilder; import tech.pegasys.pantheon.ethereum.eth.transactions.PendingTransactions; import tech.pegasys.pantheon.ethereum.eth.transactions.TransactionPoolConfiguration; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.testutil.TestClock; import tech.pegasys.pantheon.util.Subscribers; diff --git a/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/ProtocolContext.java b/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/ProtocolContext.java index be71d5a327..adfa127ad4 100644 --- a/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/ProtocolContext.java +++ b/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/ProtocolContext.java @@ -22,7 +22,7 @@ import tech.pegasys.pantheon.ethereum.storage.StorageProvider; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateArchive; import tech.pegasys.pantheon.ethereum.worldstate.WorldStatePreimageStorage; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateStorage; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.function.BiFunction; diff --git a/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/chain/DefaultBlockchain.java b/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/chain/DefaultBlockchain.java index 6c2ce8f6ee..6fa08a57bb 100644 --- a/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/chain/DefaultBlockchain.java +++ b/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/chain/DefaultBlockchain.java @@ -23,8 +23,8 @@ import tech.pegasys.pantheon.ethereum.core.BlockHeader; import tech.pegasys.pantheon.ethereum.core.Hash; import tech.pegasys.pantheon.ethereum.core.Transaction; import tech.pegasys.pantheon.ethereum.core.TransactionReceipt; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.InvalidConfigurationException; import tech.pegasys.pantheon.util.Subscribers; import tech.pegasys.pantheon.util.bytes.BytesValues; diff --git a/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/core/PrivacyParameters.java b/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/core/PrivacyParameters.java index 351506f8d8..3495bccb49 100644 --- a/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/core/PrivacyParameters.java +++ b/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/core/PrivacyParameters.java @@ -23,8 +23,8 @@ import tech.pegasys.pantheon.ethereum.storage.keyvalue.RocksDbStorageProvider; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateArchive; import tech.pegasys.pantheon.ethereum.worldstate.WorldStatePreimageStorage; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateStorage; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.services.kvstore.RocksDbConfiguration; import java.io.File; diff --git a/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/storage/keyvalue/RocksDbStorageProvider.java b/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/storage/keyvalue/RocksDbStorageProvider.java index 743990a4e7..3f9c0ed6dd 100644 --- a/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/storage/keyvalue/RocksDbStorageProvider.java +++ b/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/storage/keyvalue/RocksDbStorageProvider.java @@ -16,7 +16,7 @@ import static java.util.AbstractMap.SimpleEntry; import static java.util.Arrays.asList; import tech.pegasys.pantheon.ethereum.storage.StorageProvider; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.services.kvstore.ColumnarRocksDbKeyValueStorage; import tech.pegasys.pantheon.services.kvstore.KeyValueStorage; import tech.pegasys.pantheon.services.kvstore.LimitedInMemoryKeyValueStorage; diff --git a/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/worldstate/MarkSweepPruner.java b/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/worldstate/MarkSweepPruner.java index 53ef467cc5..d6d8e86f27 100644 --- a/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/worldstate/MarkSweepPruner.java +++ b/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/worldstate/MarkSweepPruner.java @@ -17,9 +17,9 @@ import tech.pegasys.pantheon.ethereum.core.Hash; import tech.pegasys.pantheon.ethereum.rlp.RLP; import tech.pegasys.pantheon.ethereum.trie.MerklePatriciaTrie; import tech.pegasys.pantheon.ethereum.trie.StoredMerklePatriciaTrie; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import tech.pegasys.pantheon.services.kvstore.KeyValueStorage; import tech.pegasys.pantheon.services.kvstore.KeyValueStorage.Transaction; import tech.pegasys.pantheon.util.bytes.Bytes32; diff --git a/ethereum/core/src/test/java/tech/pegasys/pantheon/ethereum/storage/keyvalue/RocksDbStorageProviderTest.java b/ethereum/core/src/test/java/tech/pegasys/pantheon/ethereum/storage/keyvalue/RocksDbStorageProviderTest.java index b0f96507be..071444d280 100644 --- a/ethereum/core/src/test/java/tech/pegasys/pantheon/ethereum/storage/keyvalue/RocksDbStorageProviderTest.java +++ b/ethereum/core/src/test/java/tech/pegasys/pantheon/ethereum/storage/keyvalue/RocksDbStorageProviderTest.java @@ -16,8 +16,8 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.when; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.services.kvstore.RocksDbConfiguration; import java.nio.charset.Charset; diff --git a/ethereum/eth/src/jmh/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/WorldStateDownloaderBenchmark.java b/ethereum/eth/src/jmh/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/WorldStateDownloaderBenchmark.java index 3f6b589afb..a3014d7c95 100644 --- a/ethereum/eth/src/jmh/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/WorldStateDownloaderBenchmark.java +++ b/ethereum/eth/src/jmh/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/WorldStateDownloaderBenchmark.java @@ -30,8 +30,8 @@ import tech.pegasys.pantheon.ethereum.storage.StorageProvider; import tech.pegasys.pantheon.ethereum.storage.keyvalue.RocksDbStorageProvider; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateArchive; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateStorage; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.services.kvstore.RocksDbConfiguration; import tech.pegasys.pantheon.services.tasks.CachingTaskCollection; import tech.pegasys.pantheon.services.tasks.FlatFileTaskCollection; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/EthPeers.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/EthPeers.java index 4a5dfc5fed..223556a3de 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/EthPeers.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/EthPeers.java @@ -14,8 +14,8 @@ package tech.pegasys.pantheon.ethereum.eth.manager; import tech.pegasys.pantheon.ethereum.eth.manager.EthPeer.DisconnectCallback; import tech.pegasys.pantheon.ethereum.p2p.rlpx.connections.PeerConnection; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.Subscribers; import java.time.Clock; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/EthProtocolManager.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/EthProtocolManager.java index c6a769565b..1984b49340 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/EthProtocolManager.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/EthProtocolManager.java @@ -32,7 +32,7 @@ import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.MessageData; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason; import tech.pegasys.pantheon.ethereum.rlp.RLPException; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateArchive; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.uint.UInt256; import java.math.BigInteger; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/EthScheduler.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/EthScheduler.java index cefbd0ba89..ed36ed6122 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/EthScheduler.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/EthScheduler.java @@ -19,7 +19,7 @@ import static tech.pegasys.pantheon.ethereum.eth.manager.MonitoredExecutors.newS import static tech.pegasys.pantheon.util.FutureUtils.propagateResult; import tech.pegasys.pantheon.ethereum.eth.manager.task.EthTask; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.services.pipeline.Pipeline; import tech.pegasys.pantheon.util.ExceptionUtils; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/MonitoredExecutors.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/MonitoredExecutors.java index d2b7ff60fa..db1e3c68ad 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/MonitoredExecutors.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/MonitoredExecutors.java @@ -13,9 +13,9 @@ package tech.pegasys.pantheon.ethereum.eth.manager; import tech.pegasys.pantheon.ethereum.eth.manager.bounded.BoundedQueue; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import java.util.Locale; import java.util.concurrent.BlockingQueue; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/bounded/BoundedQueue.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/bounded/BoundedQueue.java index 85a5fd5a16..30dfc8eec1 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/bounded/BoundedQueue.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/bounded/BoundedQueue.java @@ -12,9 +12,9 @@ */ package tech.pegasys.pantheon.ethereum.eth.manager.bounded; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import java.util.concurrent.LinkedBlockingDeque; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractEthTask.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractEthTask.java index dc4315dc71..f2cd7fdfad 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractEthTask.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractEthTask.java @@ -15,11 +15,11 @@ package tech.pegasys.pantheon.ethereum.eth.manager.task; import static tech.pegasys.pantheon.util.FutureUtils.completedExceptionally; import tech.pegasys.pantheon.ethereum.eth.manager.EthScheduler; -import tech.pegasys.pantheon.metrics.LabelledMetric; -import tech.pegasys.pantheon.metrics.MetricsSystem; -import tech.pegasys.pantheon.metrics.OperationTimer; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; +import tech.pegasys.pantheon.plugin.services.metrics.OperationTimer; import java.util.Collection; import java.util.concurrent.CancellationException; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractGetHeadersFromPeerTask.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractGetHeadersFromPeerTask.java index 4529c4826c..1bef230387 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractGetHeadersFromPeerTask.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractGetHeadersFromPeerTask.java @@ -22,7 +22,7 @@ import tech.pegasys.pantheon.ethereum.eth.messages.EthPV62; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.MessageData; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.ArrayList; import java.util.Collections; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractPeerRequestTask.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractPeerRequestTask.java index 8ef8017504..2d458dfa91 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractPeerRequestTask.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractPeerRequestTask.java @@ -21,7 +21,7 @@ import tech.pegasys.pantheon.ethereum.eth.manager.exceptions.PeerBreachedProtoco import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.MessageData; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason; import tech.pegasys.pantheon.ethereum.rlp.RLPException; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.ExceptionUtils; import java.time.Duration; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractPeerTask.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractPeerTask.java index 88e25b313e..28c83ac28c 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractPeerTask.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractPeerTask.java @@ -15,7 +15,7 @@ package tech.pegasys.pantheon.ethereum.eth.manager.task; import tech.pegasys.pantheon.ethereum.eth.manager.EthContext; import tech.pegasys.pantheon.ethereum.eth.manager.EthPeer; import tech.pegasys.pantheon.ethereum.eth.manager.task.AbstractPeerTask.PeerTaskResult; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.Optional; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractRetryingPeerTask.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractRetryingPeerTask.java index d747f25ba0..7f85f6b7cf 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractRetryingPeerTask.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractRetryingPeerTask.java @@ -18,7 +18,7 @@ import tech.pegasys.pantheon.ethereum.eth.manager.exceptions.MaxRetriesReachedEx import tech.pegasys.pantheon.ethereum.eth.manager.exceptions.NoAvailablePeersException; import tech.pegasys.pantheon.ethereum.eth.manager.exceptions.PeerBreachedProtocolException; import tech.pegasys.pantheon.ethereum.eth.manager.exceptions.PeerDisconnectedException; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.ExceptionUtils; import java.time.Duration; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetBlockFromPeerTask.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetBlockFromPeerTask.java index 09822853bc..53445c1137 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetBlockFromPeerTask.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetBlockFromPeerTask.java @@ -21,7 +21,7 @@ import tech.pegasys.pantheon.ethereum.eth.manager.EthContext; import tech.pegasys.pantheon.ethereum.eth.manager.EthPeer; import tech.pegasys.pantheon.ethereum.eth.manager.exceptions.IncompleteResultsException; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.List; import java.util.concurrent.CompletableFuture; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetBodiesFromPeerTask.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetBodiesFromPeerTask.java index dfb2e36e33..f89dddf658 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetBodiesFromPeerTask.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetBodiesFromPeerTask.java @@ -27,7 +27,7 @@ import tech.pegasys.pantheon.ethereum.eth.messages.EthPV62; import tech.pegasys.pantheon.ethereum.mainnet.BodyValidation; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.MessageData; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.bytes.Bytes32; import java.util.ArrayList; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetHeadersFromPeerByHashTask.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetHeadersFromPeerByHashTask.java index 34b1a31fd9..49b1aabf70 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetHeadersFromPeerByHashTask.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetHeadersFromPeerByHashTask.java @@ -19,7 +19,7 @@ import tech.pegasys.pantheon.ethereum.core.Hash; import tech.pegasys.pantheon.ethereum.eth.manager.EthContext; import tech.pegasys.pantheon.ethereum.eth.manager.PendingPeerRequest; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import com.google.common.annotations.VisibleForTesting; import org.apache.logging.log4j.LogManager; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetHeadersFromPeerByNumberTask.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetHeadersFromPeerByNumberTask.java index c936c17354..4ac73e76ad 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetHeadersFromPeerByNumberTask.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetHeadersFromPeerByNumberTask.java @@ -16,7 +16,7 @@ import tech.pegasys.pantheon.ethereum.core.BlockHeader; import tech.pegasys.pantheon.ethereum.eth.manager.EthContext; import tech.pegasys.pantheon.ethereum.eth.manager.PendingPeerRequest; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import com.google.common.annotations.VisibleForTesting; import org.apache.logging.log4j.LogManager; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetNodeDataFromPeerTask.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetNodeDataFromPeerTask.java index 2ca58e4b49..b6e6cc419f 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetNodeDataFromPeerTask.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetNodeDataFromPeerTask.java @@ -21,7 +21,7 @@ import tech.pegasys.pantheon.ethereum.eth.manager.PendingPeerRequest; import tech.pegasys.pantheon.ethereum.eth.messages.EthPV63; import tech.pegasys.pantheon.ethereum.eth.messages.NodeDataMessage; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.MessageData; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.bytes.BytesValue; import java.util.Collection; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetReceiptsFromPeerTask.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetReceiptsFromPeerTask.java index 58058021d5..57268c06a4 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetReceiptsFromPeerTask.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/GetReceiptsFromPeerTask.java @@ -25,7 +25,7 @@ import tech.pegasys.pantheon.ethereum.eth.manager.PendingPeerRequest; import tech.pegasys.pantheon.ethereum.eth.messages.EthPV63; import tech.pegasys.pantheon.ethereum.eth.messages.ReceiptsMessage; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.MessageData; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.ArrayList; import java.util.Collection; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/RetryingGetNodeDataFromPeerTask.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/RetryingGetNodeDataFromPeerTask.java index d987d116be..907898c21e 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/RetryingGetNodeDataFromPeerTask.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/RetryingGetNodeDataFromPeerTask.java @@ -15,7 +15,7 @@ package tech.pegasys.pantheon.ethereum.eth.manager.task; import tech.pegasys.pantheon.ethereum.core.Hash; import tech.pegasys.pantheon.ethereum.eth.manager.EthContext; import tech.pegasys.pantheon.ethereum.eth.manager.EthPeer; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.bytes.BytesValue; import java.util.Collection; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/WaitForPeerTask.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/WaitForPeerTask.java index b2ddd8b723..066237e27e 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/WaitForPeerTask.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/WaitForPeerTask.java @@ -14,7 +14,7 @@ package tech.pegasys.pantheon.ethereum.eth.manager.task; import tech.pegasys.pantheon.ethereum.eth.manager.EthContext; import tech.pegasys.pantheon.ethereum.eth.manager.EthPeers; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/WaitForPeersTask.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/WaitForPeersTask.java index cd6d8db20e..94066529b0 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/WaitForPeersTask.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/manager/task/WaitForPeersTask.java @@ -14,7 +14,7 @@ package tech.pegasys.pantheon.ethereum.eth.manager.task; import tech.pegasys.pantheon.ethereum.eth.manager.EthContext; import tech.pegasys.pantheon.ethereum.eth.manager.EthPeers; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/peervalidation/DaoForkPeerValidator.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/peervalidation/DaoForkPeerValidator.java index 05f3cdbcb0..15dc45100a 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/peervalidation/DaoForkPeerValidator.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/peervalidation/DaoForkPeerValidator.java @@ -21,7 +21,7 @@ import tech.pegasys.pantheon.ethereum.eth.manager.task.AbstractPeerTask; import tech.pegasys.pantheon.ethereum.eth.manager.task.GetHeadersFromPeerByNumberTask; import tech.pegasys.pantheon.ethereum.mainnet.MainnetBlockHeaderValidator; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.time.Duration; import java.util.List; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/BlockPropagationManager.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/BlockPropagationManager.java index 2dd04483ea..dc6e890097 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/BlockPropagationManager.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/BlockPropagationManager.java @@ -37,7 +37,7 @@ import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSpec; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason; import tech.pegasys.pantheon.ethereum.rlp.RLPException; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.uint.UInt256; import java.util.ArrayList; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/ChainHeadTracker.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/ChainHeadTracker.java index c17725824d..58aa444499 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/ChainHeadTracker.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/ChainHeadTracker.java @@ -23,7 +23,7 @@ import tech.pegasys.pantheon.ethereum.eth.manager.EthPeers.ConnectCallback; import tech.pegasys.pantheon.ethereum.eth.manager.task.GetHeadersFromPeerByHashTask; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.function.Supplier; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/CheckpointHeaderFetcher.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/CheckpointHeaderFetcher.java index 62edb7518e..65847e955f 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/CheckpointHeaderFetcher.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/CheckpointHeaderFetcher.java @@ -22,7 +22,7 @@ import tech.pegasys.pantheon.ethereum.eth.manager.EthPeer; import tech.pegasys.pantheon.ethereum.eth.manager.task.AbstractPeerTask.PeerTaskResult; import tech.pegasys.pantheon.ethereum.eth.manager.task.GetHeadersFromPeerByHashTask; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.List; import java.util.Optional; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/DefaultSynchronizer.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/DefaultSynchronizer.java index afb5986943..528705a4fa 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/DefaultSynchronizer.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/DefaultSynchronizer.java @@ -28,8 +28,8 @@ import tech.pegasys.pantheon.ethereum.eth.sync.state.SyncState; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; import tech.pegasys.pantheon.ethereum.worldstate.Pruner; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateStorage; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.ExceptionUtils; import tech.pegasys.pantheon.util.Subscribers; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/DownloadBodiesStep.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/DownloadBodiesStep.java index 3718d9356a..4f3a13697f 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/DownloadBodiesStep.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/DownloadBodiesStep.java @@ -17,7 +17,7 @@ import tech.pegasys.pantheon.ethereum.core.BlockHeader; import tech.pegasys.pantheon.ethereum.eth.manager.EthContext; import tech.pegasys.pantheon.ethereum.eth.sync.tasks.CompleteBlocksTask; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.List; import java.util.concurrent.CompletableFuture; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/DownloadHeadersStep.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/DownloadHeadersStep.java index 676c678d84..e1f59440e6 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/DownloadHeadersStep.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/DownloadHeadersStep.java @@ -22,7 +22,7 @@ import tech.pegasys.pantheon.ethereum.eth.manager.task.AbstractPeerTask.PeerTask import tech.pegasys.pantheon.ethereum.eth.manager.task.GetHeadersFromPeerByHashTask; import tech.pegasys.pantheon.ethereum.eth.sync.tasks.DownloadHeaderSequenceTask; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.FutureUtils; import java.util.ArrayList; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/PipelineChainDownloader.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/PipelineChainDownloader.java index 022f442619..f8eb5aac01 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/PipelineChainDownloader.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/PipelineChainDownloader.java @@ -22,10 +22,10 @@ import tech.pegasys.pantheon.ethereum.eth.sync.state.SyncState; import tech.pegasys.pantheon.ethereum.eth.sync.state.SyncTarget; import tech.pegasys.pantheon.ethereum.eth.sync.tasks.exceptions.InvalidBlockException; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; import tech.pegasys.pantheon.services.pipeline.Pipeline; import tech.pegasys.pantheon.util.ExceptionUtils; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/SyncTargetManager.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/SyncTargetManager.java index d9430c6a0c..84f60644c4 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/SyncTargetManager.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/SyncTargetManager.java @@ -21,7 +21,7 @@ import tech.pegasys.pantheon.ethereum.eth.manager.task.WaitForPeerTask; import tech.pegasys.pantheon.ethereum.eth.sync.state.SyncTarget; import tech.pegasys.pantheon.ethereum.eth.sync.tasks.DetermineCommonAncestorTask; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.time.Duration; import java.util.Optional; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/DownloadReceiptsStep.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/DownloadReceiptsStep.java index 3a75a08b73..0c5d4d2f18 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/DownloadReceiptsStep.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/DownloadReceiptsStep.java @@ -20,7 +20,7 @@ import tech.pegasys.pantheon.ethereum.core.BlockHeader; import tech.pegasys.pantheon.ethereum.core.TransactionReceipt; import tech.pegasys.pantheon.ethereum.eth.manager.EthContext; import tech.pegasys.pantheon.ethereum.eth.sync.tasks.GetReceiptsForHeadersTask; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.FutureUtils; import java.util.List; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastDownloaderFactory.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastDownloaderFactory.java index f36d963b21..ea04ad0c6d 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastDownloaderFactory.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastDownloaderFactory.java @@ -23,8 +23,8 @@ import tech.pegasys.pantheon.ethereum.eth.sync.worldstate.WorldStateDownloader; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; import tech.pegasys.pantheon.ethereum.mainnet.ScheduleBasedBlockHeaderFunctions; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateStorage; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.services.tasks.CachingTaskCollection; import tech.pegasys.pantheon.services.tasks.FlatFileTaskCollection; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastSyncActions.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastSyncActions.java index 20aa54a91f..ed006ce74f 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastSyncActions.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastSyncActions.java @@ -24,9 +24,9 @@ import tech.pegasys.pantheon.ethereum.eth.sync.ChainDownloader; import tech.pegasys.pantheon.ethereum.eth.sync.SynchronizerConfiguration; import tech.pegasys.pantheon.ethereum.eth.sync.state.SyncState; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import tech.pegasys.pantheon.util.ExceptionUtils; import java.time.Duration; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastSyncChainDownloader.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastSyncChainDownloader.java index a30fe38735..2f3dad9ddf 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastSyncChainDownloader.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastSyncChainDownloader.java @@ -20,7 +20,7 @@ import tech.pegasys.pantheon.ethereum.eth.sync.PipelineChainDownloader; import tech.pegasys.pantheon.ethereum.eth.sync.SynchronizerConfiguration; import tech.pegasys.pantheon.ethereum.eth.sync.state.SyncState; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; public class FastSyncChainDownloader { diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastSyncDownloadPipelineFactory.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastSyncDownloadPipelineFactory.java index 37c243a236..4fa55eabea 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastSyncDownloadPipelineFactory.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastSyncDownloadPipelineFactory.java @@ -32,10 +32,10 @@ import tech.pegasys.pantheon.ethereum.eth.sync.DownloadPipelineFactory; import tech.pegasys.pantheon.ethereum.eth.sync.SynchronizerConfiguration; import tech.pegasys.pantheon.ethereum.eth.sync.state.SyncTarget; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; import tech.pegasys.pantheon.services.pipeline.Pipeline; import tech.pegasys.pantheon.services.pipeline.PipelineBuilder; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastSyncTargetManager.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastSyncTargetManager.java index 310ed7e829..9f85ed2c49 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastSyncTargetManager.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastSyncTargetManager.java @@ -24,7 +24,7 @@ import tech.pegasys.pantheon.ethereum.eth.sync.SynchronizerConfiguration; import tech.pegasys.pantheon.ethereum.eth.sync.tasks.RetryingGetHeaderFromPeerByNumberTask; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.List; import java.util.Optional; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastSyncValidationPolicy.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastSyncValidationPolicy.java index d07f67c9c6..546a1d1300 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastSyncValidationPolicy.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/FastSyncValidationPolicy.java @@ -14,8 +14,8 @@ package tech.pegasys.pantheon.ethereum.eth.sync.fastsync; import tech.pegasys.pantheon.ethereum.eth.sync.ValidationPolicy; import tech.pegasys.pantheon.ethereum.mainnet.HeaderValidationMode; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; public class FastSyncValidationPolicy implements ValidationPolicy { private final float targetFullValidationRate; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/PivotBlockRetriever.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/PivotBlockRetriever.java index 6218eb7f11..3b8cd60f81 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/PivotBlockRetriever.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/PivotBlockRetriever.java @@ -17,7 +17,7 @@ import tech.pegasys.pantheon.ethereum.eth.manager.EthContext; import tech.pegasys.pantheon.ethereum.eth.manager.EthPeer; import tech.pegasys.pantheon.ethereum.eth.sync.tasks.RetryingGetHeaderFromPeerByNumberTask; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.Collection; import java.util.List; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncChainDownloader.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncChainDownloader.java index 5960c6217c..2fce036e0f 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncChainDownloader.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncChainDownloader.java @@ -19,7 +19,7 @@ import tech.pegasys.pantheon.ethereum.eth.sync.PipelineChainDownloader; import tech.pegasys.pantheon.ethereum.eth.sync.SynchronizerConfiguration; import tech.pegasys.pantheon.ethereum.eth.sync.state.SyncState; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; public class FullSyncChainDownloader { private FullSyncChainDownloader() {} diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncDownloadPipelineFactory.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncDownloadPipelineFactory.java index b15e99a5b7..bab21b576c 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncDownloadPipelineFactory.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncDownloadPipelineFactory.java @@ -27,8 +27,8 @@ import tech.pegasys.pantheon.ethereum.eth.sync.ValidationPolicy; import tech.pegasys.pantheon.ethereum.eth.sync.state.SyncTarget; import tech.pegasys.pantheon.ethereum.mainnet.HeaderValidationMode; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.services.pipeline.Pipeline; import tech.pegasys.pantheon.services.pipeline.PipelineBuilder; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncDownloader.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncDownloader.java index 8559071d3c..b0f1eb8cd8 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncDownloader.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncDownloader.java @@ -19,7 +19,7 @@ import tech.pegasys.pantheon.ethereum.eth.sync.SynchronizerConfiguration; import tech.pegasys.pantheon.ethereum.eth.sync.TrailingPeerRequirements; import tech.pegasys.pantheon.ethereum.eth.sync.state.SyncState; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; public class FullSyncDownloader { diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncTargetManager.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncTargetManager.java index 97a90a223c..29ba929115 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncTargetManager.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncTargetManager.java @@ -24,7 +24,7 @@ import tech.pegasys.pantheon.ethereum.eth.sync.SynchronizerConfiguration; import tech.pegasys.pantheon.ethereum.eth.sync.state.SyncTarget; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.Optional; import java.util.concurrent.CompletableFuture; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/CompleteBlocksTask.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/CompleteBlocksTask.java index 019a45f068..eb7a72afe8 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/CompleteBlocksTask.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/CompleteBlocksTask.java @@ -27,7 +27,7 @@ import tech.pegasys.pantheon.ethereum.eth.manager.task.AbstractPeerTask.PeerTask import tech.pegasys.pantheon.ethereum.eth.manager.task.AbstractRetryingPeerTask; import tech.pegasys.pantheon.ethereum.eth.manager.task.GetBodiesFromPeerTask; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.Collection; import java.util.List; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/DetermineCommonAncestorTask.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/DetermineCommonAncestorTask.java index 6b4a36598a..c80b3f9e6e 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/DetermineCommonAncestorTask.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/DetermineCommonAncestorTask.java @@ -21,7 +21,7 @@ import tech.pegasys.pantheon.ethereum.eth.manager.task.AbstractPeerTask; import tech.pegasys.pantheon.ethereum.eth.manager.task.GetHeadersFromPeerByNumberTask; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; import tech.pegasys.pantheon.ethereum.util.BlockchainUtil; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.List; import java.util.OptionalInt; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/DownloadHeaderSequenceTask.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/DownloadHeaderSequenceTask.java index 2f3c9dab53..b3f2d8f3af 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/DownloadHeaderSequenceTask.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/DownloadHeaderSequenceTask.java @@ -30,7 +30,7 @@ import tech.pegasys.pantheon.ethereum.mainnet.BlockHeaderValidator; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSpec; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.Arrays; import java.util.Collection; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/GetReceiptsForHeadersTask.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/GetReceiptsForHeadersTask.java index f1a9334e4d..ad52273c28 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/GetReceiptsForHeadersTask.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/GetReceiptsForHeadersTask.java @@ -24,7 +24,7 @@ import tech.pegasys.pantheon.ethereum.eth.manager.EthPeer; import tech.pegasys.pantheon.ethereum.eth.manager.task.AbstractPeerTask.PeerTaskResult; import tech.pegasys.pantheon.ethereum.eth.manager.task.AbstractRetryingPeerTask; import tech.pegasys.pantheon.ethereum.eth.manager.task.GetReceiptsFromPeerTask; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.HashMap; import java.util.List; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/PersistBlockTask.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/PersistBlockTask.java index adf643afe4..e4e01609e2 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/PersistBlockTask.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/PersistBlockTask.java @@ -22,7 +22,7 @@ import tech.pegasys.pantheon.ethereum.eth.sync.tasks.exceptions.InvalidBlockExce import tech.pegasys.pantheon.ethereum.mainnet.HeaderValidationMode; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSpec; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.ArrayList; import java.util.List; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/RetryingGetHeaderFromPeerByNumberTask.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/RetryingGetHeaderFromPeerByNumberTask.java index e1e8e5978e..a1012ff379 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/RetryingGetHeaderFromPeerByNumberTask.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/RetryingGetHeaderFromPeerByNumberTask.java @@ -19,7 +19,7 @@ import tech.pegasys.pantheon.ethereum.eth.manager.task.AbstractGetHeadersFromPee import tech.pegasys.pantheon.ethereum.eth.manager.task.AbstractRetryingPeerTask; import tech.pegasys.pantheon.ethereum.eth.manager.task.GetHeadersFromPeerByNumberTask; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.Collection; import java.util.List; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/CompleteTaskStep.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/CompleteTaskStep.java index f4171aaca7..7c1e7e7576 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/CompleteTaskStep.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/CompleteTaskStep.java @@ -14,10 +14,10 @@ package tech.pegasys.pantheon.ethereum.eth.sync.worldstate; import tech.pegasys.pantheon.ethereum.core.BlockHeader; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateStorage; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; import tech.pegasys.pantheon.metrics.RunnableCounter; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import tech.pegasys.pantheon.services.tasks.Task; import java.text.DecimalFormat; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/LoadLocalDataStep.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/LoadLocalDataStep.java index f89a6737b8..4789be7759 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/LoadLocalDataStep.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/LoadLocalDataStep.java @@ -13,9 +13,9 @@ package tech.pegasys.pantheon.ethereum.eth.sync.worldstate; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateStorage; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import tech.pegasys.pantheon.services.pipeline.Pipe; import tech.pegasys.pantheon.services.tasks.Task; import tech.pegasys.pantheon.util.bytes.BytesValue; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/RequestDataStep.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/RequestDataStep.java index 46a279e029..2f881f5c9b 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/RequestDataStep.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/RequestDataStep.java @@ -18,7 +18,7 @@ import tech.pegasys.pantheon.ethereum.eth.manager.EthContext; import tech.pegasys.pantheon.ethereum.eth.manager.exceptions.EthTaskException; import tech.pegasys.pantheon.ethereum.eth.manager.task.EthTask; import tech.pegasys.pantheon.ethereum.eth.manager.task.RetryingGetNodeDataFromPeerTask; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.services.tasks.Task; import tech.pegasys.pantheon.util.ExceptionUtils; import tech.pegasys.pantheon.util.bytes.BytesValue; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/WorldStateDownloadProcess.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/WorldStateDownloadProcess.java index 9aa49ea242..0eac69fe81 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/WorldStateDownloadProcess.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/WorldStateDownloadProcess.java @@ -17,10 +17,10 @@ import static tech.pegasys.pantheon.services.pipeline.PipelineBuilder.createPipe import tech.pegasys.pantheon.ethereum.core.BlockHeader; import tech.pegasys.pantheon.ethereum.eth.manager.EthScheduler; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; import tech.pegasys.pantheon.services.pipeline.Pipe; import tech.pegasys.pantheon.services.pipeline.Pipeline; import tech.pegasys.pantheon.services.pipeline.PipelineBuilder; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/WorldStateDownloader.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/WorldStateDownloader.java index bfcb43b4f3..2727eda4c4 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/WorldStateDownloader.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/WorldStateDownloader.java @@ -16,8 +16,8 @@ import tech.pegasys.pantheon.ethereum.core.BlockHeader; import tech.pegasys.pantheon.ethereum.core.Hash; import tech.pegasys.pantheon.ethereum.eth.manager.EthContext; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateStorage; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.services.tasks.CachingTaskCollection; import java.time.Clock; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/transactions/PendingTransactions.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/transactions/PendingTransactions.java index 6f95ed50a7..363e7c877a 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/transactions/PendingTransactions.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/transactions/PendingTransactions.java @@ -18,10 +18,10 @@ import tech.pegasys.pantheon.ethereum.core.AccountTransactionOrder; import tech.pegasys.pantheon.ethereum.core.Address; import tech.pegasys.pantheon.ethereum.core.Hash; import tech.pegasys.pantheon.ethereum.core.Transaction; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; import tech.pegasys.pantheon.util.Subscribers; import java.time.Clock; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/transactions/TransactionPool.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/transactions/TransactionPool.java index f6a038f6db..c679a8a3ba 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/transactions/TransactionPool.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/transactions/TransactionPool.java @@ -33,10 +33,10 @@ import tech.pegasys.pantheon.ethereum.mainnet.TransactionValidationParams; import tech.pegasys.pantheon.ethereum.mainnet.TransactionValidator; import tech.pegasys.pantheon.ethereum.mainnet.TransactionValidator.TransactionInvalidReason; import tech.pegasys.pantheon.ethereum.mainnet.ValidationResult; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; import java.util.Collection; import java.util.HashSet; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/transactions/TransactionPoolFactory.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/transactions/TransactionPoolFactory.java index 092d1307ae..6c6aaf5016 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/transactions/TransactionPoolFactory.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/transactions/TransactionPoolFactory.java @@ -18,8 +18,8 @@ import tech.pegasys.pantheon.ethereum.eth.manager.EthContext; import tech.pegasys.pantheon.ethereum.eth.messages.EthPV62; import tech.pegasys.pantheon.ethereum.eth.sync.state.SyncState; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.time.Clock; diff --git a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/transactions/TransactionsMessageProcessor.java b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/transactions/TransactionsMessageProcessor.java index 05a0533895..15596a2fdc 100644 --- a/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/transactions/TransactionsMessageProcessor.java +++ b/ethereum/eth/src/main/java/tech/pegasys/pantheon/ethereum/eth/transactions/TransactionsMessageProcessor.java @@ -20,8 +20,8 @@ import tech.pegasys.pantheon.ethereum.eth.manager.EthPeer; import tech.pegasys.pantheon.ethereum.eth.messages.TransactionsMessage; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason; import tech.pegasys.pantheon.ethereum.rlp.RLPException; -import tech.pegasys.pantheon.metrics.Counter; import tech.pegasys.pantheon.metrics.RunnableCounter; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import java.time.Duration; import java.time.Instant; diff --git a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/manager/EthProtocolManagerTest.java b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/manager/EthProtocolManagerTest.java index 71bbc8b1aa..f48b86aa9e 100644 --- a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/manager/EthProtocolManagerTest.java +++ b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/manager/EthProtocolManagerTest.java @@ -61,8 +61,8 @@ import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.DefaultMessage; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.MessageData; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.RawMessage; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateArchive; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.testutil.TestClock; import tech.pegasys.pantheon.util.bytes.BytesValue; import tech.pegasys.pantheon.util.uint.UInt256; diff --git a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/manager/ethtaskutils/AbstractMessageTaskTest.java b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/manager/ethtaskutils/AbstractMessageTaskTest.java index 2aa21e3586..5262479e34 100644 --- a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/manager/ethtaskutils/AbstractMessageTaskTest.java +++ b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/manager/ethtaskutils/AbstractMessageTaskTest.java @@ -25,8 +25,8 @@ import tech.pegasys.pantheon.ethereum.eth.manager.RespondingEthPeer; import tech.pegasys.pantheon.ethereum.eth.manager.RespondingEthPeer.Responder; import tech.pegasys.pantheon.ethereum.eth.manager.task.EthTask; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.concurrent.CompletableFuture; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractEthTaskTest.java b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractEthTaskTest.java index bce311014b..ab87c21931 100644 --- a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractEthTaskTest.java +++ b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/manager/task/AbstractEthTaskTest.java @@ -16,8 +16,8 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import tech.pegasys.pantheon.metrics.OperationTimer; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.OperationTimer; import java.util.Arrays; import java.util.List; diff --git a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/manager/task/WaitForPeerTaskTest.java b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/manager/task/WaitForPeerTaskTest.java index b929d3ed8f..1d12e6e29e 100644 --- a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/manager/task/WaitForPeerTaskTest.java +++ b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/manager/task/WaitForPeerTaskTest.java @@ -17,8 +17,8 @@ import static org.assertj.core.api.Assertions.assertThat; import tech.pegasys.pantheon.ethereum.eth.manager.EthContext; import tech.pegasys.pantheon.ethereum.eth.manager.EthProtocolManager; import tech.pegasys.pantheon.ethereum.eth.manager.EthProtocolManagerTestUtil; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; diff --git a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/manager/task/WaitForPeersTaskTest.java b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/manager/task/WaitForPeersTaskTest.java index 8ab315243a..6acd0cbfb5 100644 --- a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/manager/task/WaitForPeersTaskTest.java +++ b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/manager/task/WaitForPeersTaskTest.java @@ -17,8 +17,8 @@ import static org.assertj.core.api.Assertions.assertThat; import tech.pegasys.pantheon.ethereum.eth.manager.EthContext; import tech.pegasys.pantheon.ethereum.eth.manager.EthProtocolManager; import tech.pegasys.pantheon.ethereum.eth.manager.EthProtocolManagerTestUtil; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; diff --git a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/BlockPropagationManagerTest.java b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/BlockPropagationManagerTest.java index 126b8a87c8..ab4b4b968e 100644 --- a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/BlockPropagationManagerTest.java +++ b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/BlockPropagationManagerTest.java @@ -46,8 +46,8 @@ import tech.pegasys.pantheon.ethereum.eth.sync.state.PendingBlocks; import tech.pegasys.pantheon.ethereum.eth.sync.state.SyncState; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSpec; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.testutil.TestClock; import tech.pegasys.pantheon.util.uint.UInt256; diff --git a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/CheckpointHeaderFetcherTest.java b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/CheckpointHeaderFetcherTest.java index 33d726107b..0d9d2eba95 100644 --- a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/CheckpointHeaderFetcherTest.java +++ b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/CheckpointHeaderFetcherTest.java @@ -27,8 +27,8 @@ import tech.pegasys.pantheon.ethereum.eth.manager.EthProtocolManagerTestUtil; import tech.pegasys.pantheon.ethereum.eth.manager.RespondingEthPeer; import tech.pegasys.pantheon.ethereum.eth.manager.RespondingEthPeer.Responder; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.List; import java.util.Optional; diff --git a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/PivotBlockRetrieverTest.java b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/PivotBlockRetrieverTest.java index bb7d4b4849..83424125f1 100644 --- a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/PivotBlockRetrieverTest.java +++ b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/fastsync/PivotBlockRetrieverTest.java @@ -26,8 +26,8 @@ import tech.pegasys.pantheon.ethereum.eth.manager.EthProtocolManagerTestUtil; import tech.pegasys.pantheon.ethereum.eth.manager.RespondingEthPeer; import tech.pegasys.pantheon.ethereum.eth.manager.RespondingEthPeer.Responder; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.bytes.BytesValue; import java.util.Optional; diff --git a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncChainDownloaderForkTest.java b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncChainDownloaderForkTest.java index b41324ba00..8ae7f89d41 100644 --- a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncChainDownloaderForkTest.java +++ b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncChainDownloaderForkTest.java @@ -29,8 +29,8 @@ import tech.pegasys.pantheon.ethereum.eth.sync.SynchronizerConfiguration; import tech.pegasys.pantheon.ethereum.eth.sync.state.SyncState; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.uint.UInt256; import org.junit.After; diff --git a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncChainDownloaderTest.java b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncChainDownloaderTest.java index d8e44da974..daadf41ad0 100644 --- a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncChainDownloaderTest.java +++ b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncChainDownloaderTest.java @@ -39,8 +39,8 @@ import tech.pegasys.pantheon.ethereum.eth.sync.state.SyncState; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.MessageData; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.uint.UInt256; import java.util.ArrayList; diff --git a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncDownloaderTest.java b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncDownloaderTest.java index e33839121f..ec48251260 100644 --- a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncDownloaderTest.java +++ b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/fullsync/FullSyncDownloaderTest.java @@ -26,8 +26,8 @@ import tech.pegasys.pantheon.ethereum.eth.sync.SynchronizerConfiguration; import tech.pegasys.pantheon.ethereum.eth.sync.TrailingPeerRequirements; import tech.pegasys.pantheon.ethereum.eth.sync.state.SyncState; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import org.junit.After; import org.junit.Before; diff --git a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/DetermineCommonAncestorTaskParameterizedTest.java b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/DetermineCommonAncestorTaskParameterizedTest.java index 68ef637161..184bb2af1b 100644 --- a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/DetermineCommonAncestorTaskParameterizedTest.java +++ b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/DetermineCommonAncestorTaskParameterizedTest.java @@ -32,8 +32,8 @@ import tech.pegasys.pantheon.ethereum.mainnet.MainnetBlockHeaderFunctions; import tech.pegasys.pantheon.ethereum.mainnet.MainnetProtocolSchedule; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateArchive; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.uint.UInt256; import java.io.IOException; diff --git a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/DetermineCommonAncestorTaskTest.java b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/DetermineCommonAncestorTaskTest.java index 22a5324eff..329b50c97b 100644 --- a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/DetermineCommonAncestorTaskTest.java +++ b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/DetermineCommonAncestorTaskTest.java @@ -44,8 +44,8 @@ import tech.pegasys.pantheon.ethereum.mainnet.MainnetProtocolSchedule; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateArchive; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.ExceptionUtils; import java.util.List; diff --git a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/PersistBlockTaskTest.java b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/PersistBlockTaskTest.java index 2740e80256..b2069fde70 100644 --- a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/PersistBlockTaskTest.java +++ b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/tasks/PersistBlockTaskTest.java @@ -24,8 +24,8 @@ import tech.pegasys.pantheon.ethereum.core.BlockchainSetupUtil; import tech.pegasys.pantheon.ethereum.eth.sync.tasks.exceptions.InvalidBlockException; import tech.pegasys.pantheon.ethereum.mainnet.HeaderValidationMode; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.Arrays; import java.util.Collections; diff --git a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/transactions/TestNode.java b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/transactions/TestNode.java index e6c278aee1..f7f3e98f9f 100644 --- a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/transactions/TestNode.java +++ b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/transactions/TestNode.java @@ -47,8 +47,8 @@ import tech.pegasys.pantheon.ethereum.p2p.peers.Peer; import tech.pegasys.pantheon.ethereum.p2p.rlpx.connections.PeerConnection; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateArchive; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.testutil.TestClock; import tech.pegasys.pantheon.util.bytes.BytesValue; diff --git a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/transactions/TransactionPoolTest.java b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/transactions/TransactionPoolTest.java index b6c6cfe204..3e44dc894e 100644 --- a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/transactions/TransactionPoolTest.java +++ b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/transactions/TransactionPoolTest.java @@ -59,8 +59,8 @@ import tech.pegasys.pantheon.ethereum.mainnet.TransactionValidationParams; import tech.pegasys.pantheon.ethereum.mainnet.TransactionValidator; import tech.pegasys.pantheon.ethereum.mainnet.TransactionValidator.TransactionInvalidReason; import tech.pegasys.pantheon.ethereum.mainnet.ValidationResult; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.testutil.TestClock; import tech.pegasys.pantheon.util.uint.UInt256; diff --git a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/transactions/TransactionsMessageProcessorTest.java b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/transactions/TransactionsMessageProcessorTest.java index fc881e3ee4..4147cd62d0 100644 --- a/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/transactions/TransactionsMessageProcessorTest.java +++ b/ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/transactions/TransactionsMessageProcessorTest.java @@ -23,7 +23,7 @@ import tech.pegasys.pantheon.ethereum.core.BlockDataGenerator; import tech.pegasys.pantheon.ethereum.core.Transaction; import tech.pegasys.pantheon.ethereum.eth.manager.EthPeer; import tech.pegasys.pantheon.ethereum.eth.messages.TransactionsMessage; -import tech.pegasys.pantheon.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import com.google.common.collect.ImmutableSet; import org.junit.Test; diff --git a/ethereum/jsonrpc/src/integration-test/java/tech/pegasys/pantheon/ethereum/jsonrpc/JsonRpcTestMethodsFactory.java b/ethereum/jsonrpc/src/integration-test/java/tech/pegasys/pantheon/ethereum/jsonrpc/JsonRpcTestMethodsFactory.java index f05bbd696c..9817044f61 100644 --- a/ethereum/jsonrpc/src/integration-test/java/tech/pegasys/pantheon/ethereum/jsonrpc/JsonRpcTestMethodsFactory.java +++ b/ethereum/jsonrpc/src/integration-test/java/tech/pegasys/pantheon/ethereum/jsonrpc/JsonRpcTestMethodsFactory.java @@ -39,7 +39,7 @@ import tech.pegasys.pantheon.ethereum.p2p.network.P2PNetwork; import tech.pegasys.pantheon.ethereum.permissioning.AccountLocalConfigPermissioningController; import tech.pegasys.pantheon.ethereum.permissioning.NodeLocalConfigPermissioningController; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateArchive; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.metrics.ObservableMetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; import tech.pegasys.pantheon.metrics.prometheus.MetricsConfiguration; @@ -85,7 +85,7 @@ public class JsonRpcTestMethodsFactory { new FilterManager( blockchainQueries, transactionPool, new FilterIdGenerator(), new FilterRepository()); final EthHashMiningCoordinator miningCoordinator = mock(EthHashMiningCoordinator.class); - final MetricsSystem metricsSystem = new NoOpMetricsSystem(); + final ObservableMetricsSystem metricsSystem = new NoOpMetricsSystem(); final Optional accountWhitelistController = Optional.of(mock(AccountLocalConfigPermissioningController.class)); final Optional nodeWhitelistController = diff --git a/ethereum/jsonrpc/src/integration-test/java/tech/pegasys/pantheon/ethereum/jsonrpc/methods/EthGetFilterChangesIntegrationTest.java b/ethereum/jsonrpc/src/integration-test/java/tech/pegasys/pantheon/ethereum/jsonrpc/methods/EthGetFilterChangesIntegrationTest.java index cf21183470..b1f54f61c5 100644 --- a/ethereum/jsonrpc/src/integration-test/java/tech/pegasys/pantheon/ethereum/jsonrpc/methods/EthGetFilterChangesIntegrationTest.java +++ b/ethereum/jsonrpc/src/integration-test/java/tech/pegasys/pantheon/ethereum/jsonrpc/methods/EthGetFilterChangesIntegrationTest.java @@ -50,8 +50,8 @@ import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcError; import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcErrorResponse; import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse; import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.testutil.TestClock; import tech.pegasys.pantheon.util.bytes.BytesValue; import tech.pegasys.pantheon.util.uint.UInt256; diff --git a/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/JsonRpcHttpService.java b/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/JsonRpcHttpService.java index dd6921f080..2509c09796 100755 --- a/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/JsonRpcHttpService.java +++ b/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/JsonRpcHttpService.java @@ -30,12 +30,11 @@ import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcNoRespons import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse; import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponseType; import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcUnauthorizedResponse; -import tech.pegasys.pantheon.metrics.LabelledMetric; -import tech.pegasys.pantheon.metrics.MetricsSystem; -import tech.pegasys.pantheon.metrics.OperationTimer; -import tech.pegasys.pantheon.metrics.OperationTimer.TimingContext; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; import tech.pegasys.pantheon.nat.upnp.UpnpNatManager; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; +import tech.pegasys.pantheon.plugin.services.metrics.OperationTimer; import tech.pegasys.pantheon.util.NetworkUtility; import java.net.InetSocketAddress; @@ -493,7 +492,8 @@ public class JsonRpcHttpService { if (AuthenticationUtils.isPermitted(authenticationService, user, method)) { // Generate response - try (final TimingContext ignored = requestTimer.labels(request.getMethod()).startTimer()) { + try (final OperationTimer.TimingContext ignored = + requestTimer.labels(request.getMethod()).startTimer()) { return method.response(request); } catch (final InvalidJsonRpcParameters e) { LOG.debug("Invalid Params", e); diff --git a/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/JsonRpcMethodsFactory.java b/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/JsonRpcMethodsFactory.java index 6558e185dd..1856a88fd5 100644 --- a/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/JsonRpcMethodsFactory.java +++ b/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/JsonRpcMethodsFactory.java @@ -123,7 +123,7 @@ import tech.pegasys.pantheon.ethereum.privacy.markertransaction.PrivateMarkerTra import tech.pegasys.pantheon.ethereum.privacy.markertransaction.RandomSigningPrivateMarkerTransactionFactory; import tech.pegasys.pantheon.ethereum.transaction.TransactionSimulator; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateArchive; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.metrics.ObservableMetricsSystem; import tech.pegasys.pantheon.metrics.prometheus.MetricsConfiguration; import java.math.BigInteger; @@ -149,7 +149,7 @@ public class JsonRpcMethodsFactory { final TransactionPool transactionPool, final ProtocolSchedule protocolSchedule, final MiningCoordinator miningCoordinator, - final MetricsSystem metricsSystem, + final ObservableMetricsSystem metricsSystem, final Set supportedCapabilities, final Collection rpcApis, final FilterManager filterManager, @@ -194,7 +194,7 @@ public class JsonRpcMethodsFactory { final FilterManager filterManager, final TransactionPool transactionPool, final MiningCoordinator miningCoordinator, - final MetricsSystem metricsSystem, + final ObservableMetricsSystem metricsSystem, final Set supportedCapabilities, final Optional accountsWhitelistController, final Optional nodeWhitelistController, diff --git a/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/internal/methods/DebugMetrics.java b/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/internal/methods/DebugMetrics.java index b0a04bf503..22c77bf3e9 100644 --- a/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/internal/methods/DebugMetrics.java +++ b/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/internal/methods/DebugMetrics.java @@ -16,7 +16,7 @@ import tech.pegasys.pantheon.ethereum.jsonrpc.RpcMethod; import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest; import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcResponse; import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.metrics.ObservableMetricsSystem; import tech.pegasys.pantheon.metrics.Observation; import java.util.HashMap; @@ -25,9 +25,9 @@ import java.util.Map; public class DebugMetrics implements JsonRpcMethod { - private final MetricsSystem metricsSystem; + private final ObservableMetricsSystem metricsSystem; - public DebugMetrics(final MetricsSystem metricsSystem) { + public DebugMetrics(final ObservableMetricsSystem metricsSystem) { this.metricsSystem = metricsSystem; } diff --git a/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/websocket/subscription/SubscriptionManager.java b/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/websocket/subscription/SubscriptionManager.java index debf7b690a..4225f15deb 100644 --- a/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/websocket/subscription/SubscriptionManager.java +++ b/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/websocket/subscription/SubscriptionManager.java @@ -17,10 +17,10 @@ import tech.pegasys.pantheon.ethereum.jsonrpc.websocket.subscription.request.Sub import tech.pegasys.pantheon.ethereum.jsonrpc.websocket.subscription.request.SubscriptionType; import tech.pegasys.pantheon.ethereum.jsonrpc.websocket.subscription.request.UnsubscribeRequest; import tech.pegasys.pantheon.ethereum.jsonrpc.websocket.subscription.response.SubscriptionResponse; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; import java.util.List; import java.util.Map; diff --git a/ethereum/jsonrpc/src/test/java/tech/pegasys/pantheon/ethereum/jsonrpc/internal/methods/DebugMetricsTest.java b/ethereum/jsonrpc/src/test/java/tech/pegasys/pantheon/ethereum/jsonrpc/internal/methods/DebugMetricsTest.java index 474436e7a7..3ce997b05f 100644 --- a/ethereum/jsonrpc/src/test/java/tech/pegasys/pantheon/ethereum/jsonrpc/internal/methods/DebugMetricsTest.java +++ b/ethereum/jsonrpc/src/test/java/tech/pegasys/pantheon/ethereum/jsonrpc/internal/methods/DebugMetricsTest.java @@ -21,7 +21,7 @@ import static tech.pegasys.pantheon.metrics.PantheonMetricCategory.RPC; import tech.pegasys.pantheon.ethereum.jsonrpc.internal.JsonRpcRequest; import tech.pegasys.pantheon.ethereum.jsonrpc.internal.response.JsonRpcSuccessResponse; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.metrics.ObservableMetricsSystem; import tech.pegasys.pantheon.metrics.Observation; import java.util.Collections; @@ -34,7 +34,7 @@ public class DebugMetricsTest { private static final JsonRpcRequest REQUEST = new JsonRpcRequest("2.0", "debug_metrics", new Object[0]); - private final MetricsSystem metricsSystem = mock(MetricsSystem.class); + private final ObservableMetricsSystem metricsSystem = mock(ObservableMetricsSystem.class); private final DebugMetrics method = new DebugMetrics(metricsSystem); diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/PeerDiscoveryAgent.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/PeerDiscoveryAgent.java index b48a5e7c45..b76aefbf74 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/PeerDiscoveryAgent.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/PeerDiscoveryAgent.java @@ -27,8 +27,8 @@ import tech.pegasys.pantheon.ethereum.p2p.discovery.internal.TimerUtil; import tech.pegasys.pantheon.ethereum.p2p.peers.EnodeURL; import tech.pegasys.pantheon.ethereum.p2p.peers.PeerId; import tech.pegasys.pantheon.ethereum.p2p.permissions.PeerPermissions; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.nat.upnp.UpnpNatManager; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.NetworkUtility; import tech.pegasys.pantheon.util.Subscribers; import tech.pegasys.pantheon.util.bytes.BytesValue; diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/VertxPeerDiscoveryAgent.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/VertxPeerDiscoveryAgent.java index 693fae42c0..45ca9e151b 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/VertxPeerDiscoveryAgent.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/VertxPeerDiscoveryAgent.java @@ -22,9 +22,9 @@ import tech.pegasys.pantheon.ethereum.p2p.discovery.internal.PeerDiscoveryContro import tech.pegasys.pantheon.ethereum.p2p.discovery.internal.TimerUtil; import tech.pegasys.pantheon.ethereum.p2p.discovery.internal.VertxTimerUtil; import tech.pegasys.pantheon.ethereum.p2p.permissions.PeerPermissions; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; import tech.pegasys.pantheon.nat.upnp.UpnpNatManager; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.NetworkUtility; import java.io.IOException; diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/DiscoveryProtocolLogger.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/DiscoveryProtocolLogger.java index 4bd66b07c7..1e65c4f902 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/DiscoveryProtocolLogger.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/DiscoveryProtocolLogger.java @@ -13,10 +13,10 @@ package tech.pegasys.pantheon.ethereum.p2p.discovery.internal; import tech.pegasys.pantheon.ethereum.p2p.peers.Peer; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/PeerDiscoveryController.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/PeerDiscoveryController.java index 38f869d27c..e44662417c 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/PeerDiscoveryController.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/discovery/internal/PeerDiscoveryController.java @@ -28,10 +28,10 @@ import tech.pegasys.pantheon.ethereum.p2p.discovery.PeerDiscoveryStatus; import tech.pegasys.pantheon.ethereum.p2p.peers.Peer; import tech.pegasys.pantheon.ethereum.p2p.peers.PeerId; import tech.pegasys.pantheon.ethereum.p2p.permissions.PeerPermissions; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; import tech.pegasys.pantheon.util.Subscribers; import tech.pegasys.pantheon.util.bytes.BytesValue; diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/network/DefaultP2PNetwork.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/network/DefaultP2PNetwork.java index bc58d90cc5..3bd0c28083 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/network/DefaultP2PNetwork.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/network/DefaultP2PNetwork.java @@ -39,8 +39,8 @@ import tech.pegasys.pantheon.ethereum.p2p.rlpx.RlpxAgent; import tech.pegasys.pantheon.ethereum.p2p.rlpx.connections.PeerConnection; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.Capability; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.nat.upnp.UpnpNatManager; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.bytes.BytesValue; import java.time.Duration; diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/network/NetworkRunner.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/network/NetworkRunner.java index 936952705d..e441586760 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/network/NetworkRunner.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/network/NetworkRunner.java @@ -15,10 +15,10 @@ package tech.pegasys.pantheon.ethereum.p2p.network; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.Capability; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.SubProtocol; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; import java.util.ArrayList; import java.util.Arrays; diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/RlpxAgent.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/RlpxAgent.java index 118a644873..879bf3f437 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/RlpxAgent.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/RlpxAgent.java @@ -32,9 +32,9 @@ import tech.pegasys.pantheon.ethereum.p2p.rlpx.connections.RlpxConnection; import tech.pegasys.pantheon.ethereum.p2p.rlpx.connections.netty.NettyConnectionInitializer; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.Capability; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import tech.pegasys.pantheon.util.FutureUtils; import tech.pegasys.pantheon.util.Subscribers; import tech.pegasys.pantheon.util.bytes.BytesValue; diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/AbstractPeerConnection.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/AbstractPeerConnection.java index 6250e5d97b..19976e34c0 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/AbstractPeerConnection.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/AbstractPeerConnection.java @@ -21,8 +21,8 @@ import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.SubProtocol; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.WireMessageCodes; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; import java.net.InetSocketAddress; import java.util.HashMap; diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/PeerConnectionEvents.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/PeerConnectionEvents.java index 1fff9ac1d4..11907c180b 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/PeerConnectionEvents.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/PeerConnectionEvents.java @@ -19,10 +19,10 @@ import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.DefaultMessage; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.Message; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.MessageData; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; import tech.pegasys.pantheon.util.Subscribers; import java.util.Map; diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/AbstractHandshakeHandler.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/AbstractHandshakeHandler.java index 544efe3c93..18fb7e1538 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/AbstractHandshakeHandler.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/AbstractHandshakeHandler.java @@ -24,7 +24,7 @@ import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.HelloMessage; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.WireMessageCodes; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.bytes.BytesValue; import java.util.List; diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/DeFramer.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/DeFramer.java index 60f9dddd8c..22a9ff3746 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/DeFramer.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/DeFramer.java @@ -33,10 +33,10 @@ import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.D import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.HelloMessage; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.WireMessageCodes; import tech.pegasys.pantheon.ethereum.rlp.RLPException; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; import java.io.IOException; import java.net.InetSocketAddress; diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/HandshakeHandlerInbound.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/HandshakeHandlerInbound.java index 4448cd1625..5414cbeab7 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/HandshakeHandlerInbound.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/HandshakeHandlerInbound.java @@ -18,7 +18,7 @@ import tech.pegasys.pantheon.ethereum.p2p.rlpx.connections.PeerConnection; import tech.pegasys.pantheon.ethereum.p2p.rlpx.connections.PeerConnectionEventDispatcher; import tech.pegasys.pantheon.ethereum.p2p.rlpx.handshake.Handshaker; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.SubProtocol; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.List; import java.util.Optional; diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/HandshakeHandlerOutbound.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/HandshakeHandlerOutbound.java index caff4e56c4..0bcf769ab1 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/HandshakeHandlerOutbound.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/HandshakeHandlerOutbound.java @@ -19,7 +19,7 @@ import tech.pegasys.pantheon.ethereum.p2p.rlpx.connections.PeerConnection; import tech.pegasys.pantheon.ethereum.p2p.rlpx.connections.PeerConnectionEventDispatcher; import tech.pegasys.pantheon.ethereum.p2p.rlpx.handshake.Handshaker; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.SubProtocol; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.List; import java.util.Optional; diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/NettyConnectionInitializer.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/NettyConnectionInitializer.java index a86ff6a525..a3e9edc3e6 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/NettyConnectionInitializer.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/NettyConnectionInitializer.java @@ -24,8 +24,8 @@ import tech.pegasys.pantheon.ethereum.p2p.rlpx.ConnectCallback; import tech.pegasys.pantheon.ethereum.p2p.rlpx.connections.ConnectionInitializer; import tech.pegasys.pantheon.ethereum.p2p.rlpx.connections.PeerConnection; import tech.pegasys.pantheon.ethereum.p2p.rlpx.connections.PeerConnectionEventDispatcher; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.Subscribers; import java.net.InetSocketAddress; diff --git a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/NettyPeerConnection.java b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/NettyPeerConnection.java index dabb3f18f7..42bf8f7413 100644 --- a/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/NettyPeerConnection.java +++ b/ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/netty/NettyPeerConnection.java @@ -22,8 +22,8 @@ import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.Capability; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.CapabilityMultiplexer; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.MessageData; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.PeerInfo; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; import java.net.InetSocketAddress; import java.util.concurrent.Callable; diff --git a/ethereum/p2p/src/test/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/RlpxAgentTest.java b/ethereum/p2p/src/test/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/RlpxAgentTest.java index 6dd972d23a..380ddafbf2 100644 --- a/ethereum/p2p/src/test/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/RlpxAgentTest.java +++ b/ethereum/p2p/src/test/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/RlpxAgentTest.java @@ -47,8 +47,8 @@ import tech.pegasys.pantheon.ethereum.p2p.rlpx.connections.PeerConnectionEvents; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.Capability; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.PingMessage; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.bytes.BytesValue; import java.util.Arrays; diff --git a/ethereum/p2p/src/test/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/AbstractPeerConnectionTest.java b/ethereum/p2p/src/test/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/AbstractPeerConnectionTest.java index 9d85c13fb3..a9fc5ef38b 100644 --- a/ethereum/p2p/src/test/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/AbstractPeerConnectionTest.java +++ b/ethereum/p2p/src/test/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/AbstractPeerConnectionTest.java @@ -27,9 +27,9 @@ import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.PeerInfo; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.PingMessage; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.WireMessageCodes; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; import tech.pegasys.pantheon.util.bytes.BytesValue; import java.net.InetSocketAddress; diff --git a/ethereum/p2p/src/test/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/MockPeerConnection.java b/ethereum/p2p/src/test/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/MockPeerConnection.java index 097c75cdda..868b3f546f 100644 --- a/ethereum/p2p/src/test/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/MockPeerConnection.java +++ b/ethereum/p2p/src/test/java/tech/pegasys/pantheon/ethereum/p2p/rlpx/connections/MockPeerConnection.java @@ -23,9 +23,9 @@ import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.MockSubProtocol; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.PeerInfo; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.SubProtocol; import tech.pegasys.pantheon.ethereum.p2p.rlpx.wire.messages.DisconnectMessage.DisconnectReason; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; import java.net.InetSocketAddress; import java.util.Arrays; diff --git a/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/AccountLocalConfigPermissioningController.java b/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/AccountLocalConfigPermissioningController.java index deca839301..2000983cb8 100644 --- a/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/AccountLocalConfigPermissioningController.java +++ b/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/AccountLocalConfigPermissioningController.java @@ -16,9 +16,9 @@ import tech.pegasys.pantheon.ethereum.core.Address; import tech.pegasys.pantheon.ethereum.core.Hash; import tech.pegasys.pantheon.ethereum.core.Transaction; import tech.pegasys.pantheon.ethereum.permissioning.account.TransactionPermissioningProvider; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import tech.pegasys.pantheon.util.bytes.BytesValue; import java.io.IOException; diff --git a/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/NodeLocalConfigPermissioningController.java b/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/NodeLocalConfigPermissioningController.java index 367441d218..be49126fdf 100644 --- a/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/NodeLocalConfigPermissioningController.java +++ b/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/NodeLocalConfigPermissioningController.java @@ -15,9 +15,9 @@ package tech.pegasys.pantheon.ethereum.permissioning; import tech.pegasys.pantheon.ethereum.p2p.peers.EnodeURL; import tech.pegasys.pantheon.ethereum.permissioning.node.NodePermissioningProvider; import tech.pegasys.pantheon.ethereum.permissioning.node.NodeWhitelistUpdatedEvent; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import tech.pegasys.pantheon.util.Subscribers; import tech.pegasys.pantheon.util.bytes.BytesValue; diff --git a/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/NodePermissioningControllerFactory.java b/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/NodePermissioningControllerFactory.java index 069a3074c5..64998f2a5f 100644 --- a/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/NodePermissioningControllerFactory.java +++ b/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/NodePermissioningControllerFactory.java @@ -18,7 +18,7 @@ import tech.pegasys.pantheon.ethereum.permissioning.node.NodePermissioningContro import tech.pegasys.pantheon.ethereum.permissioning.node.NodePermissioningProvider; import tech.pegasys.pantheon.ethereum.permissioning.node.provider.SyncStatusNodePermissioningProvider; import tech.pegasys.pantheon.ethereum.transaction.TransactionSimulator; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.bytes.BytesValue; import java.util.ArrayList; diff --git a/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/NodeSmartContractPermissioningController.java b/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/NodeSmartContractPermissioningController.java index 01ad0d5f0d..9fe4887752 100644 --- a/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/NodeSmartContractPermissioningController.java +++ b/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/NodeSmartContractPermissioningController.java @@ -21,9 +21,9 @@ import tech.pegasys.pantheon.ethereum.permissioning.node.NodePermissioningProvid import tech.pegasys.pantheon.ethereum.transaction.CallParameter; import tech.pegasys.pantheon.ethereum.transaction.TransactionSimulator; import tech.pegasys.pantheon.ethereum.transaction.TransactionSimulatorResult; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import tech.pegasys.pantheon.util.bytes.BytesValue; import tech.pegasys.pantheon.util.bytes.BytesValues; diff --git a/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/TransactionSmartContractPermissioningController.java b/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/TransactionSmartContractPermissioningController.java index 5853311b95..ced2f87311 100644 --- a/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/TransactionSmartContractPermissioningController.java +++ b/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/TransactionSmartContractPermissioningController.java @@ -22,9 +22,9 @@ import tech.pegasys.pantheon.ethereum.permissioning.account.TransactionPermissio import tech.pegasys.pantheon.ethereum.transaction.CallParameter; import tech.pegasys.pantheon.ethereum.transaction.TransactionSimulator; import tech.pegasys.pantheon.ethereum.transaction.TransactionSimulatorResult; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import tech.pegasys.pantheon.util.bytes.BytesValue; import tech.pegasys.pantheon.util.bytes.BytesValues; diff --git a/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/account/AccountPermissioningControllerFactory.java b/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/account/AccountPermissioningControllerFactory.java index 9894b7ec1a..354c0cba98 100644 --- a/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/account/AccountPermissioningControllerFactory.java +++ b/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/account/AccountPermissioningControllerFactory.java @@ -22,7 +22,7 @@ import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration; import tech.pegasys.pantheon.ethereum.permissioning.SmartContractPermissioningConfiguration; import tech.pegasys.pantheon.ethereum.permissioning.TransactionSmartContractPermissioningController; import tech.pegasys.pantheon.ethereum.transaction.TransactionSimulator; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.util.bytes.BytesValue; import java.util.Optional; diff --git a/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/node/provider/SyncStatusNodePermissioningProvider.java b/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/node/provider/SyncStatusNodePermissioningProvider.java index 271e756c6b..9493c132fb 100644 --- a/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/node/provider/SyncStatusNodePermissioningProvider.java +++ b/ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/node/provider/SyncStatusNodePermissioningProvider.java @@ -18,9 +18,9 @@ import tech.pegasys.pantheon.ethereum.core.SyncStatus; import tech.pegasys.pantheon.ethereum.core.Synchronizer; import tech.pegasys.pantheon.ethereum.p2p.peers.EnodeURL; import tech.pegasys.pantheon.ethereum.permissioning.node.NodePermissioningProvider; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import java.net.URI; import java.util.Collection; diff --git a/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/AccountLocalConfigPermissioningControllerTest.java b/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/AccountLocalConfigPermissioningControllerTest.java index 991ad85d92..9ada586e74 100644 --- a/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/AccountLocalConfigPermissioningControllerTest.java +++ b/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/AccountLocalConfigPermissioningControllerTest.java @@ -25,9 +25,9 @@ import static org.mockito.Mockito.when; import tech.pegasys.pantheon.ethereum.core.Address; import tech.pegasys.pantheon.ethereum.core.Transaction; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import java.io.IOException; import java.nio.charset.StandardCharsets; diff --git a/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/NodeLocalConfigPermissioningControllerTest.java b/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/NodeLocalConfigPermissioningControllerTest.java index 79297a755d..68303a8ea1 100644 --- a/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/NodeLocalConfigPermissioningControllerTest.java +++ b/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/NodeLocalConfigPermissioningControllerTest.java @@ -28,9 +28,9 @@ import static tech.pegasys.pantheon.ethereum.permissioning.NodeLocalConfigPermis import tech.pegasys.pantheon.ethereum.p2p.peers.EnodeURL; import tech.pegasys.pantheon.ethereum.permissioning.node.NodeWhitelistUpdatedEvent; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import java.io.IOException; import java.net.URI; diff --git a/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/NodeSmartContractPermissioningControllerTest.java b/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/NodeSmartContractPermissioningControllerTest.java index 4ae511fbde..1889e5b68d 100644 --- a/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/NodeSmartContractPermissioningControllerTest.java +++ b/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/NodeSmartContractPermissioningControllerTest.java @@ -31,9 +31,9 @@ import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; import tech.pegasys.pantheon.ethereum.p2p.peers.EnodeURL; import tech.pegasys.pantheon.ethereum.transaction.TransactionSimulator; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateArchive; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import java.io.IOException; diff --git a/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/TransactionSmartContractPermissioningControllerTest.java b/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/TransactionSmartContractPermissioningControllerTest.java index 7d83df8375..5b8f3104cd 100644 --- a/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/TransactionSmartContractPermissioningControllerTest.java +++ b/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/TransactionSmartContractPermissioningControllerTest.java @@ -32,9 +32,9 @@ import tech.pegasys.pantheon.ethereum.mainnet.MainnetProtocolSchedule; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; import tech.pegasys.pantheon.ethereum.transaction.TransactionSimulator; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateArchive; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import tech.pegasys.pantheon.util.bytes.BytesValue; import java.io.IOException; diff --git a/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/account/AccountPermissioningControllerFactoryTest.java b/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/account/AccountPermissioningControllerFactoryTest.java index e3fdf8a059..81aa03e3cb 100644 --- a/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/account/AccountPermissioningControllerFactoryTest.java +++ b/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/account/AccountPermissioningControllerFactoryTest.java @@ -23,8 +23,8 @@ import tech.pegasys.pantheon.ethereum.permissioning.LocalPermissioningConfigurat import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration; import tech.pegasys.pantheon.ethereum.permissioning.SmartContractPermissioningConfiguration; import tech.pegasys.pantheon.ethereum.transaction.TransactionSimulator; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.io.File; import java.io.IOException; diff --git a/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/node/provider/SyncStatusNodePermissioningProviderTest.java b/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/node/provider/SyncStatusNodePermissioningProviderTest.java index 11fb3c56f6..c62fc53159 100644 --- a/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/node/provider/SyncStatusNodePermissioningProviderTest.java +++ b/ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/node/provider/SyncStatusNodePermissioningProviderTest.java @@ -23,9 +23,9 @@ import tech.pegasys.pantheon.ethereum.core.SyncStatus; import tech.pegasys.pantheon.ethereum.core.Synchronizer; import tech.pegasys.pantheon.ethereum.core.Synchronizer.SyncStatusListener; import tech.pegasys.pantheon.ethereum.p2p.peers.EnodeURL; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import java.util.ArrayList; import java.util.Collection; diff --git a/ethereum/retesteth/src/main/java/tech/pegasys/pantheon/ethereum/retesteth/RetestethContext.java b/ethereum/retesteth/src/main/java/tech/pegasys/pantheon/ethereum/retesteth/RetestethContext.java index fbd4ce6e82..8af6a144ad 100644 --- a/ethereum/retesteth/src/main/java/tech/pegasys/pantheon/ethereum/retesteth/RetestethContext.java +++ b/ethereum/retesteth/src/main/java/tech/pegasys/pantheon/ethereum/retesteth/RetestethContext.java @@ -49,8 +49,8 @@ import tech.pegasys.pantheon.ethereum.storage.keyvalue.KeyValueStoragePrefixedKe import tech.pegasys.pantheon.ethereum.storage.keyvalue.WorldStateKeyValueStorage; import tech.pegasys.pantheon.ethereum.storage.keyvalue.WorldStatePreimageKeyValueStorage; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateArchive; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.services.kvstore.InMemoryKeyValueStorage; import java.util.Optional; diff --git a/gradle/versions.gradle b/gradle/versions.gradle index 5fa35d5dfa..3b23146b88 100644 --- a/gradle/versions.gradle +++ b/gradle/versions.gradle @@ -96,6 +96,6 @@ dependencyManagement { dependency "tech.pegasys.ethsigner.internal:file-based:0.2.0" dependency "tech.pegasys.ethsigner.internal:signing-api:0.2.0" - dependency "tech.pegasys.pantheon:plugin-api:1.2.2" + dependency "tech.pegasys.pantheon:plugin-api:1.2.3" } } diff --git a/metrics/core/build.gradle b/metrics/core/build.gradle index 24a796ddd0..75eb9fef8e 100644 --- a/metrics/core/build.gradle +++ b/metrics/core/build.gradle @@ -41,6 +41,7 @@ dependencies { implementation 'io.vertx:vertx-core' implementation 'io.vertx:vertx-web' implementation 'org.apache.logging.log4j:log4j-api' + implementation 'tech.pegasys.pantheon:plugin-api' runtime 'org.apache.logging.log4j:log4j-core' diff --git a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/Counter.java b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/Counter.java deleted file mode 100644 index 5fa2fd2176..0000000000 --- a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/Counter.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright 2018 ConsenSys AG. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package tech.pegasys.pantheon.metrics; - -public interface Counter { - void inc(); - - void inc(long amount); -} diff --git a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/LabelledMetric.java b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/LabelledMetric.java deleted file mode 100644 index 974ead24e0..0000000000 --- a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/LabelledMetric.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2018 ConsenSys AG. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package tech.pegasys.pantheon.metrics; - -public interface LabelledMetric { - - T labels(String... labels); -} diff --git a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/MetricsSystem.java b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/MetricsSystem.java deleted file mode 100644 index d4364daa3c..0000000000 --- a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/MetricsSystem.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2018 ConsenSys AG. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package tech.pegasys.pantheon.metrics; - -import java.util.function.DoubleSupplier; -import java.util.function.IntSupplier; -import java.util.function.LongSupplier; -import java.util.stream.Stream; - -public interface MetricsSystem { - - default Counter createCounter( - final MetricCategory category, final String name, final String help) { - return createLabelledCounter(category, name, help, new String[0]).labels(); - } - - LabelledMetric createLabelledCounter( - MetricCategory category, String name, String help, String... labelNames); - - default OperationTimer createTimer( - final MetricCategory category, final String name, final String help) { - return createLabelledTimer(category, name, help, new String[0]).labels(); - } - - LabelledMetric createLabelledTimer( - MetricCategory category, String name, String help, String... labelNames); - - void createGauge(MetricCategory category, String name, String help, DoubleSupplier valueSupplier); - - default void createIntegerGauge( - final MetricCategory category, - final String name, - final String help, - final IntSupplier valueSupplier) { - createGauge(category, name, help, () -> (double) valueSupplier.getAsInt()); - } - - default void createLongGauge( - final MetricCategory category, - final String name, - final String help, - final LongSupplier valueSupplier) { - createGauge(category, name, help, () -> (double) valueSupplier.getAsLong()); - } - - Stream streamObservations(MetricCategory category); - - Stream streamObservations(); -} diff --git a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/MetricCategory.java b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/ObservableMetricsSystem.java similarity index 65% rename from metrics/core/src/main/java/tech/pegasys/pantheon/metrics/MetricCategory.java rename to metrics/core/src/main/java/tech/pegasys/pantheon/metrics/ObservableMetricsSystem.java index f5b0db30d6..002d9f88e7 100644 --- a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/MetricCategory.java +++ b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/ObservableMetricsSystem.java @@ -12,11 +12,14 @@ */ package tech.pegasys.pantheon.metrics; -import java.util.Optional; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.MetricCategory; -public interface MetricCategory { +import java.util.stream.Stream; - String getName(); +public interface ObservableMetricsSystem extends MetricsSystem { - Optional getApplicationPrefix(); + Stream streamObservations(MetricCategory category); + + Stream streamObservations(); } diff --git a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/Observation.java b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/Observation.java index 6fe1efd9c1..c7c6c422ca 100644 --- a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/Observation.java +++ b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/Observation.java @@ -12,6 +12,8 @@ */ package tech.pegasys.pantheon.metrics; +import tech.pegasys.pantheon.plugin.services.metrics.MetricCategory; + import java.util.List; import java.util.Objects; diff --git a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/OperationTimer.java b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/OperationTimer.java deleted file mode 100644 index e5d13d237e..0000000000 --- a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/OperationTimer.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2018 ConsenSys AG. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ -package tech.pegasys.pantheon.metrics; - -import java.io.Closeable; - -public interface OperationTimer { - - TimingContext startTimer(); - - interface TimingContext extends Closeable { - /** @return Elapsed time in seconds. */ - double stopTimer(); - - @Override - default void close() { - stopTimer(); - } - } -} diff --git a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/PantheonMetricCategory.java b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/PantheonMetricCategory.java index 18d439ef18..e57dc77214 100644 --- a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/PantheonMetricCategory.java +++ b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/PantheonMetricCategory.java @@ -12,6 +12,8 @@ */ package tech.pegasys.pantheon.metrics; +import tech.pegasys.pantheon.plugin.services.metrics.MetricCategory; + import java.util.EnumSet; import java.util.Optional; import java.util.Set; diff --git a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/RunnableCounter.java b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/RunnableCounter.java index 521ae2e4b6..548de622d0 100644 --- a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/RunnableCounter.java +++ b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/RunnableCounter.java @@ -12,6 +12,8 @@ */ package tech.pegasys.pantheon.metrics; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; + import java.util.concurrent.atomic.AtomicLong; /** Counter that triggers a specific task each time a step is hit. */ diff --git a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/StandardMetricCategory.java b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/StandardMetricCategory.java index b4c76e6052..a45239e6c6 100644 --- a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/StandardMetricCategory.java +++ b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/StandardMetricCategory.java @@ -12,6 +12,8 @@ */ package tech.pegasys.pantheon.metrics; +import tech.pegasys.pantheon.plugin.services.metrics.MetricCategory; + import java.util.Optional; public enum StandardMetricCategory implements MetricCategory { diff --git a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/noop/NoOpCounter.java b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/noop/NoOpCounter.java index 42db9ecb28..96e50beb52 100644 --- a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/noop/NoOpCounter.java +++ b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/noop/NoOpCounter.java @@ -12,7 +12,7 @@ */ package tech.pegasys.pantheon.metrics.noop; -import tech.pegasys.pantheon.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; class NoOpCounter implements Counter { diff --git a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/noop/NoOpMetricsSystem.java b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/noop/NoOpMetricsSystem.java index e478e093f6..faa2807b19 100644 --- a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/noop/NoOpMetricsSystem.java +++ b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/noop/NoOpMetricsSystem.java @@ -12,23 +12,22 @@ */ package tech.pegasys.pantheon.metrics.noop; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; -import tech.pegasys.pantheon.metrics.MetricCategory; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.metrics.ObservableMetricsSystem; import tech.pegasys.pantheon.metrics.Observation; -import tech.pegasys.pantheon.metrics.OperationTimer; -import tech.pegasys.pantheon.metrics.OperationTimer.TimingContext; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; +import tech.pegasys.pantheon.plugin.services.metrics.MetricCategory; +import tech.pegasys.pantheon.plugin.services.metrics.OperationTimer; import java.util.function.DoubleSupplier; import java.util.stream.Stream; import com.google.common.base.Preconditions; -public class NoOpMetricsSystem implements MetricsSystem { +public class NoOpMetricsSystem implements ObservableMetricsSystem { public static final Counter NO_OP_COUNTER = new NoOpCounter(); - private static final TimingContext NO_OP_TIMING_CONTEXT = () -> 0; + private static final OperationTimer.TimingContext NO_OP_TIMING_CONTEXT = () -> 0; public static final OperationTimer NO_OP_OPERATION_TIMER = () -> NO_OP_TIMING_CONTEXT; public static final LabelledMetric NO_OP_LABELLED_1_COUNTER = diff --git a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsConfiguration.java b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsConfiguration.java index f5a2b7b8f8..8fd851eb41 100644 --- a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsConfiguration.java +++ b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsConfiguration.java @@ -14,7 +14,7 @@ package tech.pegasys.pantheon.metrics.prometheus; import static tech.pegasys.pantheon.metrics.PantheonMetricCategory.DEFAULT_METRIC_CATEGORIES; -import tech.pegasys.pantheon.metrics.MetricCategory; +import tech.pegasys.pantheon.plugin.services.metrics.MetricCategory; import java.util.Arrays; import java.util.Collection; diff --git a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsHttpService.java b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsHttpService.java index 6edc76c4d1..8917aad11f 100644 --- a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsHttpService.java +++ b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsHttpService.java @@ -15,7 +15,7 @@ package tech.pegasys.pantheon.metrics.prometheus; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.Streams.stream; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsPushGatewayService.java b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsPushGatewayService.java index 329ab9a1d4..4f6ed16cc2 100644 --- a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsPushGatewayService.java +++ b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsPushGatewayService.java @@ -14,7 +14,7 @@ package tech.pegasys.pantheon.metrics.prometheus; import static com.google.common.base.Preconditions.checkArgument; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.io.IOException; import java.util.Optional; diff --git a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsService.java b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsService.java index 7e13c40733..fee0c6beb6 100644 --- a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsService.java +++ b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsService.java @@ -12,7 +12,7 @@ */ package tech.pegasys.pantheon.metrics.prometheus; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import java.util.Optional; import java.util.concurrent.CompletableFuture; diff --git a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/PrometheusCounter.java b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/PrometheusCounter.java index 09c303c3b3..e62a00d0a9 100644 --- a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/PrometheusCounter.java +++ b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/PrometheusCounter.java @@ -12,8 +12,8 @@ */ package tech.pegasys.pantheon.metrics.prometheus; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; class PrometheusCounter implements LabelledMetric { diff --git a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/PrometheusMetricsSystem.java b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/PrometheusMetricsSystem.java index 79cd8db56a..60f5a30945 100644 --- a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/PrometheusMetricsSystem.java +++ b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/PrometheusMetricsSystem.java @@ -15,13 +15,13 @@ package tech.pegasys.pantheon.metrics.prometheus; import static java.util.Arrays.asList; import static java.util.Collections.singleton; -import tech.pegasys.pantheon.metrics.LabelledMetric; -import tech.pegasys.pantheon.metrics.MetricCategory; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.metrics.ObservableMetricsSystem; import tech.pegasys.pantheon.metrics.Observation; -import tech.pegasys.pantheon.metrics.OperationTimer; import tech.pegasys.pantheon.metrics.StandardMetricCategory; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; +import tech.pegasys.pantheon.plugin.services.metrics.MetricCategory; +import tech.pegasys.pantheon.plugin.services.metrics.OperationTimer; import java.util.ArrayList; import java.util.Collection; @@ -48,14 +48,14 @@ import io.prometheus.client.hotspot.MemoryPoolsExports; import io.prometheus.client.hotspot.StandardExports; import io.prometheus.client.hotspot.ThreadExports; -public class PrometheusMetricsSystem implements MetricsSystem { +public class PrometheusMetricsSystem implements ObservableMetricsSystem { private final Map> collectors = new ConcurrentHashMap<>(); private final CollectorRegistry registry = new CollectorRegistry(true); - private final Map> cachedCounters = + private final Map> + cachedCounters = new ConcurrentHashMap<>(); + private final Map> cachedTimers = new ConcurrentHashMap<>(); - private final Map> - cachedTimers = new ConcurrentHashMap<>(); private final Set enabledCategories; private final boolean timersEnabled; @@ -66,7 +66,7 @@ public class PrometheusMetricsSystem implements MetricsSystem { this.timersEnabled = timersEnabled; } - public static MetricsSystem init(final MetricsConfiguration metricsConfiguration) { + public static ObservableMetricsSystem init(final MetricsConfiguration metricsConfiguration) { if (!metricsConfiguration.isEnabled() && !metricsConfiguration.isPushEnabled()) { return new NoOpMetricsSystem(); } @@ -92,11 +92,12 @@ public class PrometheusMetricsSystem implements MetricsSystem { } @Override - public LabelledMetric createLabelledCounter( - final MetricCategory category, - final String name, - final String help, - final String... labelNames) { + public LabelledMetric + createLabelledCounter( + final MetricCategory category, + final String name, + final String help, + final String... labelNames) { final String metricName = convertToPrometheusName(category, name); return cachedCounters.computeIfAbsent( metricName, diff --git a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/PrometheusTimer.java b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/PrometheusTimer.java index f60ef7fb6c..c450ed3ee9 100644 --- a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/PrometheusTimer.java +++ b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/prometheus/PrometheusTimer.java @@ -12,8 +12,8 @@ */ package tech.pegasys.pantheon.metrics.prometheus; -import tech.pegasys.pantheon.metrics.LabelledMetric; -import tech.pegasys.pantheon.metrics.OperationTimer; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; +import tech.pegasys.pantheon.plugin.services.metrics.OperationTimer; import io.prometheus.client.Summary; diff --git a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/vertx/PoolMetricsAdapter.java b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/vertx/PoolMetricsAdapter.java index 5e8486c356..ac698d9af6 100644 --- a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/vertx/PoolMetricsAdapter.java +++ b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/vertx/PoolMetricsAdapter.java @@ -12,9 +12,9 @@ */ package tech.pegasys.pantheon.metrics.vertx; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.MetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import io.vertx.core.spi.metrics.PoolMetrics; diff --git a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/vertx/VertxMetricsAdapter.java b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/vertx/VertxMetricsAdapter.java index 3d8ef65665..d413149c0b 100644 --- a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/vertx/VertxMetricsAdapter.java +++ b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/vertx/VertxMetricsAdapter.java @@ -12,7 +12,7 @@ */ package tech.pegasys.pantheon.metrics.vertx; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import io.vertx.core.spi.metrics.PoolMetrics; import io.vertx.core.spi.metrics.VertxMetrics; diff --git a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/vertx/VertxMetricsAdapterFactory.java b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/vertx/VertxMetricsAdapterFactory.java index f815f7d967..1f27b0b1a6 100644 --- a/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/vertx/VertxMetricsAdapterFactory.java +++ b/metrics/core/src/main/java/tech/pegasys/pantheon/metrics/vertx/VertxMetricsAdapterFactory.java @@ -12,7 +12,7 @@ */ package tech.pegasys.pantheon.metrics.vertx; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import io.vertx.core.VertxOptions; import io.vertx.core.spi.VertxMetricsFactory; diff --git a/metrics/core/src/test-support/java/tech/pegasys/pantheon/metrics/StubMetricsSystem.java b/metrics/core/src/test-support/java/tech/pegasys/pantheon/metrics/StubMetricsSystem.java index cd6c08ab5d..b113d51cbf 100644 --- a/metrics/core/src/test-support/java/tech/pegasys/pantheon/metrics/StubMetricsSystem.java +++ b/metrics/core/src/test-support/java/tech/pegasys/pantheon/metrics/StubMetricsSystem.java @@ -15,6 +15,10 @@ package tech.pegasys.pantheon.metrics; import static java.util.Arrays.asList; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; +import tech.pegasys.pantheon.plugin.services.metrics.MetricCategory; +import tech.pegasys.pantheon.plugin.services.metrics.OperationTimer; import java.util.HashMap; import java.util.List; @@ -22,7 +26,7 @@ import java.util.Map; import java.util.function.DoubleSupplier; import java.util.stream.Stream; -public class StubMetricsSystem implements MetricsSystem { +public class StubMetricsSystem implements ObservableMetricsSystem { private final Map counters = new HashMap<>(); private final Map gauges = new HashMap<>(); diff --git a/metrics/core/src/test/java/tech/pegasys/pantheon/metrics/noop/NoOpMetricsSystemTest.java b/metrics/core/src/test/java/tech/pegasys/pantheon/metrics/noop/NoOpMetricsSystemTest.java index 88251bb8a3..92cb8c82f5 100644 --- a/metrics/core/src/test/java/tech/pegasys/pantheon/metrics/noop/NoOpMetricsSystemTest.java +++ b/metrics/core/src/test/java/tech/pegasys/pantheon/metrics/noop/NoOpMetricsSystemTest.java @@ -15,11 +15,11 @@ package tech.pegasys.pantheon.metrics.noop; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; -import tech.pegasys.pantheon.metrics.MetricsSystem; -import tech.pegasys.pantheon.metrics.OperationTimer; import tech.pegasys.pantheon.metrics.StandardMetricCategory; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; +import tech.pegasys.pantheon.plugin.services.metrics.OperationTimer; import org.junit.Test; diff --git a/metrics/core/src/test/java/tech/pegasys/pantheon/metrics/prometheus/PrometheusMetricsSystemTest.java b/metrics/core/src/test/java/tech/pegasys/pantheon/metrics/prometheus/PrometheusMetricsSystemTest.java index d102dea9fe..a594bee1db 100644 --- a/metrics/core/src/test/java/tech/pegasys/pantheon/metrics/prometheus/PrometheusMetricsSystemTest.java +++ b/metrics/core/src/test/java/tech/pegasys/pantheon/metrics/prometheus/PrometheusMetricsSystemTest.java @@ -23,14 +23,14 @@ import static tech.pegasys.pantheon.metrics.PantheonMetricCategory.PEERS; import static tech.pegasys.pantheon.metrics.PantheonMetricCategory.RPC; import static tech.pegasys.pantheon.metrics.StandardMetricCategory.JVM; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.metrics.ObservableMetricsSystem; import tech.pegasys.pantheon.metrics.Observation; -import tech.pegasys.pantheon.metrics.OperationTimer; -import tech.pegasys.pantheon.metrics.OperationTimer.TimingContext; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; +import tech.pegasys.pantheon.plugin.services.metrics.OperationTimer; import java.util.Comparator; @@ -44,7 +44,7 @@ public class PrometheusMetricsSystemTest { .thenComparing(Observation::getMetricName) .thenComparing((o1, o2) -> o1.getLabels().equals(o2.getLabels()) ? 0 : 1); - private final MetricsSystem metricsSystem = + private final ObservableMetricsSystem metricsSystem = new PrometheusMetricsSystem(DEFAULT_METRIC_CATEGORIES, true); @Test @@ -109,7 +109,7 @@ public class PrometheusMetricsSystemTest { public void shouldCreateObservationsFromTimer() { final OperationTimer timer = metricsSystem.createTimer(RPC, "request", "Some help"); - final TimingContext context = timer.startTimer(); + final OperationTimer.TimingContext context = timer.startTimer(); context.stopTimer(); assertThat(metricsSystem.streamObservations()) @@ -140,7 +140,7 @@ public class PrometheusMetricsSystemTest { metricsSystem.createLabelledTimer(RPC, "request", "Some help", "methodName"); //noinspection EmptyTryBlock - try (final TimingContext ignored = timer.labels("method").startTimer()) {} + try (final OperationTimer.TimingContext ignored = timer.labels("method").startTimer()) {} assertThat(metricsSystem.streamObservations()) .usingElementComparator(IGNORE_VALUES) // We don't know how long it will actually take. @@ -157,13 +157,13 @@ public class PrometheusMetricsSystemTest { @Test public void shouldNotCreateObservationsFromTimerWhenTimersDisabled() { - final MetricsSystem metricsSystem = + final ObservableMetricsSystem metricsSystem = new PrometheusMetricsSystem(DEFAULT_METRIC_CATEGORIES, false); final LabelledMetric timer = metricsSystem.createLabelledTimer(RPC, "request", "Some help", "methodName"); //noinspection EmptyTryBlock - try (final TimingContext ignored = timer.labels("method").startTimer()) {} + try (final OperationTimer.TimingContext ignored = timer.labels("method").startTimer()) {} assertThat(metricsSystem.streamObservations()).isEmpty(); } @@ -193,7 +193,8 @@ public class PrometheusMetricsSystemTest { .metricCategories(ImmutableSet.of(PantheonMetricCategory.RPC)) .enabled(true) .build(); - final MetricsSystem localMetricSystem = PrometheusMetricsSystem.init(metricsConfiguration); + final ObservableMetricsSystem localMetricSystem = + PrometheusMetricsSystem.init(metricsConfiguration); // do a category we are not watching final LabelledMetric counterN = diff --git a/metrics/rocksdb/build.gradle b/metrics/rocksdb/build.gradle index 5690b1c3b9..6139c05907 100644 --- a/metrics/rocksdb/build.gradle +++ b/metrics/rocksdb/build.gradle @@ -33,4 +33,6 @@ dependencies { implementation 'io.prometheus:simpleclient' implementation 'org.apache.logging.log4j:log4j-api' implementation 'org.rocksdb:rocksdbjni' + + implementation 'tech.pegasys.pantheon:plugin-api' } diff --git a/pantheon/src/main/java/tech/pegasys/pantheon/RunnerBuilder.java b/pantheon/src/main/java/tech/pegasys/pantheon/RunnerBuilder.java index 2915064106..2cf3cf9bb3 100644 --- a/pantheon/src/main/java/tech/pegasys/pantheon/RunnerBuilder.java +++ b/pantheon/src/main/java/tech/pegasys/pantheon/RunnerBuilder.java @@ -76,7 +76,7 @@ import tech.pegasys.pantheon.ethereum.permissioning.node.NodePermissioningContro import tech.pegasys.pantheon.ethereum.permissioning.node.PeerPermissionsAdapter; import tech.pegasys.pantheon.ethereum.transaction.TransactionSimulator; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateArchive; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.metrics.ObservableMetricsSystem; import tech.pegasys.pantheon.metrics.prometheus.MetricsConfiguration; import tech.pegasys.pantheon.metrics.prometheus.MetricsService; import tech.pegasys.pantheon.nat.NatMethod; @@ -121,7 +121,7 @@ public class RunnerBuilder { private WebSocketConfiguration webSocketConfiguration; private Path dataDir; private MetricsConfiguration metricsConfiguration; - private MetricsSystem metricsSystem; + private ObservableMetricsSystem metricsSystem; private Optional permissioningConfiguration = Optional.empty(); private Collection staticNodes = Collections.emptyList(); @@ -224,7 +224,7 @@ public class RunnerBuilder { return this; } - public RunnerBuilder metricsSystem(final MetricsSystem metricsSystem) { + public RunnerBuilder metricsSystem(final ObservableMetricsSystem metricsSystem) { this.metricsSystem = metricsSystem; return this; } @@ -554,7 +554,7 @@ public class RunnerBuilder { final Synchronizer synchronizer, final TransactionPool transactionPool, final MiningCoordinator miningCoordinator, - final MetricsSystem metricsSystem, + final ObservableMetricsSystem metricsSystem, final Set supportedCapabilities, final Collection jsonRpcApis, final FilterManager filterManager, diff --git a/pantheon/src/main/java/tech/pegasys/pantheon/cli/PantheonCommand.java b/pantheon/src/main/java/tech/pegasys/pantheon/cli/PantheonCommand.java index bd333c67eb..12f107054d 100644 --- a/pantheon/src/main/java/tech/pegasys/pantheon/cli/PantheonCommand.java +++ b/pantheon/src/main/java/tech/pegasys/pantheon/cli/PantheonCommand.java @@ -82,16 +82,17 @@ import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfiguration; import tech.pegasys.pantheon.ethereum.permissioning.PermissioningConfigurationBuilder; import tech.pegasys.pantheon.ethereum.permissioning.SmartContractPermissioningConfiguration; import tech.pegasys.pantheon.ethereum.worldstate.PruningConfiguration; -import tech.pegasys.pantheon.metrics.MetricCategory; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.metrics.ObservableMetricsSystem; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; import tech.pegasys.pantheon.metrics.StandardMetricCategory; import tech.pegasys.pantheon.metrics.prometheus.MetricsConfiguration; import tech.pegasys.pantheon.metrics.prometheus.PrometheusMetricsSystem; import tech.pegasys.pantheon.metrics.vertx.VertxMetricsAdapterFactory; import tech.pegasys.pantheon.nat.NatMethod; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.plugin.services.PantheonEvents; import tech.pegasys.pantheon.plugin.services.PicoCLIOptions; +import tech.pegasys.pantheon.plugin.services.metrics.MetricCategory; import tech.pegasys.pantheon.services.PantheonEventsImpl; import tech.pegasys.pantheon.services.PantheonPluginContextImpl; import tech.pegasys.pantheon.services.PicoCLIOptionsImpl; @@ -658,7 +659,7 @@ public class PantheonCommand implements DefaultCommandValues, Runnable { private Collection staticNodes; private PantheonController pantheonController; - private final Supplier metricsSystem = + private final Supplier metricsSystem = Suppliers.memoize(() -> PrometheusMetricsSystem.init(metricsConfiguration())); public PantheonCommand( @@ -772,6 +773,7 @@ public class PantheonCommand implements DefaultCommandValues, Runnable { private PantheonCommand preparePlugins() { pantheonPluginContext.addService(PicoCLIOptions.class, new PicoCLIOptionsImpl(commandLine)); + pantheonPluginContext.addService(MetricsSystem.class, getMetricsSystem()); pantheonPluginContext.registerPlugins(pluginsDir()); return this; } @@ -1238,7 +1240,7 @@ public class PantheonCommand implements DefaultCommandValues, Runnable { permissioningConfiguration.ifPresent(runnerBuilder::permissioningConfiguration); - final MetricsSystem metricsSystem = this.metricsSystem.get(); + final ObservableMetricsSystem metricsSystem = this.metricsSystem.get(); final Runner runner = runnerBuilder .vertx(Vertx.vertx(createVertxOptions(metricsSystem))) diff --git a/pantheon/src/main/java/tech/pegasys/pantheon/cli/converter/MetricCategoryConverter.java b/pantheon/src/main/java/tech/pegasys/pantheon/cli/converter/MetricCategoryConverter.java index 24f6f5a949..f0f2b4689e 100644 --- a/pantheon/src/main/java/tech/pegasys/pantheon/cli/converter/MetricCategoryConverter.java +++ b/pantheon/src/main/java/tech/pegasys/pantheon/cli/converter/MetricCategoryConverter.java @@ -12,7 +12,7 @@ */ package tech.pegasys.pantheon.cli.converter; -import tech.pegasys.pantheon.metrics.MetricCategory; +import tech.pegasys.pantheon.plugin.services.metrics.MetricCategory; import java.util.EnumSet; import java.util.HashMap; diff --git a/pantheon/src/main/java/tech/pegasys/pantheon/controller/PantheonControllerBuilder.java b/pantheon/src/main/java/tech/pegasys/pantheon/controller/PantheonControllerBuilder.java index 7a882d0023..6c4c2407ea 100644 --- a/pantheon/src/main/java/tech/pegasys/pantheon/controller/PantheonControllerBuilder.java +++ b/pantheon/src/main/java/tech/pegasys/pantheon/controller/PantheonControllerBuilder.java @@ -49,7 +49,7 @@ import tech.pegasys.pantheon.ethereum.worldstate.MarkSweepPruner; import tech.pegasys.pantheon.ethereum.worldstate.Pruner; import tech.pegasys.pantheon.ethereum.worldstate.PruningConfiguration; import tech.pegasys.pantheon.ethereum.worldstate.WorldStateArchive; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; import tech.pegasys.pantheon.services.kvstore.RocksDbConfiguration; import java.io.File; diff --git a/pantheon/src/main/java/tech/pegasys/pantheon/services/PantheonEventsImpl.java b/pantheon/src/main/java/tech/pegasys/pantheon/services/PantheonEventsImpl.java index 83c62219eb..db2a27f079 100644 --- a/pantheon/src/main/java/tech/pegasys/pantheon/services/PantheonEventsImpl.java +++ b/pantheon/src/main/java/tech/pegasys/pantheon/services/PantheonEventsImpl.java @@ -59,6 +59,17 @@ public class PantheonEventsImpl implements PantheonEvents { } } + @Override + public Object addNewTransactionDroppedListener( + final TransactionDroppedListener newTransactionDroppedListener) { + throw new UnsupportedOperationException(); + } + + @Override + public void removeTransactionDroppedListener(final Object listenerIdentifier) { + throw new UnsupportedOperationException(); + } + private void dispatchTransactionAddedMessage( final Transaction transaction, final NewTransactionAddedListener listener) { listener.newTransactionAdded(transaction); diff --git a/pantheon/src/test/java/tech/pegasys/pantheon/RunnerTest.java b/pantheon/src/test/java/tech/pegasys/pantheon/RunnerTest.java index 7cbe7a84cd..baf0d39bc6 100644 --- a/pantheon/src/test/java/tech/pegasys/pantheon/RunnerTest.java +++ b/pantheon/src/test/java/tech/pegasys/pantheon/RunnerTest.java @@ -43,7 +43,7 @@ import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSpec; import tech.pegasys.pantheon.ethereum.p2p.peers.EnodeURL; import tech.pegasys.pantheon.ethereum.storage.StorageProvider; import tech.pegasys.pantheon.ethereum.storage.keyvalue.RocksDbStorageProvider; -import tech.pegasys.pantheon.metrics.MetricsSystem; +import tech.pegasys.pantheon.metrics.ObservableMetricsSystem; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; import tech.pegasys.pantheon.metrics.prometheus.MetricsConfiguration; import tech.pegasys.pantheon.services.kvstore.RocksDbConfiguration; @@ -117,7 +117,7 @@ public final class RunnerTest { final KeyPair aheadDbNodeKeys = loadKeyPair(dbAhead); final SynchronizerConfiguration syncConfigAhead = SynchronizerConfiguration.builder().syncMode(SyncMode.FULL).build(); - final MetricsSystem noOpMetricsSystem = new NoOpMetricsSystem(); + final ObservableMetricsSystem noOpMetricsSystem = new NoOpMetricsSystem(); final BigInteger networkId = BigInteger.valueOf(2929); // Setup state with block data diff --git a/services/kvstore/src/main/java/tech/pegasys/pantheon/services/kvstore/ColumnarRocksDbKeyValueStorage.java b/services/kvstore/src/main/java/tech/pegasys/pantheon/services/kvstore/ColumnarRocksDbKeyValueStorage.java index a2d6e5886b..cbf944f221 100644 --- a/services/kvstore/src/main/java/tech/pegasys/pantheon/services/kvstore/ColumnarRocksDbKeyValueStorage.java +++ b/services/kvstore/src/main/java/tech/pegasys/pantheon/services/kvstore/ColumnarRocksDbKeyValueStorage.java @@ -14,8 +14,8 @@ package tech.pegasys.pantheon.services.kvstore; import static java.util.Objects.requireNonNullElse; -import tech.pegasys.pantheon.metrics.MetricsSystem; -import tech.pegasys.pantheon.metrics.OperationTimer; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.OperationTimer; import tech.pegasys.pantheon.services.util.RocksDbUtil; import tech.pegasys.pantheon.util.bytes.BytesValue; diff --git a/services/kvstore/src/main/java/tech/pegasys/pantheon/services/kvstore/RocksDBMetricsHelper.java b/services/kvstore/src/main/java/tech/pegasys/pantheon/services/kvstore/RocksDBMetricsHelper.java index a323e880ac..1477ef6775 100644 --- a/services/kvstore/src/main/java/tech/pegasys/pantheon/services/kvstore/RocksDBMetricsHelper.java +++ b/services/kvstore/src/main/java/tech/pegasys/pantheon/services/kvstore/RocksDBMetricsHelper.java @@ -12,12 +12,12 @@ */ package tech.pegasys.pantheon.services.kvstore; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.MetricsSystem; -import tech.pegasys.pantheon.metrics.OperationTimer; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; import tech.pegasys.pantheon.metrics.prometheus.PrometheusMetricsSystem; import tech.pegasys.pantheon.metrics.rocksdb.RocksDBStats; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.OperationTimer; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/services/kvstore/src/main/java/tech/pegasys/pantheon/services/kvstore/RocksDbKeyValueStorage.java b/services/kvstore/src/main/java/tech/pegasys/pantheon/services/kvstore/RocksDbKeyValueStorage.java index 81fa3852b1..6cf7822c70 100644 --- a/services/kvstore/src/main/java/tech/pegasys/pantheon/services/kvstore/RocksDbKeyValueStorage.java +++ b/services/kvstore/src/main/java/tech/pegasys/pantheon/services/kvstore/RocksDbKeyValueStorage.java @@ -12,8 +12,8 @@ */ package tech.pegasys.pantheon.services.kvstore; -import tech.pegasys.pantheon.metrics.MetricsSystem; -import tech.pegasys.pantheon.metrics.OperationTimer; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.OperationTimer; import tech.pegasys.pantheon.services.kvstore.SegmentedKeyValueStorage.StorageException; import tech.pegasys.pantheon.services.util.RocksDbUtil; import tech.pegasys.pantheon.util.bytes.BytesValue; diff --git a/services/kvstore/src/test/java/tech/pegasys/pantheon/services/kvstore/RocksDbKeyValueStorageTest.java b/services/kvstore/src/test/java/tech/pegasys/pantheon/services/kvstore/RocksDbKeyValueStorageTest.java index 4899db1000..82f1e833b2 100644 --- a/services/kvstore/src/test/java/tech/pegasys/pantheon/services/kvstore/RocksDbKeyValueStorageTest.java +++ b/services/kvstore/src/test/java/tech/pegasys/pantheon/services/kvstore/RocksDbKeyValueStorageTest.java @@ -20,12 +20,12 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; -import tech.pegasys.pantheon.metrics.MetricsSystem; -import tech.pegasys.pantheon.metrics.OperationTimer; import tech.pegasys.pantheon.metrics.PantheonMetricCategory; import tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem; +import tech.pegasys.pantheon.plugin.services.MetricsSystem; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; +import tech.pegasys.pantheon.plugin.services.metrics.OperationTimer; import java.util.function.LongSupplier; diff --git a/services/pipeline/build.gradle b/services/pipeline/build.gradle index a21870ea7e..d38f1f1247 100644 --- a/services/pipeline/build.gradle +++ b/services/pipeline/build.gradle @@ -31,6 +31,7 @@ dependencies { implementation 'org.apache.logging.log4j:log4j-api' implementation 'com.google.guava:guava' + implementation 'tech.pegasys.pantheon:plugin-api' runtime 'org.apache.logging.log4j:log4j-core' diff --git a/services/pipeline/src/main/java/tech/pegasys/pantheon/services/pipeline/BatchingReadPipe.java b/services/pipeline/src/main/java/tech/pegasys/pantheon/services/pipeline/BatchingReadPipe.java index 14c703ee1e..6bb6ead22c 100644 --- a/services/pipeline/src/main/java/tech/pegasys/pantheon/services/pipeline/BatchingReadPipe.java +++ b/services/pipeline/src/main/java/tech/pegasys/pantheon/services/pipeline/BatchingReadPipe.java @@ -12,7 +12,7 @@ */ package tech.pegasys.pantheon.services.pipeline; -import tech.pegasys.pantheon.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import java.util.ArrayList; import java.util.Collection; diff --git a/services/pipeline/src/main/java/tech/pegasys/pantheon/services/pipeline/Pipe.java b/services/pipeline/src/main/java/tech/pegasys/pantheon/services/pipeline/Pipe.java index d0424832a6..cc7ce1a1a0 100644 --- a/services/pipeline/src/main/java/tech/pegasys/pantheon/services/pipeline/Pipe.java +++ b/services/pipeline/src/main/java/tech/pegasys/pantheon/services/pipeline/Pipe.java @@ -12,7 +12,7 @@ */ package tech.pegasys.pantheon.services.pipeline; -import tech.pegasys.pantheon.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import java.util.Collection; import java.util.concurrent.ArrayBlockingQueue; diff --git a/services/pipeline/src/main/java/tech/pegasys/pantheon/services/pipeline/PipelineBuilder.java b/services/pipeline/src/main/java/tech/pegasys/pantheon/services/pipeline/PipelineBuilder.java index d7ee733bf8..4187ea91d1 100644 --- a/services/pipeline/src/main/java/tech/pegasys/pantheon/services/pipeline/PipelineBuilder.java +++ b/services/pipeline/src/main/java/tech/pegasys/pantheon/services/pipeline/PipelineBuilder.java @@ -16,8 +16,8 @@ import static com.google.common.base.Preconditions.checkArgument; import static java.util.Collections.emptyList; import static java.util.Collections.singleton; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; import java.util.ArrayList; import java.util.Collection; diff --git a/services/pipeline/src/test/java/tech/pegasys/pantheon/services/pipeline/BatchingReadPipeTest.java b/services/pipeline/src/test/java/tech/pegasys/pantheon/services/pipeline/BatchingReadPipeTest.java index 42f28a0bea..4166ad63e0 100644 --- a/services/pipeline/src/test/java/tech/pegasys/pantheon/services/pipeline/BatchingReadPipeTest.java +++ b/services/pipeline/src/test/java/tech/pegasys/pantheon/services/pipeline/BatchingReadPipeTest.java @@ -20,7 +20,7 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyZeroInteractions; import static tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem.NO_OP_COUNTER; -import tech.pegasys.pantheon.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import java.util.ArrayList; import java.util.List; diff --git a/services/pipeline/src/test/java/tech/pegasys/pantheon/services/pipeline/PipeTest.java b/services/pipeline/src/test/java/tech/pegasys/pantheon/services/pipeline/PipeTest.java index ab4aa0e89b..54e36644f0 100644 --- a/services/pipeline/src/test/java/tech/pegasys/pantheon/services/pipeline/PipeTest.java +++ b/services/pipeline/src/test/java/tech/pegasys/pantheon/services/pipeline/PipeTest.java @@ -17,7 +17,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -import tech.pegasys.pantheon.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; import java.util.ArrayList; import java.util.List; diff --git a/services/pipeline/src/test/java/tech/pegasys/pantheon/services/pipeline/PipelineBuilderTest.java b/services/pipeline/src/test/java/tech/pegasys/pantheon/services/pipeline/PipelineBuilderTest.java index 8350f3ff68..51d55af5ff 100644 --- a/services/pipeline/src/test/java/tech/pegasys/pantheon/services/pipeline/PipelineBuilderTest.java +++ b/services/pipeline/src/test/java/tech/pegasys/pantheon/services/pipeline/PipelineBuilderTest.java @@ -23,8 +23,8 @@ import static org.assertj.core.api.Assertions.fail; import static org.awaitility.Awaitility.waitAtMost; import static tech.pegasys.pantheon.metrics.noop.NoOpMetricsSystem.NO_OP_LABELLED_2_COUNTER; -import tech.pegasys.pantheon.metrics.Counter; -import tech.pegasys.pantheon.metrics.LabelledMetric; +import tech.pegasys.pantheon.plugin.services.metrics.Counter; +import tech.pegasys.pantheon.plugin.services.metrics.LabelledMetric; import java.util.ArrayList; import java.util.Collection;