From 30c8710fa680284a5a4dab07dff79e06fa4f8e87 Mon Sep 17 00:00:00 2001 From: "Svetlana.Zemlyanskaya" Date: Mon, 23 Dec 2019 16:34:02 +0100 Subject: [PATCH] FUS: check if there are files to send more often GitOrigin-RevId: b9c8b7825945cdd4d75e96ce4b878e1adbd8f9c5 --- .../internal/statistic/eventLog/EventLogStatisticsService.java | 2 +- .../statistic/eventLog/fus/FeatureUsageEventLoggerProvider.kt | 3 ++- .../internal/statistic/updater/StatisticsJobsScheduler.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/platform/statistics/src/com/intellij/internal/statistic/eventLog/EventLogStatisticsService.java b/platform/statistics/src/com/intellij/internal/statistic/eventLog/EventLogStatisticsService.java index 87377aef6763..34cbbf917094 100644 --- a/platform/statistics/src/com/intellij/internal/statistic/eventLog/EventLogStatisticsService.java +++ b/platform/statistics/src/com/intellij/internal/statistic/eventLog/EventLogStatisticsService.java @@ -25,7 +25,7 @@ import java.util.zip.GZIPOutputStream; public class EventLogStatisticsService implements StatisticsService { private static final Logger LOG = Logger.getInstance(EventLogStatisticsService.class); - private static final int MAX_FILES_TO_SEND = 20; + private static final int MAX_FILES_TO_SEND = 5; private final String myRecorder; private final EventLogSettingsService mySettingsService; diff --git a/platform/statistics/src/com/intellij/internal/statistic/eventLog/fus/FeatureUsageEventLoggerProvider.kt b/platform/statistics/src/com/intellij/internal/statistic/eventLog/fus/FeatureUsageEventLoggerProvider.kt index 86fbb5653bb0..38a350da97f1 100644 --- a/platform/statistics/src/com/intellij/internal/statistic/eventLog/fus/FeatureUsageEventLoggerProvider.kt +++ b/platform/statistics/src/com/intellij/internal/statistic/eventLog/fus/FeatureUsageEventLoggerProvider.kt @@ -5,8 +5,9 @@ import com.intellij.internal.statistic.eventLog.StatisticsEventLoggerProvider import com.intellij.internal.statistic.utils.StatisticsUploadAssistant import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.util.registry.Registry +import java.util.concurrent.TimeUnit -class FeatureUsageEventLoggerProvider : StatisticsEventLoggerProvider("FUS", 32) { +class FeatureUsageEventLoggerProvider : StatisticsEventLoggerProvider("FUS", 33, sendFrequencyMs = TimeUnit.MINUTES.toMillis(15)) { override fun isRecordEnabled(): Boolean { return !ApplicationManager.getApplication().isUnitTestMode && Registry.`is`("feature.usage.event.log.collect.and.upload") && diff --git a/platform/statistics/src/com/intellij/internal/statistic/updater/StatisticsJobsScheduler.java b/platform/statistics/src/com/intellij/internal/statistic/updater/StatisticsJobsScheduler.java index 918323bb44cd..e34e00e1825c 100644 --- a/platform/statistics/src/com/intellij/internal/statistic/updater/StatisticsJobsScheduler.java +++ b/platform/statistics/src/com/intellij/internal/statistic/updater/StatisticsJobsScheduler.java @@ -32,7 +32,7 @@ import java.util.concurrent.TimeUnit; final class StatisticsJobsScheduler implements ApplicationInitializedListener { private static final int SEND_STATISTICS_INITIAL_DELAY_IN_MILLIS = 5 * 60 * 1000; - private static final int CHECK_STATISTICS_PROVIDERS_DELAY_IN_MIN = 20; + private static final int CHECK_STATISTICS_PROVIDERS_DELAY_IN_MIN = 1; public static final int LOG_APPLICATION_STATES_INITIAL_DELAY_IN_MIN = 15; public static final int LOG_APPLICATION_STATES_DELAY_IN_MIN = 24 * 60;