mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
c17333d4c1
Summary: Changelog: [Internal] Log image-requested QPL point for Fabric images * See D23450649 for the full lifecycle Reviewed By: fkgozali Differential Revision: D23448179 fbshipit-source-id: 0a78dae2d4f1e6322bbeee3574b10abe1efb30ef
44 lines
963 B
C++
44 lines
963 B
C++
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#include <react/renderer/core/ReactPrimitives.h>
|
|
#include <react/utils/Telemetry.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
/*
|
|
* Represents telemetry data associated with a image request
|
|
*/
|
|
class ImageTelemetry final {
|
|
public:
|
|
ImageTelemetry(SurfaceId const surfaceId) : surfaceId_(surfaceId) {}
|
|
|
|
/*
|
|
* Signaling
|
|
*/
|
|
void willRequestUrl();
|
|
|
|
/*
|
|
* Reading
|
|
*/
|
|
TelemetryTimePoint getWillRequestUrlTime() const;
|
|
|
|
SurfaceId getSurfaceId() const;
|
|
std::string getLoaderModuleName() const;
|
|
void setLoaderModuleName(std::string const &loaderModuleName);
|
|
|
|
private:
|
|
TelemetryTimePoint willRequestUrlTime_{kTelemetryUndefinedTimePoint};
|
|
|
|
const SurfaceId surfaceId_;
|
|
std::string loaderModuleName_{""};
|
|
};
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|