chromium/content/browser/scheduler/responsiveness/jank_monitor_impl.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/browser/scheduler/responsiveness/jank_monitor_impl.h"

#include "base/compiler_specific.h"
#include "base/observer_list.h"
#include "base/task/thread_pool.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "ui/base/ui_base_features.h"

namespace content {

JankMonitor::~JankMonitor() = default;

JankMonitor::Observer::~Observer() = default;

// static
scoped_refptr<JankMonitor> JankMonitor::Create() {}

namespace responsiveness {

// Interval of the monitor performing jankiness checks against the watched
// threads.
static constexpr int64_t kMonitorCheckIntervalMs =;
// A task running for longer than |kJankThresholdMs| is considered janky.
static constexpr int64_t kJankThresholdMs =;
// The threshold (10 sec) for shutting down the monitor timer, in microseconds.
static constexpr int64_t kInactivityThresholdUs =;

JankMonitorImpl::JankMonitorImpl()
    :{}

JankMonitorImpl::~JankMonitorImpl() = default;

void JankMonitorImpl::AddObserver(content::JankMonitor::Observer* observer) {}

void JankMonitorImpl::RemoveObserver(content::JankMonitor::Observer* observer) {}

void JankMonitorImpl::SetUp() {}

void JankMonitorImpl::Destroy() {}

void JankMonitorImpl::FinishDestroyMetricSource() {}

void JankMonitorImpl::SetUpOnIOThread() {}

void JankMonitorImpl::TearDownOnUIThread() {}

void JankMonitorImpl::TearDownOnIOThread() {}

void JankMonitorImpl::WillRunTaskOnUIThread(
    const base::PendingTask* task,
    bool /* was_blocked_or_low_priority */) {}

void JankMonitorImpl::DidRunTaskOnUIThread(const base::PendingTask* task) {}

void JankMonitorImpl::WillRunTaskOnIOThread(
    const base::PendingTask* task,
    bool /* was_blocked_or_low_priority */) {}

void JankMonitorImpl::DidRunTaskOnIOThread(const base::PendingTask* task) {}

void JankMonitorImpl::WillRunEventOnUIThread(const void* opaque_identifier) {}

void JankMonitorImpl::DidRunEventOnUIThread(const void* opaque_identifier) {}

void JankMonitorImpl::WillRunTaskOrEvent(
    ThreadExecutionState* thread_exec_state,
    const void* opaque_identifier) {}

void JankMonitorImpl::DidRunTaskOrEvent(ThreadExecutionState* thread_exec_state,
                                        const void* opaque_identifier) {}

void JankMonitorImpl::StartTimerIfNecessary() {}

void JankMonitorImpl::StopTimerIfIdle() {}

std::unique_ptr<MetricSource> JankMonitorImpl::CreateMetricSource() {}

void JankMonitorImpl::DestroyOnMonitorThread() {}

bool JankMonitorImpl::timer_running() const {}

void JankMonitorImpl::OnCheckJankiness() {}

void JankMonitorImpl::OnJankStarted(const void* opaque_identifier) {}

void JankMonitorImpl::OnJankStopped(
    MayBeDangling<const void> opaque_identifier) {}

void JankMonitorImpl::NotifyJankStopIfNecessary(const void* opaque_identifier) {}

JankMonitorImpl::ThreadExecutionState::TaskMetadata::~TaskMetadata() = default;

JankMonitorImpl::ThreadExecutionState::ThreadExecutionState() {}

JankMonitorImpl::ThreadExecutionState::~ThreadExecutionState() = default;

std::optional<const void*>
JankMonitorImpl::ThreadExecutionState::CheckJankiness() {}

void JankMonitorImpl::ThreadExecutionState::WillRunTaskOrEvent(
    const void* opaque_identifier) {}

void JankMonitorImpl::ThreadExecutionState::DidRunTaskOrEvent(
    const void* opaque_identifier) {}

void JankMonitorImpl::ThreadExecutionState::AssertOnTargetThread() {}

}  // namespace responsiveness.
}  // namespace content.