ui: fix LAT mapping
This commit is contained in:
parent
c37b27d1d2
commit
1f824502be
4 changed files with 8 additions and 5 deletions
|
|
@ -27,8 +27,9 @@ function LongTaskPanel() {
|
|||
const [searchValue, setSearchValue] = React.useState('');
|
||||
|
||||
const { currentTab, tabStates } = store.get();
|
||||
const longTasks: LongAnimationTask[] = mockData; //tabStates[currentTab]?.longTasksList || [];
|
||||
const longTasks = tabStates[currentTab]?.longTaskList || [];
|
||||
|
||||
console.log('list', longTasks)
|
||||
const filteredList = useRegExListFilterMemo(
|
||||
longTasks,
|
||||
(task: LongAnimationTask) => [
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import {
|
|||
} from 'Player/web/messages';
|
||||
import ListWalker from '../common/ListWalker';
|
||||
import ListWalkerWithMarks from '../common/ListWalkerWithMarks';
|
||||
import { ILongAnimationTask } from './types/longTask';
|
||||
|
||||
type stackMsg = {
|
||||
name: string;
|
||||
|
|
@ -44,7 +45,7 @@ type MsgTypeMap = {
|
|||
profilerList: profilerMsg;
|
||||
exceptionsList: exceptionsMsg;
|
||||
frustrationsList: Issue | InjectedEvent;
|
||||
longTaskList: longTaskMsg;
|
||||
longTaskList: ILongAnimationTask;
|
||||
};
|
||||
type ListMessageType<K> = K extends keyof MsgTypeMap
|
||||
? Array<MsgTypeMap[K]>
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ import { TYPES as EVENT_TYPES } from 'Types/session/event';
|
|||
import { Decoder } from 'syncod';
|
||||
|
||||
import type { PerformanceChartPoint } from './managers/PerformanceTrackManager';
|
||||
import { getLongTask } from './types/longTask';
|
||||
|
||||
export interface TabState extends ListsState {
|
||||
performanceAvailability?: PerformanceTrackManager['availability'];
|
||||
|
|
@ -338,7 +339,7 @@ export default class TabSessionManager {
|
|||
this.lists.lists.profiles.append(msg);
|
||||
break;
|
||||
case MType.LongAnimationTask:
|
||||
this.lists.lists.longTask.append(msg);
|
||||
this.lists.lists.longTask.append(getLongTask(msg));
|
||||
break;
|
||||
/* ===|=== */
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export interface LATOptions {
|
|||
}
|
||||
|
||||
export default function (app: App, opts: Partial<LATOptions>): void {
|
||||
if (!opts.longTasks || !('PerformanceObserver' in window) || !('LongTaskObserver' in window)) {
|
||||
if (!opts.longTasks || !('PerformanceObserver' in window)) {
|
||||
return;
|
||||
}
|
||||
const onEntry = (entry: LongAnimationTask) => {
|
||||
|
|
@ -58,4 +58,4 @@ export default function (app: App, opts: Partial<LATOptions>): void {
|
|||
app.attachStopCallback(() => {
|
||||
observer.disconnect()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue