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
@Override
    protected LeafBucketCollector getLeafCollector(AggregationExecutionContext aggCtx, LeafBucketCollector sub) throws IOException {
        NumericDoubleValues leafValues = MultiValueMode.MAX.select(valuesSource.doubleValues(aggCtx.getLeafReaderContext()));
        return new LeafBucketCollectorBase(sub, null) {
            @Override
            public void collect(int doc, long bucket) throws IOException {
                leafValues.advanceExact(doc);   
                double latestValue = leafValues.doubleValue();
                if (bucket != currentBucket) {
                    startValues = bigArrays().grow(startValues, bucket + 1);
                    endValues = bigArrays().grow(endValues, bucket + 1);
                    startTimes = bigArrays().grow(startTimes, bucket + 1);
                    endTimes = bigArrays().grow(endTimes, bucket + 1);
                    resetCompensations = bigArrays().grow(resetCompensations, bucket + 1);
                    if (currentTsid != aggCtx.getTsidOrd()) {
                        
                        calculateLastBucket();
                        currentTsid = aggCtx.getTsidOrd();
                    } else {
                        
                        
                        currentStartTime = aggCtx.getTimestamp();
                        currentStartValue = checkForResets(latestValue);
                        calculateLastBucket();
                    }
                    currentBucket = bucket;
                    currentStartTime = currentEndTime = aggCtx.getTimestamp();
                    currentStartValue = currentEndValue = latestValue;
                    resetCompensation = 0;
                } else {