chromium/third_party/blink/renderer/platform/heap/test/allocation_perftest.cc

// Copyright 2021 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <memory>
#include <string>

#include "base/time/time.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/perf/perf_result_reporter.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/heap/heap_test_utilities.h"
#include "third_party/blink/renderer/platform/heap/thread_state_scopes.h"
#include "third_party/blink/renderer/platform/heap/trace_traits.h"

namespace blink {

namespace {

class AllocationPerfTest : public TestSupportingGC {};

class TinyObject final : public GarbageCollected<TinyObject> {};

class LargeObject final : public GarbageCollected<LargeObject> {};

template <typename Callback>
base::TimeDelta TimedRun(Callback callback) {}

constexpr char kMetricPrefix[] =;
constexpr char kMetricThroughput[] =;

perf_test::PerfResultReporter SetUpReporter(const std::string& story_name) {}

}  // namespace

template <>
struct ThreadingTrait<TinyObject> {};

template <>
struct ThreadingTrait<LargeObject> {};

TEST_F(AllocationPerfTest, Allocate10MTiny) {}

TEST_F(AllocationPerfTest, Allocate10MLarge) {}

}  // namespace blink