#include "partition_alloc/partition_lock.h"
#include <vector>
#include "base/timer/lap_timer.h"
#include "partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h"
#include "partition_alloc/partition_alloc_base/time/time.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/perf/perf_result_reporter.h"
namespace partition_alloc::internal {
namespace {
constexpr int kWarmupRuns = …;
constexpr ::base::TimeDelta kTimeLimit = …;
constexpr int kTimeCheckInterval = …;
constexpr char kMetricPrefixLock[] = …;
constexpr char kMetricLockUnlockThroughput[] = …;
constexpr char kMetricLockUnlockLatency[] = …;
constexpr char kStoryBaseline[] = …;
constexpr char kStoryWithCompetingThread[] = …;
perf_test::PerfResultReporter SetUpReporter(const std::string& story_name) { … }
class Spin : public base::PlatformThreadForTesting::Delegate { … };
}
TEST(PartitionLockPerfTest, Simple) { … }
TEST(PartitionLockPerfTest, WithCompetingThreads) { … }
}