Files
react-native/ReactCommon/react/renderer/imagemanager/ImageTelemetry.h
T
Paige Sun c17333d4c1 5/6 Log image-requested QPL point for Fabric images
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
2020-09-11 15:09:12 -07:00

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