{"action":"created","comment":{"url":"https://api.github.com/repos/neo4j/neo4j/pulls/comments/47117529","id":47117529,"diff_hunk":"@@ -0,0 +1,93 @@\n+/*\n+ * Copyright (c) 2002-2015 \"Neo Technology,\"\n+ * Network Engine for Objects in Lund AB [http://neotechnology.com]\n+ *\n+ * This file is part of Neo4j.\n+ *\n+ * Neo4j is free software: you can redistribute it and/or modify\n+ * it under the terms of the GNU Affero General Public License as\n+ * published by the Free Software Foundation, either version 3 of the\n+ * License, or (at your option) any later version.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU Affero General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Affero General Public License\n+ * along with this program. If not, see <http://www.gnu.org/licenses/>.\n+ */\n+package org.neo4j.metrics.source;\n+\n+import java.io.IOException;\n+\n+import com.codahale.metrics.Gauge;\n+import com.codahale.metrics.MetricRegistry;\n+\n+import org.neo4j.coreedge.raft.log.NaiveDurableRaftLog;\n+import org.neo4j.coreedge.raft.state.TermStore;\n+import org.neo4j.kernel.configuration.Config;\n+import org.neo4j.kernel.impl.annotations.Documented;\n+import org.neo4j.kernel.lifecycle.LifecycleAdapter;\n+import org.neo4j.kernel.monitoring.Monitors;\n+import org.neo4j.metrics.MetricsSettings;\n+\n+import static com.codahale.metrics.MetricRegistry.name;\n+\n+import static org.neo4j.coreedge.raft.log.RaftLog.APPEND_INDEX_TAG;\n+import static org.neo4j.coreedge.raft.log.RaftLog.COMMIT_INDEX_TAG;\n+import static org.neo4j.coreedge.raft.state.TermStore.TERM_TAG;\n+\n+@Documented( \".Core Edge Metrics\" )\n+public class CoreEdgeMetrics extends LifecycleAdapter\n+{\n+    private static final String NAME_PREFIX = \"neo4j.core_edge\";\n+    private static final String APPEND_INDEX = name( NAME_PREFIX, \"append_index\" );\n+    private static final String COMMIT_INDEX = name( NAME_PREFIX, \"commit_index\" );\n+    private static final String TERM = name( NAME_PREFIX, \"term\" );","path":"enterprise/metrics/src/main/java/org/neo4j/metrics/source/CoreEdgeMetrics.java","position":47,"original_position":47,"commit_id":"da6b0272b9c207bd843951037ea2cd7878c7647f","original_commit_id":"da6b0272b9c207bd843951037ea2cd7878c7647f","user":{"login":"davidegrohmann","id":6573166,"avatar_url":"https://avatars.githubusercontent.com/u/6573166?v=3","gravatar_id":"","url":"https://api.github.com/users/davidegrohmann","html_url":"https://github.com/davidegrohmann","followers_url":"https://api.github.com/users/davidegrohmann/followers","following_url":"https://api.github.com/users/davidegrohmann/following{/other_user}","gists_url":"https://api.github.com/users/davidegrohmann/gists{/gist_id}","starred_url":"https://api.github.com/users/davidegrohmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidegrohmann/subscriptions","organizations_url":"https://api.github.com/users/davidegrohmann/orgs","repos_url":"https://api.github.com/users/davidegrohmann/repos","events_url":"https://api.github.com/users/davidegrohmann/events{/privacy}","received_events_url":"https://api.github.com/users/davidegrohmann/received_events","type":"User","site_admin":false},"body":"Can you please document the exposed metrics values as well? See https://github.com/neo4j/neo4j/blob/3.0/enterprise/metrics/src/main/java/org/neo4j/metrics/source/PageCacheMetrics.java#L40 for an example.\r\n\r\nBtw don't forget to add it to the pom configuration: https://github.com/neo4j/neo4j/blob/3.0/enterprise/metrics/pom.xml#L57","created_at":"2015-12-09T16:50:58Z","updated_at":"2015-12-09T16:50:58Z","html_url":"https://github.com/neo4j/neo4j/pull/6027#discussion_r47117529","pull_request_url":"https://api.github.com/repos/neo4j/neo4j/pulls/6027","_links":{"self":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/comments/47117529"},"html":{"href":"https://github.com/neo4j/neo4j/pull/6027#discussion_r47117529"},"pull_request":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/6027"}}},"pull_request":{"url":"https://api.github.com/repos/neo4j/neo4j/pulls/6027","id":52696699,"html_url":"https://github.com/neo4j/neo4j/pull/6027","diff_url":"https://github.com/neo4j/neo4j/pull/6027.diff","patch_url":"https://github.com/neo4j/neo4j/pull/6027.patch","issue_url":"https://api.github.com/repos/neo4j/neo4j/issues/6027","number":6027,"state":"open","locked":false,"title":"Metrics for core-edge module","user":{"login":"mneedham","id":13220,"avatar_url":"https://avatars.githubusercontent.com/u/13220?v=3","gravatar_id":"","url":"https://api.github.com/users/mneedham","html_url":"https://github.com/mneedham","followers_url":"https://api.github.com/users/mneedham/followers","following_url":"https://api.github.com/users/mneedham/following{/other_user}","gists_url":"https://api.github.com/users/mneedham/gists{/gist_id}","starred_url":"https://api.github.com/users/mneedham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mneedham/subscriptions","organizations_url":"https://api.github.com/users/mneedham/orgs","repos_url":"https://api.github.com/users/mneedham/repos","events_url":"https://api.github.com/users/mneedham/events{/privacy}","received_events_url":"https://api.github.com/users/mneedham/received_events","type":"User","site_admin":false},"body":"We'll add more as we work out what's useful but for now we're tracking\r\n\r\n* Append Index\r\n* Commit Index\r\n* Term","created_at":"2015-12-04T17:22:06Z","updated_at":"2015-12-09T16:50:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a11a57871a26e6935852dc5b9820777defc779b0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/neo4j/neo4j/pulls/6027/commits","review_comments_url":"https://api.github.com/repos/neo4j/neo4j/pulls/6027/comments","review_comment_url":"https://api.github.com/repos/neo4j/neo4j/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neo4j/neo4j/issues/6027/comments","statuses_url":"https://api.github.com/repos/neo4j/neo4j/statuses/da6b0272b9c207bd843951037ea2cd7878c7647f","head":{"label":"mneedham:core-edge-cluster-metrics","ref":"core-edge-cluster-metrics","sha":"da6b0272b9c207bd843951037ea2cd7878c7647f","user":{"login":"mneedham","id":13220,"avatar_url":"https://avatars.githubusercontent.com/u/13220?v=3","gravatar_id":"","url":"https://api.github.com/users/mneedham","html_url":"https://github.com/mneedham","followers_url":"https://api.github.com/users/mneedham/followers","following_url":"https://api.github.com/users/mneedham/following{/other_user}","gists_url":"https://api.github.com/users/mneedham/gists{/gist_id}","starred_url":"https://api.github.com/users/mneedham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mneedham/subscriptions","organizations_url":"https://api.github.com/users/mneedham/orgs","repos_url":"https://api.github.com/users/mneedham/repos","events_url":"https://api.github.com/users/mneedham/events{/privacy}","received_events_url":"https://api.github.com/users/mneedham/received_events","type":"User","site_admin":false},"repo":{"id":8568336,"name":"neo4j","full_name":"mneedham/neo4j","owner":{"login":"mneedham","id":13220,"avatar_url":"https://avatars.githubusercontent.com/u/13220?v=3","gravatar_id":"","url":"https://api.github.com/users/mneedham","html_url":"https://github.com/mneedham","followers_url":"https://api.github.com/users/mneedham/followers","following_url":"https://api.github.com/users/mneedham/following{/other_user}","gists_url":"https://api.github.com/users/mneedham/gists{/gist_id}","starred_url":"https://api.github.com/users/mneedham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mneedham/subscriptions","organizations_url":"https://api.github.com/users/mneedham/orgs","repos_url":"https://api.github.com/users/mneedham/repos","events_url":"https://api.github.com/users/mneedham/events{/privacy}","received_events_url":"https://api.github.com/users/mneedham/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mneedham/neo4j","description":"","fork":true,"url":"https://api.github.com/repos/mneedham/neo4j","forks_url":"https://api.github.com/repos/mneedham/neo4j/forks","keys_url":"https://api.github.com/repos/mneedham/neo4j/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mneedham/neo4j/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mneedham/neo4j/teams","hooks_url":"https://api.github.com/repos/mneedham/neo4j/hooks","issue_events_url":"https://api.github.com/repos/mneedham/neo4j/issues/events{/number}","events_url":"https://api.github.com/repos/mneedham/neo4j/events","assignees_url":"https://api.github.com/repos/mneedham/neo4j/assignees{/user}","branches_url":"https://api.github.com/repos/mneedham/neo4j/branches{/branch}","tags_url":"https://api.github.com/repos/mneedham/neo4j/tags","blobs_url":"https://api.github.com/repos/mneedham/neo4j/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mneedham/neo4j/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mneedham/neo4j/git/refs{/sha}","trees_url":"https://api.github.com/repos/mneedham/neo4j/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mneedham/neo4j/statuses/{sha}","languages_url":"https://api.github.com/repos/mneedham/neo4j/languages","stargazers_url":"https://api.github.com/repos/mneedham/neo4j/stargazers","contributors_url":"https://api.github.com/repos/mneedham/neo4j/contributors","subscribers_url":"https://api.github.com/repos/mneedham/neo4j/subscribers","subscription_url":"https://api.github.com/repos/mneedham/neo4j/subscription","commits_url":"https://api.github.com/repos/mneedham/neo4j/commits{/sha}","git_commits_url":"https://api.github.com/repos/mneedham/neo4j/git/commits{/sha}","comments_url":"https://api.github.com/repos/mneedham/neo4j/comments{/number}","issue_comment_url":"https://api.github.com/repos/mneedham/neo4j/issues/comments{/number}","contents_url":"https://api.github.com/repos/mneedham/neo4j/contents/{+path}","compare_url":"https://api.github.com/repos/mneedham/neo4j/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mneedham/neo4j/merges","archive_url":"https://api.github.com/repos/mneedham/neo4j/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mneedham/neo4j/downloads","issues_url":"https://api.github.com/repos/mneedham/neo4j/issues{/number}","pulls_url":"https://api.github.com/repos/mneedham/neo4j/pulls{/number}","milestones_url":"https://api.github.com/repos/mneedham/neo4j/milestones{/number}","notifications_url":"https://api.github.com/repos/mneedham/neo4j/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mneedham/neo4j/labels{/name}","releases_url":"https://api.github.com/repos/mneedham/neo4j/releases{/id}","created_at":"2013-03-05T00:21:33Z","updated_at":"2014-05-16T14:01:18Z","pushed_at":"2015-12-09T16:09:22Z","git_url":"git://github.com/mneedham/neo4j.git","ssh_url":"git@github.com:mneedham/neo4j.git","clone_url":"https://github.com/mneedham/neo4j.git","svn_url":"https://github.com/mneedham/neo4j","homepage":"http://neo4j.org","size":268237,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"neo4j:3.0","ref":"3.0","sha":"61dafee880ed8e267261cae3717cb7517e5c207d","user":{"login":"neo4j","id":201120,"avatar_url":"https://avatars.githubusercontent.com/u/201120?v=3","gravatar_id":"","url":"https://api.github.com/users/neo4j","html_url":"https://github.com/neo4j","followers_url":"https://api.github.com/users/neo4j/followers","following_url":"https://api.github.com/users/neo4j/following{/other_user}","gists_url":"https://api.github.com/users/neo4j/gists{/gist_id}","starred_url":"https://api.github.com/users/neo4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo4j/subscriptions","organizations_url":"https://api.github.com/users/neo4j/orgs","repos_url":"https://api.github.com/users/neo4j/repos","events_url":"https://api.github.com/users/neo4j/events{/privacy}","received_events_url":"https://api.github.com/users/neo4j/received_events","type":"Organization","site_admin":false},"repo":{"id":6650539,"name":"neo4j","full_name":"neo4j/neo4j","owner":{"login":"neo4j","id":201120,"avatar_url":"https://avatars.githubusercontent.com/u/201120?v=3","gravatar_id":"","url":"https://api.github.com/users/neo4j","html_url":"https://github.com/neo4j","followers_url":"https://api.github.com/users/neo4j/followers","following_url":"https://api.github.com/users/neo4j/following{/other_user}","gists_url":"https://api.github.com/users/neo4j/gists{/gist_id}","starred_url":"https://api.github.com/users/neo4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo4j/subscriptions","organizations_url":"https://api.github.com/users/neo4j/orgs","repos_url":"https://api.github.com/users/neo4j/repos","events_url":"https://api.github.com/users/neo4j/events{/privacy}","received_events_url":"https://api.github.com/users/neo4j/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/neo4j/neo4j","description":"Graphs for Everyone","fork":false,"url":"https://api.github.com/repos/neo4j/neo4j","forks_url":"https://api.github.com/repos/neo4j/neo4j/forks","keys_url":"https://api.github.com/repos/neo4j/neo4j/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neo4j/neo4j/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neo4j/neo4j/teams","hooks_url":"https://api.github.com/repos/neo4j/neo4j/hooks","issue_events_url":"https://api.github.com/repos/neo4j/neo4j/issues/events{/number}","events_url":"https://api.github.com/repos/neo4j/neo4j/events","assignees_url":"https://api.github.com/repos/neo4j/neo4j/assignees{/user}","branches_url":"https://api.github.com/repos/neo4j/neo4j/branches{/branch}","tags_url":"https://api.github.com/repos/neo4j/neo4j/tags","blobs_url":"https://api.github.com/repos/neo4j/neo4j/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neo4j/neo4j/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neo4j/neo4j/git/refs{/sha}","trees_url":"https://api.github.com/repos/neo4j/neo4j/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neo4j/neo4j/statuses/{sha}","languages_url":"https://api.github.com/repos/neo4j/neo4j/languages","stargazers_url":"https://api.github.com/repos/neo4j/neo4j/stargazers","contributors_url":"https://api.github.com/repos/neo4j/neo4j/contributors","subscribers_url":"https://api.github.com/repos/neo4j/neo4j/subscribers","subscription_url":"https://api.github.com/repos/neo4j/neo4j/subscription","commits_url":"https://api.github.com/repos/neo4j/neo4j/commits{/sha}","git_commits_url":"https://api.github.com/repos/neo4j/neo4j/git/commits{/sha}","comments_url":"https://api.github.com/repos/neo4j/neo4j/comments{/number}","issue_comment_url":"https://api.github.com/repos/neo4j/neo4j/issues/comments{/number}","contents_url":"https://api.github.com/repos/neo4j/neo4j/contents/{+path}","compare_url":"https://api.github.com/repos/neo4j/neo4j/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neo4j/neo4j/merges","archive_url":"https://api.github.com/repos/neo4j/neo4j/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neo4j/neo4j/downloads","issues_url":"https://api.github.com/repos/neo4j/neo4j/issues{/number}","pulls_url":"https://api.github.com/repos/neo4j/neo4j/pulls{/number}","milestones_url":"https://api.github.com/repos/neo4j/neo4j/milestones{/number}","notifications_url":"https://api.github.com/repos/neo4j/neo4j/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neo4j/neo4j/labels{/name}","releases_url":"https://api.github.com/repos/neo4j/neo4j/releases{/id}","created_at":"2012-11-12T08:46:15Z","updated_at":"2015-12-09T12:02:49Z","pushed_at":"2015-12-09T16:45:59Z","git_url":"git://github.com/neo4j/neo4j.git","ssh_url":"git@github.com:neo4j/neo4j.git","clone_url":"https://github.com/neo4j/neo4j.git","svn_url":"https://github.com/neo4j/neo4j","homepage":"http://neo4j.com","size":313353,"stargazers_count":2180,"watchers_count":2180,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":802,"mirror_url":null,"open_issues_count":387,"forks":802,"open_issues":387,"watchers":2180,"default_branch":"3.0"}},"_links":{"self":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/6027"},"html":{"href":"https://github.com/neo4j/neo4j/pull/6027"},"issue":{"href":"https://api.github.com/repos/neo4j/neo4j/issues/6027"},"comments":{"href":"https://api.github.com/repos/neo4j/neo4j/issues/6027/comments"},"review_comments":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/6027/comments"},"review_comment":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/6027/commits"},"statuses":{"href":"https://api.github.com/repos/neo4j/neo4j/statuses/da6b0272b9c207bd843951037ea2cd7878c7647f"}}}}