protected void accept()

in usage-statistics-util/src/jetbrains/buildServer/usageStatistics/impl/providers/BaseToolUsersUsageStatisticsProvider.java [63:78]


  protected void accept(@NotNull final UsageStatisticsPublisher publisher,
                        @NotNull final UsageStatisticsPresentationManager presentationManager,
                        @NotNull final String periodDescription,
                        final long startDate) {
    removeObsolete();
    final Map<String, Map<Long, Long>> filtered = filter(startDate);
    final UsageStatisticsFormatter formatter = new PercentageFormatter(getTotalUsersCount(startDate));
    filtered.keySet().stream()
            .filter(this::publishToolUsages)
            .sorted()
            .forEach(toolIdSource -> {
              final String statisticId = makeId(periodDescription, toolIdSource);
              presentationManager.applyPresentation(statisticId, toolIdSource, myGroupName, formatter, getValueTooltip());
              publisher.publishStatistic(statisticId, filtered.get(toolIdSource).size());
            });
  }