#include "third_party/blink/renderer/core/timing/performance_timing_for_reporting.h"
#include "third_party/blink/public/common/performance/largest_contentful_paint_type.h"
#include "third_party/blink/public/web/web_performance_metrics_for_reporting.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/document_parser_timing.h"
#include "third_party/blink/renderer/core/dom/document_timing.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/inspector/identifiers_factory.h"
#include "third_party/blink/renderer/core/loader/document_load_timing.h"
#include "third_party/blink/renderer/core/loader/document_loader.h"
#include "third_party/blink/renderer/core/loader/interactive_detector.h"
#include "third_party/blink/renderer/core/paint/timing/lcp_objects.h"
#include "third_party/blink/renderer/core/paint/timing/paint_timing.h"
#include "third_party/blink/renderer/core/paint/timing/paint_timing_detector.h"
#include "third_party/blink/renderer/core/timing/performance.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_load_timing.h"
namespace blink {
namespace {
std::optional<base::TimeTicks> MergeLargestContentfulPaintValues(
const LargestContentfulPaintDetails& timing) { … }
}
static uint64_t ToIntegerMilliseconds(base::TimeDelta duration,
bool cross_origin_isolated_capability) { … }
LargestContentfulPaintDetailsForReporting PerformanceTimingForReporting::
PopulateLargestContentfulPaintDetailsForReporting(
const LargestContentfulPaintDetails& timing) const { … }
PerformanceTimingForReporting::PerformanceTimingForReporting(
ExecutionContext* context)
: … { … }
uint64_t PerformanceTimingForReporting::inputStart() const { … }
base::TimeTicks PerformanceTimingForReporting::NavigationStartAsMonotonicTime()
const { … }
PerformanceTimingForReporting::BackForwardCacheRestoreTimings
PerformanceTimingForReporting::BackForwardCacheRestore() const { … }
uint64_t PerformanceTimingForReporting::FirstPaintForMetrics() const { … }
uint64_t PerformanceTimingForReporting::FirstImagePaint() const { … }
uint64_t
PerformanceTimingForReporting::FirstContentfulPaintIgnoringSoftNavigations()
const { … }
base::TimeTicks PerformanceTimingForReporting::
FirstContentfulPaintRenderedButNotPresentedAsMonotonicTime() const { … }
base::TimeTicks
PerformanceTimingForReporting::FirstContentfulPaintAsMonotonicTimeForMetrics()
const { … }
uint64_t PerformanceTimingForReporting::FirstMeaningfulPaint() const { … }
uint64_t PerformanceTimingForReporting::FirstMeaningfulPaintCandidate() const { … }
LargestContentfulPaintDetailsForReporting
PerformanceTimingForReporting::LargestContentfulPaintDetailsForMetrics() const { … }
LargestContentfulPaintDetailsForReporting PerformanceTimingForReporting::
SoftNavigationLargestContentfulPaintDetailsForMetrics() const { … }
uint64_t PerformanceTimingForReporting::FirstEligibleToPaint() const { … }
uint64_t PerformanceTimingForReporting::FirstInputOrScrollNotifiedTimestamp()
const { … }
std::optional<base::TimeDelta> PerformanceTimingForReporting::FirstInputDelay()
const { … }
std::optional<base::TimeDelta>
PerformanceTimingForReporting::FirstInputTimestamp() const { … }
std::optional<base::TimeTicks>
PerformanceTimingForReporting::FirstInputTimestampAsMonotonicTime() const { … }
std::optional<base::TimeDelta> PerformanceTimingForReporting::FirstScrollDelay()
const { … }
std::optional<base::TimeDelta>
PerformanceTimingForReporting::FirstScrollTimestamp() const { … }
uint64_t PerformanceTimingForReporting::ParseStart() const { … }
uint64_t PerformanceTimingForReporting::ParseStop() const { … }
uint64_t PerformanceTimingForReporting::ParseBlockedOnScriptLoadDuration()
const { … }
uint64_t PerformanceTimingForReporting::
ParseBlockedOnScriptLoadFromDocumentWriteDuration() const { … }
uint64_t PerformanceTimingForReporting::ParseBlockedOnScriptExecutionDuration()
const { … }
uint64_t PerformanceTimingForReporting::
ParseBlockedOnScriptExecutionFromDocumentWriteDuration() const { … }
std::optional<base::TimeDelta>
PerformanceTimingForReporting::PrerenderActivationStart() const { … }
std::optional<base::TimeTicks> PerformanceTimingForReporting::UnloadStart()
const { … }
std::optional<base::TimeTicks> PerformanceTimingForReporting::UnloadEnd()
const { … }
std::optional<base::TimeTicks>
PerformanceTimingForReporting::CommitNavigationEnd() const { … }
std::optional<base::TimeDelta>
PerformanceTimingForReporting::UserTimingMarkFullyLoaded() const { … }
std::optional<base::TimeDelta>
PerformanceTimingForReporting::UserTimingMarkFullyVisible() const { … }
std::optional<base::TimeDelta>
PerformanceTimingForReporting::UserTimingMarkInteractive() const { … }
std::optional<std::tuple<AtomicString, base::TimeDelta>>
PerformanceTimingForReporting::CustomUserTimingMark() const { … }
DocumentLoader* PerformanceTimingForReporting::GetDocumentLoader() const { … }
const DocumentTiming* PerformanceTimingForReporting::GetDocumentTiming() const { … }
const PaintTiming* PerformanceTimingForReporting::GetPaintTiming() const { … }
const DocumentParserTiming*
PerformanceTimingForReporting::GetDocumentParserTiming() const { … }
DocumentLoadTiming* PerformanceTimingForReporting::GetDocumentLoadTiming()
const { … }
InteractiveDetector* PerformanceTimingForReporting::GetInteractiveDetector()
const { … }
PaintTimingDetector* PerformanceTimingForReporting::GetPaintTimingDetector()
const { … }
std::optional<base::TimeDelta>
PerformanceTimingForReporting::MonotonicTimeToPseudoWallTime(
const std::optional<base::TimeTicks>& time) const { … }
std::unique_ptr<TracedValue>
PerformanceTimingForReporting::GetNavigationTracingData() { … }
uint64_t PerformanceTimingForReporting::MonotonicTimeToIntegerMilliseconds(
base::TimeTicks time) const { … }
void PerformanceTimingForReporting::Trace(Visitor* visitor) const { … }
}