GitHub PullRequestReviewCommentEvent at 2014-12-18 19:20:11
Repository: infinispan
Actor: vblagoje
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/infinispan/infinispan/pulls/comments/22064094","id":22064094,"diff_hunk":"@@ -0,0 +1,698 @@\n+package org.infinispan.stats.impl;\n+\n+import java.io.Serializable;\n+import java.util.Collections;\n+import java.util.HashMap;\n+import java.util.List;\n+import java.util.Map;\n+import java.util.Set;\n+import java.util.concurrent.Future;\n+import java.util.concurrent.TimeUnit;\n+\n+import org.infinispan.AdvancedCache;\n+import org.infinispan.Cache;\n+import org.infinispan.configuration.cache.Configuration;\n+import org.infinispan.distexec.DefaultExecutorService;\n+import org.infinispan.distexec.DistributedCallable;\n+import org.infinispan.eviction.ActivationManager;\n+import org.infinispan.eviction.PassivationManager;\n+import org.infinispan.eviction.impl.PassivationManagerImpl;\n+import org.infinispan.factories.annotations.Inject;\n+import org.infinispan.factories.annotations.Start;\n+import org.infinispan.interceptors.ActivationInterceptor;\n+import org.infinispan.interceptors.CacheWriterInterceptor;\n+import org.infinispan.interceptors.InvalidationInterceptor;\n+import org.infinispan.interceptors.base.CommandInterceptor;\n+import org.infinispan.jmx.JmxStatisticsExposer;\n+import org.infinispan.jmx.annotations.DataType;\n+import org.infinispan.jmx.annotations.DisplayType;\n+import org.infinispan.jmx.annotations.MBean;\n+import org.infinispan.jmx.annotations.ManagedAttribute;\n+import org.infinispan.jmx.annotations.ManagedOperation;\n+import org.infinispan.jmx.annotations.MeasurementType;\n+import org.infinispan.jmx.annotations.Parameter;\n+import org.infinispan.jmx.annotations.Units;\n+import org.infinispan.stats.ClusterCacheStats;\n+import org.infinispan.stats.Stats;\n+import org.infinispan.util.TimeService;\n+import org.infinispan.util.concurrent.locks.LockManager;\n+import org.infinispan.util.logging.Log;\n+import org.infinispan.util.logging.LogFactory;\n+\n+@MBean(objectName = \"ClusterCacheStats\", description = \"General cluster statistics such as timings, hit/miss ratio, etc.\")\n+public class ClusterCacheStatsImpl implements ClusterCacheStats, JmxStatisticsExposer {\n+\n+   private static final long serialVersionUID = -7692443865184602500L;\n+\n+   private static final String TIME_SINCE_START = \"timeSinceStart\";\n+   private static final String REMOVE_MISSES = \"removeMisses\";\n+   private static final String REMOVE_HITS = \"removeHits\";\n+   private static final String AVERAGE_WRITE_TIME = \"averageWriteTime\";\n+   private static final String AVERAGE_READ_TIME = \"averageReadTime\";\n+   private static final String AVERAGE_REMOVE_TIME = \"averageRemoveTime\";\n+   private static final String EVICTIONS = \"evictions\";\n+   private static final String HITS = \"hits\";\n+   private static final String MISSES = \"misses\";\n+   private static final String NUMBER_OF_ENTRIES = \"numberOfEntries\";\n+   private static final String STORES = \"stores\";\n+\n+   //LockManager\n+   private static final String NUMBER_OF_LOCKS_HELD = \"numberOfLocksHeld\";\n+   private static final String NUMBER_OF_LOCKS_AVAILABLE = \"numberOfLocksAvailable\";\n+\n+   //Invalidation/passivation/activation\n+   private static final String INVALIDATIONS = \"invalidations\";\n+   private static final String PASSIVATIONS = \"passivations\";\n+   private static final String ACTIVATIONS = \"activations\";\n+\n+   //cache loaders\n+   private static final String CACHE_LOADER_LOADS = \"cacheLoaderLoads\";\n+   private static final String CACHE_LOADER_MISSES = \"cacheLoaderMisses\";\n+   private static final String CACHE_WRITER_STORES = \"cacheWriterStores\";\n+\n+\n+   public static long DEFAULT_STALE_STATS_THRESHOLD = 3000;\n+\n+   private static final Log log = LogFactory.getLog(ClusterCacheStatsImpl.class);\n+   private transient Cache<?, ?> cache;\n+   private transient DefaultExecutorService des;\n+   private TimeService ts;\n+   private boolean statisticsEnabled = false;\n+   private long staleStatsTreshold = DEFAULT_STALE_STATS_THRESHOLD;\n+   private long statsUpdateTimestamp = 0;\n+\n+   private long stores;\n+   private long timeSinceStart;\n+   private long removeMisses;\n+   private long removeHits;\n+   private long misses;\n+   private long hits;\n+   private long evictions;\n+   private long numberOfEntries;\n+   private long averageWriteTime;\n+   private long averageReadTime;\n+   private long averageRemoveTime;\n+   private double readWriteRatio;\n+   private double hitRatio;\n+\n+   //LockManager\n+   int numberOfLocksHeld;\n+   int numberOfLocksAvailable;\n+\n+   //invalidation, passivation activation\n+   long invalidations;\n+   long activations;\n+   long passivations;\n+\n+   //cacheloader metrics\n+   long cacheLoaderLoads;\n+   long cacheLoaderMisses;\n+   long cacheWriterStores;\n+\n+   public ClusterCacheStatsImpl() {\n+   }\n+\n+   @Inject\n+   public void injectDependencies(Cache<?, ?> cache, TimeService ts, Configuration configuration) {\n+      this.cache = cache;\n+      this.ts = ts;\n+      this.statisticsEnabled = configuration.jmxStatistics().enabled();\n+   }\n+\n+   @Start(priority = 9)","path":"core/src/main/java/org/infinispan/stats/impl/ClusterCacheStatsImpl.java","position":122,"original_position":122,"commit_id":"358f23f4019114917f789505e5a496ac1811837a","original_commit_id":"358f23f4019114917f789505e5a496ac1811837a","user":{"login":"vblagoje","id":458335,"avatar_url":"https://avatars.githubusercontent.com/u/458335?v=3","gravatar_id":"","url":"https://api.github.com/users/vblagoje","html_url":"https://github.com/vblagoje","followers_url":"https://api.github.com/users/vblagoje/followers","following_url":"https://api.github.com/users/vblagoje/following{/other_user}","gists_url":"https://api.github.com/users/vblagoje/gists{/gist_id}","starred_url":"https://api.github.com/users/vblagoje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vblagoje/subscriptions","organizations_url":"https://api.github.com/users/vblagoje/orgs","repos_url":"https://api.github.com/users/vblagoje/repos","events_url":"https://api.github.com/users/vblagoje/events{/privacy}","received_events_url":"https://api.github.com/users/vblagoje/received_events","type":"User","site_admin":false},"body":"No, there is no reason. Good point, I'll remove it @wburns .","created_at":"2014-12-18T19:20:11Z","updated_at":"2014-12-18T19:20:11Z","html_url":"https://github.com/infinispan/infinispan/pull/3122#discussion_r22064094","pull_request_url":"https://api.github.com/repos/infinispan/infinispan/pulls/3122","_links":{"self":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/comments/22064094"},"html":{"href":"https://github.com/infinispan/infinispan/pull/3122#discussion_r22064094"},"pull_request":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/3122"}}},"pull_request":{"url":"https://api.github.com/repos/infinispan/infinispan/pulls/3122","id":25274731,"html_url":"https://github.com/infinispan/infinispan/pull/3122","diff_url":"https://github.com/infinispan/infinispan/pull/3122.diff","patch_url":"https://github.com/infinispan/infinispan/pull/3122.patch","issue_url":"https://api.github.com/repos/infinispan/infinispan/issues/3122","number":3122,"state":"open","locked":false,"title":"ISPN-4991 Implement clustered cache statistics","user":{"login":"vblagoje","id":458335,"avatar_url":"https://avatars.githubusercontent.com/u/458335?v=3","gravatar_id":"","url":"https://api.github.com/users/vblagoje","html_url":"https://github.com/vblagoje","followers_url":"https://api.github.com/users/vblagoje/followers","following_url":"https://api.github.com/users/vblagoje/following{/other_user}","gists_url":"https://api.github.com/users/vblagoje/gists{/gist_id}","starred_url":"https://api.github.com/users/vblagoje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vblagoje/subscriptions","organizations_url":"https://api.github.com/users/vblagoje/orgs","repos_url":"https://api.github.com/users/vblagoje/repos","events_url":"https://api.github.com/users/vblagoje/events{/privacy}","received_events_url":"https://api.github.com/users/vblagoje/received_events","type":"User","site_admin":false},"body":"Master only. Tristan should review","created_at":"2014-12-01T15:20:09Z","updated_at":"2014-12-18T19:20:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"52ba9eba8b793d3d4ba1abeb065f91bf374de76e","assignee":{"login":"tristantarrant","id":392478,"avatar_url":"https://avatars.githubusercontent.com/u/392478?v=3","gravatar_id":"","url":"https://api.github.com/users/tristantarrant","html_url":"https://github.com/tristantarrant","followers_url":"https://api.github.com/users/tristantarrant/followers","following_url":"https://api.github.com/users/tristantarrant/following{/other_user}","gists_url":"https://api.github.com/users/tristantarrant/gists{/gist_id}","starred_url":"https://api.github.com/users/tristantarrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tristantarrant/subscriptions","organizations_url":"https://api.github.com/users/tristantarrant/orgs","repos_url":"https://api.github.com/users/tristantarrant/repos","events_url":"https://api.github.com/users/tristantarrant/events{/privacy}","received_events_url":"https://api.github.com/users/tristantarrant/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/infinispan/infinispan/pulls/3122/commits","review_comments_url":"https://api.github.com/repos/infinispan/infinispan/pulls/3122/comments","review_comment_url":"https://api.github.com/repos/infinispan/infinispan/pulls/comments/{number}","comments_url":"https://api.github.com/repos/infinispan/infinispan/issues/3122/comments","statuses_url":"https://api.github.com/repos/infinispan/infinispan/statuses/358f23f4019114917f789505e5a496ac1811837a","head":{"label":"vblagoje:t_4991","ref":"t_4991","sha":"358f23f4019114917f789505e5a496ac1811837a","user":{"login":"vblagoje","id":458335,"avatar_url":"https://avatars.githubusercontent.com/u/458335?v=3","gravatar_id":"","url":"https://api.github.com/users/vblagoje","html_url":"https://github.com/vblagoje","followers_url":"https://api.github.com/users/vblagoje/followers","following_url":"https://api.github.com/users/vblagoje/following{/other_user}","gists_url":"https://api.github.com/users/vblagoje/gists{/gist_id}","starred_url":"https://api.github.com/users/vblagoje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vblagoje/subscriptions","organizations_url":"https://api.github.com/users/vblagoje/orgs","repos_url":"https://api.github.com/users/vblagoje/repos","events_url":"https://api.github.com/users/vblagoje/events{/privacy}","received_events_url":"https://api.github.com/users/vblagoje/received_events","type":"User","site_admin":false},"repo":{"id":1066183,"name":"infinispan","full_name":"vblagoje/infinispan","owner":{"login":"vblagoje","id":458335,"avatar_url":"https://avatars.githubusercontent.com/u/458335?v=3","gravatar_id":"","url":"https://api.github.com/users/vblagoje","html_url":"https://github.com/vblagoje","followers_url":"https://api.github.com/users/vblagoje/followers","following_url":"https://api.github.com/users/vblagoje/following{/other_user}","gists_url":"https://api.github.com/users/vblagoje/gists{/gist_id}","starred_url":"https://api.github.com/users/vblagoje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vblagoje/subscriptions","organizations_url":"https://api.github.com/users/vblagoje/orgs","repos_url":"https://api.github.com/users/vblagoje/repos","events_url":"https://api.github.com/users/vblagoje/events{/privacy}","received_events_url":"https://api.github.com/users/vblagoje/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vblagoje/infinispan","description":"Infinispan is an open source data grid platform and highly scalable NoSQL cloud data store.","fork":true,"url":"https://api.github.com/repos/vblagoje/infinispan","forks_url":"https://api.github.com/repos/vblagoje/infinispan/forks","keys_url":"https://api.github.com/repos/vblagoje/infinispan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vblagoje/infinispan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vblagoje/infinispan/teams","hooks_url":"https://api.github.com/repos/vblagoje/infinispan/hooks","issue_events_url":"https://api.github.com/repos/vblagoje/infinispan/issues/events{/number}","events_url":"https://api.github.com/repos/vblagoje/infinispan/events","assignees_url":"https://api.github.com/repos/vblagoje/infinispan/assignees{/user}","branches_url":"https://api.github.com/repos/vblagoje/infinispan/branches{/branch}","tags_url":"https://api.github.com/repos/vblagoje/infinispan/tags","blobs_url":"https://api.github.com/repos/vblagoje/infinispan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vblagoje/infinispan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vblagoje/infinispan/git/refs{/sha}","trees_url":"https://api.github.com/repos/vblagoje/infinispan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vblagoje/infinispan/statuses/{sha}","languages_url":"https://api.github.com/repos/vblagoje/infinispan/languages","stargazers_url":"https://api.github.com/repos/vblagoje/infinispan/stargazers","contributors_url":"https://api.github.com/repos/vblagoje/infinispan/contributors","subscribers_url":"https://api.github.com/repos/vblagoje/infinispan/subscribers","subscription_url":"https://api.github.com/repos/vblagoje/infinispan/subscription","commits_url":"https://api.github.com/repos/vblagoje/infinispan/commits{/sha}","git_commits_url":"https://api.github.com/repos/vblagoje/infinispan/git/commits{/sha}","comments_url":"https://api.github.com/repos/vblagoje/infinispan/comments{/number}","issue_comment_url":"https://api.github.com/repos/vblagoje/infinispan/issues/comments/{number}","contents_url":"https://api.github.com/repos/vblagoje/infinispan/contents/{+path}","compare_url":"https://api.github.com/repos/vblagoje/infinispan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vblagoje/infinispan/merges","archive_url":"https://api.github.com/repos/vblagoje/infinispan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vblagoje/infinispan/downloads","issues_url":"https://api.github.com/repos/vblagoje/infinispan/issues{/number}","pulls_url":"https://api.github.com/repos/vblagoje/infinispan/pulls{/number}","milestones_url":"https://api.github.com/repos/vblagoje/infinispan/milestones{/number}","notifications_url":"https://api.github.com/repos/vblagoje/infinispan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vblagoje/infinispan/labels{/name}","releases_url":"https://api.github.com/repos/vblagoje/infinispan/releases{/id}","created_at":"2010-11-09T19:55:28Z","updated_at":"2014-12-01T15:58:02Z","pushed_at":"2014-12-18T17:51:22Z","git_url":"git://github.com/vblagoje/infinispan.git","ssh_url":"git@github.com:vblagoje/infinispan.git","clone_url":"https://github.com/vblagoje/infinispan.git","svn_url":"https://github.com/vblagoje/infinispan","homepage":"http://www.infinispan.org","size":58957,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"infinispan:master","ref":"master","sha":"2444e6b412122f0a0d55e8fc32123d33beaaeb21","user":{"login":"infinispan","id":458093,"avatar_url":"https://avatars.githubusercontent.com/u/458093?v=3","gravatar_id":"","url":"https://api.github.com/users/infinispan","html_url":"https://github.com/infinispan","followers_url":"https://api.github.com/users/infinispan/followers","following_url":"https://api.github.com/users/infinispan/following{/other_user}","gists_url":"https://api.github.com/users/infinispan/gists{/gist_id}","starred_url":"https://api.github.com/users/infinispan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infinispan/subscriptions","organizations_url":"https://api.github.com/users/infinispan/orgs","repos_url":"https://api.github.com/users/infinispan/repos","events_url":"https://api.github.com/users/infinispan/events{/privacy}","received_events_url":"https://api.github.com/users/infinispan/received_events","type":"Organization","site_admin":false},"repo":{"id":1050944,"name":"infinispan","full_name":"infinispan/infinispan","owner":{"login":"infinispan","id":458093,"avatar_url":"https://avatars.githubusercontent.com/u/458093?v=3","gravatar_id":"","url":"https://api.github.com/users/infinispan","html_url":"https://github.com/infinispan","followers_url":"https://api.github.com/users/infinispan/followers","following_url":"https://api.github.com/users/infinispan/following{/other_user}","gists_url":"https://api.github.com/users/infinispan/gists{/gist_id}","starred_url":"https://api.github.com/users/infinispan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infinispan/subscriptions","organizations_url":"https://api.github.com/users/infinispan/orgs","repos_url":"https://api.github.com/users/infinispan/repos","events_url":"https://api.github.com/users/infinispan/events{/privacy}","received_events_url":"https://api.github.com/users/infinispan/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/infinispan/infinispan","description":"Infinispan is an open source data grid platform and highly scalable NoSQL cloud data store.","fork":false,"url":"https://api.github.com/repos/infinispan/infinispan","forks_url":"https://api.github.com/repos/infinispan/infinispan/forks","keys_url":"https://api.github.com/repos/infinispan/infinispan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/infinispan/infinispan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/infinispan/infinispan/teams","hooks_url":"https://api.github.com/repos/infinispan/infinispan/hooks","issue_events_url":"https://api.github.com/repos/infinispan/infinispan/issues/events{/number}","events_url":"https://api.github.com/repos/infinispan/infinispan/events","assignees_url":"https://api.github.com/repos/infinispan/infinispan/assignees{/user}","branches_url":"https://api.github.com/repos/infinispan/infinispan/branches{/branch}","tags_url":"https://api.github.com/repos/infinispan/infinispan/tags","blobs_url":"https://api.github.com/repos/infinispan/infinispan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/infinispan/infinispan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/infinispan/infinispan/git/refs{/sha}","trees_url":"https://api.github.com/repos/infinispan/infinispan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/infinispan/infinispan/statuses/{sha}","languages_url":"https://api.github.com/repos/infinispan/infinispan/languages","stargazers_url":"https://api.github.com/repos/infinispan/infinispan/stargazers","contributors_url":"https://api.github.com/repos/infinispan/infinispan/contributors","subscribers_url":"https://api.github.com/repos/infinispan/infinispan/subscribers","subscription_url":"https://api.github.com/repos/infinispan/infinispan/subscription","commits_url":"https://api.github.com/repos/infinispan/infinispan/commits{/sha}","git_commits_url":"https://api.github.com/repos/infinispan/infinispan/git/commits{/sha}","comments_url":"https://api.github.com/repos/infinispan/infinispan/comments{/number}","issue_comment_url":"https://api.github.com/repos/infinispan/infinispan/issues/comments/{number}","contents_url":"https://api.github.com/repos/infinispan/infinispan/contents/{+path}","compare_url":"https://api.github.com/repos/infinispan/infinispan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/infinispan/infinispan/merges","archive_url":"https://api.github.com/repos/infinispan/infinispan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/infinispan/infinispan/downloads","issues_url":"https://api.github.com/repos/infinispan/infinispan/issues{/number}","pulls_url":"https://api.github.com/repos/infinispan/infinispan/pulls{/number}","milestones_url":"https://api.github.com/repos/infinispan/infinispan/milestones{/number}","notifications_url":"https://api.github.com/repos/infinispan/infinispan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/infinispan/infinispan/labels{/name}","releases_url":"https://api.github.com/repos/infinispan/infinispan/releases{/id}","created_at":"2010-11-04T12:33:19Z","updated_at":"2014-12-18T10:43:53Z","pushed_at":"2014-12-18T10:43:53Z","git_url":"git://github.com/infinispan/infinispan.git","ssh_url":"git@github.com:infinispan/infinispan.git","clone_url":"https://github.com/infinispan/infinispan.git","svn_url":"https://github.com/infinispan/infinispan","homepage":"http://www.infinispan.org","size":130715,"stargazers_count":338,"watchers_count":338,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":269,"mirror_url":null,"open_issues_count":19,"forks":269,"open_issues":19,"watchers":338,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/3122"},"html":{"href":"https://github.com/infinispan/infinispan/pull/3122"},"issue":{"href":"https://api.github.com/repos/infinispan/infinispan/issues/3122"},"comments":{"href":"https://api.github.com/repos/infinispan/infinispan/issues/3122/comments"},"review_comments":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/3122/comments"},"review_comment":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/3122/commits"},"statuses":{"href":"https://api.github.com/repos/infinispan/infinispan/statuses/358f23f4019114917f789505e5a496ac1811837a"}}}}