chromium/cc/metrics/event_latency_tracing_recorder.cc

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

#include "cc/metrics/event_latency_tracing_recorder.h"

#include "base/feature_list.h"
#include "base/notreached.h"
#include "base/ranges/algorithm.h"
#include "base/time/time.h"
#include "base/trace_event/trace_id_helper.h"
#include "base/trace_event/typed_macros.h"
#include "base/tracing/protos/chrome_track_event.pbzero.h"
#include "cc/base/features.h"
#include "cc/metrics/event_metrics.h"
#include "third_party/perfetto/include/perfetto/tracing/track.h"

namespace cc {
namespace {

constexpr char kTracingCategory[] =;

bool IsTracingEnabled() {}

constexpr base::TimeDelta high_latency_threshold =;

constexpr perfetto::protos::pbzero::EventLatency::EventType ToProtoEnum(
    EventMetrics::EventType event_type) {}

const char* GetVizBreakdownToPresentationName(
    CompositorFrameReporter::VizBreakdown breakdown) {}

}  // namespace

// static
const char* EventLatencyTracingRecorder::GetDispatchBreakdownName(
    EventMetrics::DispatchStage start_stage,
    EventMetrics::DispatchStage end_stage) {}

// static
const char* EventLatencyTracingRecorder::GetDispatchToCompositorBreakdownName(
    EventMetrics::DispatchStage dispatch_stage,
    CompositorFrameReporter::StageType compositor_stage) {}

// static
const char* EventLatencyTracingRecorder::GetDispatchToTerminationBreakdownName(
    EventMetrics::DispatchStage dispatch_stage) {}

// static
void EventLatencyTracingRecorder::RecordEventLatencyTraceEvent(
    EventMetrics* event_metrics,
    base::TimeTicks termination_time,
    base::TimeDelta vsync_interval,
    const std::vector<CompositorFrameReporter::StageData>* stage_history,
    const CompositorFrameReporter::ProcessedVizBreakdown* viz_breakdown) {}

// static
bool EventLatencyTracingRecorder::IsEventLatencyTracingEnabled() {}

void EventLatencyTracingRecorder::RecordEventLatencyTraceEventInternal(
    const EventMetrics* event_metrics,
    base::TimeTicks termination_time,
    base::TimeDelta vsync_interval,
    const std::vector<CompositorFrameReporter::StageData>* stage_history,
    const CompositorFrameReporter::ProcessedVizBreakdown* viz_breakdown) {}

}  // namespace cc