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