2 * Copyright 2016 Facebook, Inc.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * This file contains explicit instantiations of stats template types.
20 * This allows most users to avoid having to include the template definition
24 #include <folly/stats/BucketedTimeSeries.h>
25 #include <folly/stats/BucketedTimeSeries-defs.h>
27 #include <folly/stats/Histogram.h>
28 #include <folly/stats/Histogram-defs.h>
30 #include <folly/stats/MultiLevelTimeSeries.h>
31 #include <folly/stats/MultiLevelTimeSeries-defs.h>
33 #include <folly/stats/TimeseriesHistogram.h>
34 #include <folly/stats/TimeseriesHistogram-defs.h>
38 template class BucketedTimeSeries<int64_t>;
39 template class Histogram<int64_t>;
40 template class detail::HistogramBuckets<int64_t, Histogram<int64_t>::Bucket>;
41 template class MultiLevelTimeSeries<int64_t>;
42 template class TimeseriesHistogram<int64_t>;
44 // Histogram::getPercentileBucketIdx(), Histogram::getPercentileEstimate()
45 // and Histogram::computeTotalCount()
46 // are implemented using template methods. Instantiate the default versions of
47 // these methods too, so anyone using them won't also need to explicitly
48 // include Histogram-defs.h
49 template unsigned int detail::HistogramBuckets<
50 int64_t, Histogram<int64_t>::Bucket>::
51 getPercentileBucketIdx<Histogram<int64_t>::CountFromBucket>(
53 Histogram<int64_t>::CountFromBucket countFromBucket,
55 double* highPct) const;
56 template int64_t detail::HistogramBuckets<int64_t, Histogram<int64_t>::Bucket>
57 ::getPercentileEstimate<Histogram<int64_t>::CountFromBucket,
58 Histogram<int64_t>::AvgFromBucket>(
60 Histogram<int64_t>::CountFromBucket countFromBucket,
61 Histogram<int64_t>::AvgFromBucket avgFromBucket) const;
62 template uint64_t detail::HistogramBuckets<int64_t, Histogram<int64_t>::Bucket>
63 ::computeTotalCount<Histogram<int64_t>::CountFromBucket>(
64 Histogram<int64_t>::CountFromBucket countFromBucket) const;