#include "base/metrics/statistics_recorder.h"
#include <atomic>
#include "base/containers/span.h"
#include "base/logging.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/persistent_histogram_allocator.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/threading/platform_thread.h"
#include "base/threading/simple_thread.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
namespace {
constexpr TimeDelta kTestRunningTime = …;
constexpr char kHistogramNamePrefix[] = …;
class BaseThread : public SimpleThread { … };
class ReadThread : public BaseThread { … };
class WriteThread : public BaseThread { … };
}
struct StarvationTestParams { … };
enum class FirstThreadsToStart { … };
class StatisticsRecorderStarvationTest
: public testing::TestWithParam<
std::tuple<StarvationTestParams, FirstThreadsToStart>> { … };
TEST_P(StatisticsRecorderStarvationTest, StatisticsRecorderNoStarvation) { … }
INSTANTIATE_TEST_SUITE_P(…);
}