Files
react-native/ReactCommon/react/renderer/imagemanager/ImageTelemetry.h
T
Andres Suarez 8bd3edec88 Update copyright headers from Facebook to Meta
Reviewed By: aaronabramov

Differential Revision: D33367752

fbshipit-source-id: 4ce94d184485e5ee0a62cf67ad2d3ba16e285c8f
2021-12-30 15:11:21 -08:00

38 lines
856 B
C++

/*
* 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 <react/renderer/core/ReactPrimitives.h>
#include <react/utils/Telemetry.h>
namespace facebook {
namespace react {
/*
* Represents telemetry data associated with a image request
* where the willRequestUrlTime is the time at ImageTelemetry's creation.
*/
class ImageTelemetry final {
public:
ImageTelemetry(SurfaceId const surfaceId) : surfaceId_(surfaceId) {
willRequestUrlTime_ = telemetryTimePointNow();
}
TelemetryTimePoint getWillRequestUrlTime() const;
SurfaceId getSurfaceId() const;
private:
TelemetryTimePoint willRequestUrlTime_;
const SurfaceId surfaceId_;
};
} // namespace react
} // namespace facebook