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 2021/03/03 00:54:07 UTC

[GitHub] [ignite] Sega76 commented on a change in pull request #8840: IGNITE-14255: Added the ability to flush all performance statistics buffers to the current file and start recording to the next file.

Sega76 commented on a change in pull request #8840:
URL: https://github.com/apache/ignite/pull/8840#discussion_r586022448



##########
File path: modules/control-utility/src/test/java/org/apache/ignite/util/PerformanceStatisticsCommandTest.java
##########
@@ -73,6 +80,16 @@ public void testCommands() throws Exception {
         assertEquals(EXIT_CODE_OK, res);
         assertEquals(STATUS_ENABLED, lastOperationResult);
 
+        res = execute(PERFORMANCE_STATISTICS.text(), ROTATE.toString());
+
+        assertEquals(EXIT_CODE_OK, res);

Review comment:
       fixed

##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/performancestatistics/PerformanceStatisticsProcessor.java
##########
@@ -278,6 +297,30 @@ private void stopWriter() {
         log.info("Performance statistics writer stopped.");
     }
 
+    /** Rotate performance statistics writer. */
+    public void rotateWriter() {
+        try {
+            synchronized (mux) {
+                if (writer == null)
+                    return;
+
+                FilePerformanceStatisticsWriter newWriter = new FilePerformanceStatisticsWriter(ctx);
+
+                newWriter.start();
+
+                FilePerformanceStatisticsWriter oldWriter = writer;
+
+                writer = newWriter;
+
+                oldWriter.stop();
+            }

Review comment:
       done




----------------------------------------------------------------
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