Remove "first-input" event type from Event Timing API logging implementation (#35771)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35771

[Changelog][Internal]
Based on the internal discussion, we don't want to report `first-input` event types for RN (just use plain `event` instead), in the way that [Event Timing API standard suggests](https://www.w3.org/TR/event-timing), as this is doesn't have that clear semantics in the context of RN, also to keep it simpler.

Reviewed By: rubennorte

Differential Revision: D42341923

fbshipit-source-id: eff2487dee17ef082604e4c807b4d41485328114
This commit is contained in:
Ruslan Shestopalyuk
2023-01-04 08:29:15 -08:00
committed by Facebook GitHub Bot
parent 805b88c7a4
commit 3aea05651d
7 changed files with 7 additions and 35 deletions
@@ -170,15 +170,12 @@ void PerformanceEntryReporter::event(
const std::string &name,
double startTime,
double duration,
bool isFirstInput,
double processingStart,
double processingEnd,
uint32_t interactionId) {
logEntry(
{name,
static_cast<int>(
isFirstInput ? PerformanceEntryType::FIRST_INPUT
: PerformanceEntryType::EVENT),
static_cast<int>(PerformanceEntryType::EVENT),
startTime,
duration,
processingStart,
@@ -267,12 +264,10 @@ void PerformanceEntryReporter::onEventEnd(EventTag tag) {
// TODO: Define the way to assign interaction IDs to the event chains
// (T141358175)
const uint32_t interactionId = 0;
bool firstInput = isFirstInput(name);
event(
std::move(name),
entry.startTime,
timeStamp - entry.startTime,
firstInput,
entry.dispatchTime,
timeStamp,
interactionId);