From 55c03492749a70351294b547a90c2091998df756 Mon Sep 17 00:00:00 2001 From: "jiachun.fjc" Date: Fri, 2 Nov 2018 10:53:17 -0700 Subject: [PATCH] Thread.sleep() in StatisticsCollector (#4588) Summary: In 'StatisticsCollector', the call of Thread.sleep() might be better outside the loop? Pull Request resolved: https://github.com/facebook/rocksdb/pull/4588 Differential Revision: D12903406 Pulled By: sagar0 fbshipit-source-id: 1647ed779e9972bc2cea03f4c38e37ab3ad7c361 --- java/src/main/java/org/rocksdb/StatisticsCollector.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/src/main/java/org/rocksdb/StatisticsCollector.java b/java/src/main/java/org/rocksdb/StatisticsCollector.java index 48cf8af88..fb3f57150 100644 --- a/java/src/main/java/org/rocksdb/StatisticsCollector.java +++ b/java/src/main/java/org/rocksdb/StatisticsCollector.java @@ -93,9 +93,9 @@ public class StatisticsCollector { statsCallback.histogramCallback(histogramType, histogramData); } } - - Thread.sleep(_statsCollectionInterval); } + + Thread.sleep(_statsCollectionInterval); } catch (final InterruptedException e) { Thread.currentThread().interrupt();