Currently all the TimeWindow based reporter has to wait for the next time window to report the metrics. To make it work from a batch job or from a Lambda function, client will have to sleep for at least the reporting frequency (60 seconds by default) at the end of the job.
Instead we need to add a JVM shutdown hook that would flush and report the metrics from the current time window.