Skip to content

Commit

Permalink
Move core-edge metrics in its own package
Browse files Browse the repository at this point in the history
  • Loading branch information
davidegrohmann committed Mar 11, 2016
1 parent 61a30ae commit fc04860
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 23 deletions.
2 changes: 1 addition & 1 deletion enterprise/metrics/pom.xml
Expand Up @@ -63,7 +63,7 @@
<arg value="org.neo4j.metrics.source.db.LogRotationMetrics" />
<arg value="org.neo4j.metrics.source.cluster.NetworkMetrics" />
<arg value="org.neo4j.metrics.source.cluster.ClusterMetrics" />
<arg value="org.neo4j.metrics.source.CoreMetrics" />
<arg value="org.neo4j.metrics.source.coreedge.CoreMetrics" />

<!-- keep this one last as it's a bit special compared to the others -->
<arg value="org.neo4j.metrics.source.jvm.JvmMetrics" />
Expand Down
Expand Up @@ -41,6 +41,8 @@
import org.neo4j.metrics.output.EventReporter;
import org.neo4j.metrics.source.cluster.ClusterMetrics;
import org.neo4j.metrics.source.cluster.NetworkMetrics;
import org.neo4j.metrics.source.coreedge.CoreMetrics;
import org.neo4j.metrics.source.coreedge.EdgeMetrics;
import org.neo4j.metrics.source.db.BoltMetrics;
import org.neo4j.metrics.source.db.CheckPointingMetrics;
import org.neo4j.metrics.source.db.CypherMetrics;
Expand Down
Expand Up @@ -17,14 +17,14 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.metrics.source;

import java.io.IOException;
import java.util.function.Supplier;
package org.neo4j.metrics.source.coreedge;

import com.codahale.metrics.Gauge;
import com.codahale.metrics.MetricRegistry;

import java.io.IOException;
import java.util.function.Supplier;

import org.neo4j.coreedge.raft.CoreMetaData;
import org.neo4j.kernel.impl.annotations.Documented;
import org.neo4j.kernel.lifecycle.LifecycleAdapter;
Expand Down
Expand Up @@ -17,13 +17,13 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.metrics.source;

import java.io.IOException;
package org.neo4j.metrics.source.coreedge;

import com.codahale.metrics.Gauge;
import com.codahale.metrics.MetricRegistry;

import java.io.IOException;

import org.neo4j.kernel.impl.annotations.Documented;
import org.neo4j.kernel.lifecycle.LifecycleAdapter;
import org.neo4j.kernel.monitoring.Monitors;
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.metrics.source;
package org.neo4j.metrics.source.coreedge;

import java.util.concurrent.atomic.AtomicLong;

Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.metrics.source;
package org.neo4j.metrics.source.coreedge;

import java.net.InetSocketAddress;
import java.util.Map;
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.metrics.source;
package org.neo4j.metrics.source.coreedge;

import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.LongAdder;
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.metrics.source;
package org.neo4j.metrics.source.coreedge;

import java.util.concurrent.atomic.AtomicLong;

Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.metrics.source;
package org.neo4j.metrics.source.coreedge;

import java.util.concurrent.atomic.AtomicLong;

Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.metrics.source;
package org.neo4j.metrics.source.coreedge;

import java.util.concurrent.atomic.AtomicLong;

Expand Down
Expand Up @@ -17,12 +17,11 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.metrics.source;
package org.neo4j.metrics.source.coreedge;

import java.util.concurrent.atomic.AtomicLong;

import org.neo4j.coreedge.catchup.tx.core.TxPullRequestsMonitor;
import org.neo4j.coreedge.raft.LeaderNotFoundMonitor;


public class TxPullRequestsMetric implements TxPullRequestsMonitor
Expand Down
Expand Up @@ -17,11 +17,10 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.metrics.source;
package org.neo4j.metrics.source.coreedge;

import java.util.concurrent.atomic.AtomicLong;

import org.neo4j.coreedge.catchup.tx.core.TxPullRequestsMonitor;
import org.neo4j.coreedge.catchup.tx.core.TxRetryMonitor;


Expand Down
Expand Up @@ -38,7 +38,7 @@
import org.neo4j.graphdb.Transaction;
import org.neo4j.kernel.configuration.Config;
import org.neo4j.kernel.impl.factory.GraphDatabaseFacade;
import org.neo4j.metrics.source.CoreMetrics;
import org.neo4j.metrics.source.coreedge.CoreMetrics;
import org.neo4j.test.TargetDirectory;
import org.neo4j.tooling.GlobalGraphOperations;

Expand All @@ -54,9 +54,9 @@
import static org.neo4j.coreedge.server.CoreEdgeClusterSettings.raft_advertised_address;
import static org.neo4j.graphdb.Label.label;
import static org.neo4j.helpers.collection.Iterables.count;
import static org.neo4j.metrics.source.EdgeMetrics.PULL_UPDATES;
import static org.neo4j.metrics.source.EdgeMetrics.PULL_UPDATE_HIGHEST_TX_ID_RECEIVED;
import static org.neo4j.metrics.source.EdgeMetrics.PULL_UPDATE_HIGHEST_TX_ID_REQUESTED;
import static org.neo4j.metrics.source.coreedge.EdgeMetrics.PULL_UPDATES;
import static org.neo4j.metrics.source.coreedge.EdgeMetrics.PULL_UPDATE_HIGHEST_TX_ID_RECEIVED;
import static org.neo4j.metrics.source.coreedge.EdgeMetrics.PULL_UPDATE_HIGHEST_TX_ID_REQUESTED;
import static org.neo4j.test.Assert.assertEventually;

public class CoreEdgeMetricsIT
Expand Down
Expand Up @@ -23,6 +23,8 @@

import org.junit.Test;

import org.neo4j.metrics.source.coreedge.MessageQueueMonitorMetric;

import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;

Expand Down Expand Up @@ -71,4 +73,4 @@ public void shouldCalculateTotalQueueSize() throws Exception
// then
assertThat( metric.queueSizes(), equalTo(18L) );
}
}
}

0 comments on commit fc04860

Please sign in to comment.