/* * 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 #include #include #include "NativePerformanceObserver.h" namespace facebook::react { class PerformanceEntryReporter; #pragma mark - Structs #pragma mark - implementation class NativePerformance : public NativePerformanceCxxSpec, std::enable_shared_from_this { public: NativePerformance(std::shared_ptr jsInvoker); void mark(jsi::Runtime &rt, std::string name, double startTime, double duration); void clearMarks(jsi::Runtime &rt, std::optional markName); void measure( jsi::Runtime &rt, std::string name, double startTime, double endTime, std::optional duration, std::optional startMark, std::optional endMark); void clearMeasures(jsi::Runtime &rt, std::optional measureName); private: }; } // namespace facebook::react