/
githubmr
/
facebook-react-native
Обзор
Документация
Войти
/
githubmr
/
facebook-react-native
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
packages/react-native/ReactCommon/react/performance/timeline/PerformanceEntryBuffer.h
40 строк
1 KB
Ruslan Lesiutin
Replace DOMHighResTimeStamp alias in ReactCommon with new abstractions (#51512)
22 май 2025, 20:16
22 май 2025, 20:16
f03268b
Код
Авторство
О чём код?
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <vector> #include "PerformanceEntry.h" namespace facebook::react { // Default duration threshold for reporting performance entries (0 means "report // all") constexpr HighResDuration DEFAULT_DURATION_THRESHOLD = HighResDuration::zero(); /** * Abstract performance entry buffer with reporting flags. * Subtypes differ on how entries are stored. */ class PerformanceEntryBuffer { public: HighResDuration durationThreshold = DEFAULT_DURATION_THRESHOLD; size_t droppedEntriesCount{0}; explicit PerformanceEntryBuffer() = default; virtual ~PerformanceEntryBuffer() = default; virtual void add(const PerformanceEntry& entry) = 0; virtual void getEntries(std::vector<PerformanceEntry>& target) const = 0; virtual void getEntries( std::vector<PerformanceEntry>& target, const std::string& name) const = 0; virtual void clear() = 0; virtual void clear(const std::string& name) = 0; }; } // namespace facebook::react