chromium/third_party/blink/renderer/core/css/selector_statistics.h

// 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.

#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_CSS_SELECTOR_STATISTICS_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_CSS_SELECTOR_STATISTICS_H_

#include "base/time/time.h"
#include "third_party/blink/renderer/platform/heap/collection_support/heap_vector.h"

namespace blink {

class RuleData;

struct RulePerfDataPerRequest {};

// For a given pass to collect matching rules against a single element (i.e.
// `MatchRequest`, this class will gather information about how a rule's
// selector matched (or didn't) along with the elapsed time. These values are
// then aggregated per-rule, outside of the lifetime of this class.
// For performance reasons (the loop where the tracing is logged is very hot and
// we don't want to affect performance of the non-tracing path), a single
// instance of SelectorStatisticsCollector should be used and
// BeginCollectionForRule/EndCollectionForCurrentRule must be called for each
// rule.
class SelectorStatisticsCollector {};

}  // namespace blink

WTF_ALLOW_CLEAR_UNUSED_SLOTS_WITH_MEM_FUNCTIONS()

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_CSS_SELECTOR_STATISTICS_H_