Commit d06843a4 authored by Giuseppe Ottaviano's avatar Giuseppe Ottaviano Committed by Facebook GitHub Bot

Promote DigestBuilder out of detail

Summary: `DigestBuilder` is a useful companion to `TDigest` (already public), has a simple and well-defined interface, better documentation than most classes in the parent directory, tests, and benchmarks. It doesn't need to be in `detail/`, and it can be useful for use cases not covered by `BufferedStat`, for example when sub-second resolution and a precise flush schedule are required.

Reviewed By: philippv, luciang

Differential Revision: D31643638

fbshipit-source-id: 4f2f54a933942cbe02d08cd63ab5fc04f13630e3
parent 9eef9f86
......@@ -21,7 +21,6 @@
#include <folly/concurrency/CacheLocality.h>
namespace folly {
namespace detail {
template <typename DigestT>
DigestBuilder<DigestT>::DigestBuilder(size_t bufferSize, size_t digestSize)
......@@ -82,5 +81,4 @@ void DigestBuilder<DigestT>::append(double value) {
}
}
} // namespace detail
} // namespace folly
......@@ -22,7 +22,6 @@
#include <folly/SpinLock.h>
namespace folly {
namespace detail {
/*
* Stat digests, such as TDigest, can be expensive to merge. It is faster to
......@@ -72,7 +71,6 @@ class DigestBuilder {
size_t digestSize_;
};
} // namespace detail
} // namespace folly
#include <folly/stats/detail/DigestBuilder-inl.h>
#include <folly/stats/DigestBuilder-inl.h>
......@@ -17,7 +17,7 @@
#pragma once
#include <folly/SharedMutex.h>
#include <folly/stats/detail/DigestBuilder.h>
#include <folly/stats/DigestBuilder.h>
#include <folly/stats/detail/SlidingWindow.h>
namespace folly {
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include <folly/stats/detail/DigestBuilder.h>
#include <folly/stats/DigestBuilder.h>
#include <chrono>
#include <condition_variable>
......@@ -29,7 +29,6 @@
DEFINE_int32(digest_merge_time_ns, 5500, "Time to merge into the digest");
using namespace folly;
using namespace folly::detail;
class FreeDigest {
public:
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include <folly/stats/detail/DigestBuilder.h>
#include <folly/stats/DigestBuilder.h>
#include <chrono>
#include <random>
......@@ -24,7 +24,6 @@
#include <folly/portability/GTest.h>
using namespace folly;
using namespace folly::detail;
template <size_t MergeSize>
class SimpleDigest {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment