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/main/java/org/elasticsearch/xpack/analytics/rate/TimeSeriesRateAggregator.java
super(name, context, parent, metadata);
        this.valuesSource = (ValuesSource.Numeric) valuesSourceConfig.getValuesSource();
        this.startValues = bigArrays().newDoubleArray(1, true);
        this.endValues = bigArrays().newDoubleArray(1, true);
        this.startTimes = bigArrays().newLongArray(1, true);
        this.endTimes = bigArrays().newLongArray(1, true);
        this.resetCompensations = bigArrays().newDoubleArray(1, true);
    }
    @Override
    public InternalAggregation buildEmptyAggregation() {
        return new InternalResetTrackingRate(name, DocValueFormat.RAW, metadata(), 0, 0, 0, 0, 0);
    }
    private void calculateLastBucket() {
        if (currentBucket != -1) {
            startValues.set(currentBucket, currentStartValue);
            endValues.set(currentBucket, currentEndValue);
            startTimes.set(currentBucket, currentStartTime);
            endTimes.set(currentBucket, currentEndTime);
            resetCompensations.set(currentBucket, resetCompensation);
            currentBucket = -1;
        }
    }
    private double checkForResets(double latestValue) {
        if (latestValue > currentStartValue) {
            
            resetCompensation += currentEndValue;
            currentEndValue = latestValue;
        }
        return latestValue;
    }