Tree observer

Summary:
Added concept of a tree observer which is responsible for listening to the changes for a portion of the UI tree. This structure nests so Tree observers can hold child tree observers which emit events on a different cadence. This structure should allow us to incorporate different UI frameworks down the road as well as native android views.

We push the tree updates from the tree observers onto a channel and setup a coroutine to consume this channel, serialize and send down the wire.

Reviewed By: lblasa

Differential Revision: D39276681

fbshipit-source-id: a4bc23b3578a8a10b57dd11fe88b273e1ce09ad8
This commit is contained in:
Luke De Feo
2022-09-12 03:48:43 -07:00
committed by Facebook GitHub Bot
parent c76c993ce4
commit 9a270cdc7a
16 changed files with 480 additions and 53 deletions

View File

@@ -71,17 +71,24 @@ export const columns: DataTableColumn<PerfStatsEvent>[] = [
},
},
{
key: 'scanComplete',
title: 'Scan time',
key: 'traversalComplete',
title: 'Traversal time (Main thread)',
onRender: (row: PerfStatsEvent) => {
return formatDiff(row.start, row.scanComplete);
return formatDiff(row.start, row.traversalComplete);
},
},
{
key: 'queuingComplete',
title: 'Queuing time',
onRender: (row: PerfStatsEvent) => {
return formatDiff(row.traversalComplete, row.queuingComplete);
},
},
{
key: 'serializationComplete',
title: 'Serialization time',
onRender: (row: PerfStatsEvent) => {
return formatDiff(row.scanComplete, row.serializationComplete);
return formatDiff(row.queuingComplete, row.serializationComplete);
},
},
{