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/TimeSeriesRateAggregatorTests.java
return new NumberFieldMapper.NumberFieldType(
            name,
            NumberFieldMapper.NumberType.LONG,
            true,
            false,
            true,
            false,
            null,
            Collections.emptyMap(),
            null,
            false,
            TimeSeriesParams.MetricType.COUNTER,
            IndexMode.TIME_SERIES
        );
    }
    private DateFieldMapper.DateFieldType timeStampField() {
        return new DateFieldMapper.DateFieldType(
            "@timestamp",
            true,
            false,
            true,
            DateFieldMapper.DEFAULT_DATE_TIME_FORMATTER,
            DateFieldMapper.Resolution.MILLISECONDS,
            null,
            null,
            Collections.emptyMap()
        );
    }
}