#include <folly/GLog.h>
#include <folly/portability/GTest.h>
#include <vector>
Go to the source code of this file.
TEST |
( |
LogEveryMs |
, |
|
|
basic |
|
|
) |
| |
Definition at line 23 of file GLogTest.cpp.
References EXPECT_TRUE, FB_LOG_EVERY_MS, i, and now().
24 std::vector<std::chrono::steady_clock::time_point> hist;
26 while (hist.size() < 10) {
32 bool atLeastOneIsGood =
false;
33 for (
size_t i = 0;
i < hist.size() - 1; ++
i) {
34 auto delta = hist[
i + 1] - hist[
i];
35 if (delta > std::chrono::milliseconds(5) &&
36 delta < std::chrono::milliseconds(15)) {
37 atLeastOneIsGood =
true;
std::chrono::steady_clock::time_point now()
#define FB_LOG_EVERY_MS(severity, milli_interval)
#define EXPECT_TRUE(condition)
TEST |
( |
LogEveryMs |
, |
|
|
zero |
|
|
) |
| |