private void run(final String[] args) throws SQLException {

        try (final Connection connection = statisticsDbConnProvider.getConnection()) {
            LOGGER.info("Clearing SQL_STAT_VAL_SRC");
            final PreparedStatement stmt = connection.prepareStatement("delete from SQL_STAT_VAL_SRC");
            int count = stmt.executeUpdate();
            LOGGER.info("Deleted {} rows", count);
        }

        getRowCount();

        final Instant nowIsh = Instant.now()
                .truncatedTo(ChronoUnit.MINUTES);

        SQLStatisticAggregateMap statisticAggregateMap = new SQLStatisticAggregateMap();

        Instant startTime = nowIsh;
        startTime = generateEvents(startTime, Duration.ofHours(1), Duration.ofSeconds(30), statisticAggregateMap);
        startTime = generateEvents(startTime, Duration.ofDays(1), Duration.ofMinutes(30), statisticAggregateMap);
        startTime = generateEvents(startTime, Duration.ofDays(31), Duration.ofHours(6), statisticAggregateMap);
        startTime = generateEvents(startTime, Duration.ofDays(365), Duration.ofDays(1), statisticAggregateMap);

        LOGGER.info("{}", statisticAggregateMap);

        // flush the map to SQL_STAT_VAL_SRC
        sqlStatisticFlushTaskHandler.exec(statisticAggregateMap);

        getRowCount();
    }
Useful for injecting stats into SQL_STAT_VAL_SRC, either to manually test aggregation
or to produce data to view in a dash
stroom-app/src/test/java/stroom/statistics/impl/sql/GenerateStatValSourceRows.java