Currently when using `unit` parameter in the `rate` aggregator in time series mode (meaning the `rate` aggregation is defined as a child aggregation of `time_series` aggregation) then this parameter is ignored. We should investigate whether this parameter can be supported for computing rate in time series mode.
x-pack/plugin/analytics/src/test/java/org/elasticsearch/xpack/analytics/rate/InternalResetTrackingRateTests.java
List<InternalResetTrackingRate> internalRates = new ArrayList<>();
        double startValue = 0, currentValue = 0;
        double resetComp = 0;
        long startTime = 0;
        long endTime = 0;
        while (internalRates.size() < size - 1) {
            endTime += 1000;
            currentValue += 10;
            if (randomInt(30) == 0) {
                resetComp += currentValue;
                currentValue = 0;
            }
            if (randomInt(45) == 0) {
                internalRates.add(rate(startValue, currentValue, startTime, endTime, resetComp));
                startValue = currentValue;
                resetComp = 0;
                startTime = endTime;
            }
        }
        if (startTime == endTime) {
            endTime += 1000;
            currentValue += 10;
        }
        internalRates.add(rate(startValue, currentValue, startTime, endTime, resetComp));
        return new BuilderAndToReduce<>(mock(RateAggregationBuilder.class), internalRates);
    }