You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/03/18 21:42:25 UTC

[GitHub] [ignite] gurustron opened a new pull request #7550: IGNITE-9017 clear-cache-stats

gurustron opened a new pull request #7550: IGNITE-9017 clear-cache-stats
URL: https://github.com/apache/ignite/pull/7550
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [ignite] ptupitsyn commented on a change in pull request #7550: IGNITE-9017 clear-cache-stats

Posted by GitBox <gi...@apache.org>.
ptupitsyn commented on a change in pull request #7550: IGNITE-9017 clear-cache-stats
URL: https://github.com/apache/ignite/pull/7550#discussion_r394914119
 
 

 ##########
 File path: modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheMetricsTest.cs
 ##########
 @@ -180,6 +180,58 @@ public void TestClusterGroupMetrics()
             Assert.AreEqual(0, remoteMetrics.CachePuts);
         }
 
+        /// <summary>
+        /// Test clearing cache metrics
+        /// </summary>
+        [Test]
+        public void TestCacheClearStatistics()
+        {
+            TestClearStatistics("TestCacheClearStatistics", cache => cache.ClearStatistics());
+        }
+
+        /// <summary>
+        /// Tests the cache metrics enable/disable for cluster group
 
 Review comment:
   Misleading comment

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [ignite] gurustron commented on a change in pull request #7550: IGNITE-9017 clear-cache-stats

Posted by GitBox <gi...@apache.org>.
gurustron commented on a change in pull request #7550: IGNITE-9017 clear-cache-stats
URL: https://github.com/apache/ignite/pull/7550#discussion_r395139313
 
 

 ##########
 File path: modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheMetricsTest.cs
 ##########
 @@ -180,6 +180,58 @@ public void TestClusterGroupMetrics()
             Assert.AreEqual(0, remoteMetrics.CachePuts);
         }
 
+        /// <summary>
+        /// Test clearing cache metrics
+        /// </summary>
+        [Test]
+        public void TestCacheClearStatistics()
+        {
+            TestClearStatistics("TestCacheClearStatistics", cache => cache.ClearStatistics());
+        }
+
+        /// <summary>
+        /// Tests the cache metrics enable/disable for cluster group
 
 Review comment:
   fixed

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [ignite] ptupitsyn merged pull request #7550: IGNITE-9017 clear-cache-stats

Posted by GitBox <gi...@apache.org>.
ptupitsyn merged pull request #7550: IGNITE-9017 clear-cache-stats
URL: https://github.com/apache/ignite/pull/7550
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [ignite] ptupitsyn commented on a change in pull request #7550: IGNITE-9017 clear-cache-stats

Posted by GitBox <gi...@apache.org>.
ptupitsyn commented on a change in pull request #7550: IGNITE-9017 clear-cache-stats
URL: https://github.com/apache/ignite/pull/7550#discussion_r394914731
 
 

 ##########
 File path: modules/platforms/dotnet/Apache.Ignite.Core/Cluster/IClusterGroup.cs
 ##########
 @@ -259,5 +259,12 @@ public interface IClusterGroup
         /// <param name="enabled">Enabled flag</param>
         [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "Semantics.")]
         void EnableStatistics(IEnumerable<string> cacheNames, bool enabled);
+
+        /// <summary>
+        /// Clears statistics for caches cluster wide.
+        /// </summary>
+        /// <param name="caches">Collection of cache names.</param>
+        [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "Semantics.")]
 
 Review comment:
   Do we really need this suppression? Is there a warning? Same for the method above.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [ignite] ptupitsyn commented on a change in pull request #7550: IGNITE-9017 clear-cache-stats

Posted by GitBox <gi...@apache.org>.
ptupitsyn commented on a change in pull request #7550: IGNITE-9017 clear-cache-stats
URL: https://github.com/apache/ignite/pull/7550#discussion_r394913489
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cluster/PlatformClusterGroup.java
 ##########
 @@ -638,4 +638,24 @@ private void writeDataStorageMetrics(BinaryRawWriter writer, DataStorageMetrics
         writer.writeLong(metrics.getLastCheckpointDataPagesNumber());
         writer.writeLong(metrics.getLastCheckpointCopiedOnWritePagesNumber());
     }
+
+    /**
+     * Reads collection of strings
+     *
+     * @param reader Reader.
+     */
+    private Collection<String> readStrings(BinaryRawReader reader) {
+        assert reader != null;
+
+        int cnt = reader.readInt();
+
+        Collection<String> cacheNames = new ArrayList<>(cnt);
+
+        for (int i = 0; i < cnt; i++) {
+            cacheNames.add(reader.readString());
+        }
+
+        return cacheNames;
+    }
+
 
 Review comment:
   Redundant blank line

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services