private void mapToStatEventAndSend(
            final List<HeapHistogramService.HeapHistogramEntry> heapHistogramEntries,
            final Function<HeapHistogramService.HeapHistogramEntry, InternalStatisticEvent> mapper,
            final String type) {

        final List<InternalStatisticEvent> statisticEvents = heapHistogramEntries.stream()
                .map(mapper)
                .collect(Collectors.toList());

        LOGGER.info("Sending {} '{}' histogram stat events", statisticEvents.size(), type);

        internalStatisticsReceiver.putEvents(statisticEvents);
    }
Class for running scheduled jobs to execute a jmap heap histogram and load the results into
the {@link InternalStatisticsReceiver}. This is for use in identifying memory issues at run time
by capturing a regular snapshot of both the number of instances of classes and the bytes in use.
<p>
As with all internal statistics it is reliant on the stat key being configured in stroom properties
(i.e. stroomCoreServerPropertyContext
stroom-node/stroom-node-impl/src/main/java/stroom/node/impl/HeapHistogramStatisticsExecutor.java