private void calculateNextWindow() {
        // Reset the message count.
        messageTracker = 0;

        // Calculate the next window start time.
        long now = Time.SYSTEM.milliseconds();
        if (nextWindowStarts > 0) {
            while (nextWindowStarts <= now) {
                nextWindowStarts += windowSizeMs;
            }
        } else {
            nextWindowStarts = now + windowSizeMs;
        }
    }
This throughput generator configures constant throughput.

The lower the window size, the smoother the traffic will be. Using a 100ms window offers no noticeable spikes in
traffic while still being long enough to avoid too much overhead.

Here is an example spec:

{
   "type": "constant",
   "messagesPerWindow": 50,
   "windowSizeMs": 100
}

This will produce a workload that runs 500 messages per second, with a maximum resolution of 50 messages per 100
millisecond.

If `messagesPerWindow` is less than or equal to 0, `throttle` will not throttle at all and will return immediately.
trogdor/src/main/java/org/apache/kafka/trogdor/workload/ConstantThroughputGenerator.java