1/* 2 * Copyright (C) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16import { 17 SelectionParam, 18 BoxJumpParam, 19 SelectionData, 20 Counter, 21 Fps, 22 GpuCounter, 23 SliceBoxJumpParam, 24} from '../../../src/trace/bean/BoxSelection'; 25import { TraceRow } from '../../../src/trace/component/trace/base/TraceRow'; 26import { SpSystemTrace } from '../../../src/trace/component/SpSystemTrace'; 27jest.mock('../../../src/js-heap/model/DatabaseStruct', () => { 28 return {}; 29}); 30jest.mock('../../../src/trace/database/ui-worker/ProcedureWorkerSnapshot', () => { 31 return {}; 32}); 33jest.mock('../../../src/trace/database/ui-worker/ProcedureWorker', () => { 34 return {}; 35}); 36jest.mock('../../../src/trace/component/chart/FrameChart', () => { 37 return {}; 38}); 39 40jest.mock('../../../src/trace/component/trace/sheet/task/TabPaneTaskFrames', () => { 41 return {}; 42}); 43 44jest.mock('../../../src/trace/component/trace/sheet/native-memory/TabPaneNMCallTree', () => { 45 return {}; 46}); 47 48jest.mock('../../../src/trace/component/trace/base/TraceSheet', () => { 49 return {}; 50}); 51 52// @ts-ignore 53window.ResizeObserver = 54 window.ResizeObserver || 55 jest.fn().mockImplementation(() => ({ 56 disconnect: jest.fn(), 57 observe: jest.fn(), 58 unobserve: jest.fn(), 59 })); 60window.IntersectionObserver = jest.fn(); 61 62describe('BoxSelection Test', () => { 63 let sp = new SpSystemTrace(); 64 let itRow = new TraceRow(); 65 let selectionParam = new SelectionParam(); 66 it('BoxSelectionTest01', () => { 67 let selectionParam: SelectionParam; 68 selectionParam = { 69 recordStartNs: 0, 70 cpus: 1, 71 threadIds: 2, 72 trackIds: 1, 73 funTids: 2, 74 heapIds: 1, 75 nativeMemory: 3, 76 leftNs: 1, 77 rightNs: 1, 78 hasFps: true, 79 statisticsSelectData: 1, 80 perfAll: true, 81 }; 82 expect(selectionParam).not.toBeUndefined(); 83 expect(selectionParam).toMatchInlineSnapshot( 84 { 85 recordStartNs: expect.any(Number), 86 cpus: expect.any(Number), 87 threadIds: expect.any(Number), 88 trackIds: expect.any(Number), 89 funTids: expect.any(Number), 90 heapIds: expect.any(Number), 91 nativeMemory: expect.any(Number), 92 leftNs: expect.any(Number), 93 rightNs: expect.any(Number), 94 hasFps: expect.any(Boolean), 95 perfAll: expect.any(Boolean), 96 }, 97 ` 98{ 99 "cpus": Any<Number>, 100 "funTids": Any<Number>, 101 "hasFps": Any<Boolean>, 102 "heapIds": Any<Number>, 103 "leftNs": Any<Number>, 104 "nativeMemory": Any<Number>, 105 "perfAll": Any<Boolean>, 106 "recordStartNs": Any<Number>, 107 "rightNs": Any<Number>, 108 "statisticsSelectData": 1, 109 "threadIds": Any<Number>, 110 "trackIds": Any<Number>, 111} 112` 113 ); 114 }); 115 116 it('BoxSelectionTest02', function () { 117 let boxJumpParam: BoxJumpParam; 118 boxJumpParam = { 119 leftNs: 0, 120 rightNs: 0, 121 state: '', 122 processId: 0, 123 threadId: 0, 124 }; 125 expect(boxJumpParam).not.toBeUndefined(); 126 expect(boxJumpParam).toMatchInlineSnapshot( 127 { 128 leftNs: expect.any(Number), 129 rightNs: expect.any(Number), 130 state: expect.any(String), 131 processId: expect.any(Number), 132 threadId: expect.any(Number), 133 }, 134 ` 135{ 136 "leftNs": Any<Number>, 137 "processId": Any<Number>, 138 "rightNs": Any<Number>, 139 "state": Any<String>, 140 "threadId": Any<Number>, 141} 142` 143 ); 144 }); 145 146 it('BoxSelectionTest03', function () { 147 let selectionData: SelectionData; 148 selectionData = { 149 name: 'name', 150 process: 'process', 151 pid: 'pid', 152 thread: 'thread', 153 tid: 'tid', 154 wallDuration: 0, 155 avgDuration: 'avgDuration', 156 occurrences: 0, 157 state: 'state', 158 trackId: 0, 159 delta: 'delta', 160 rate: 'rate', 161 avgWeight: 'avgWeight', 162 count: 'count', 163 first: 'first', 164 last: 'last', 165 min: 'min', 166 max: 'max', 167 stateJX: 'stateJX', 168 }; 169 expect(selectionData).not.toBeUndefined(); 170 expect(selectionData).toMatchInlineSnapshot( 171 { 172 process: expect.any(String), 173 pid: expect.any(String), 174 thread: expect.any(String), 175 tid: expect.any(String), 176 wallDuration: expect.any(Number), 177 avgDuration: expect.any(String), 178 occurrences: expect.any(Number), 179 state: expect.any(String), 180 trackId: expect.any(Number), 181 delta: expect.any(String), 182 rate: expect.any(String), 183 avgWeight: expect.any(String), 184 count: expect.any(String), 185 first: expect.any(String), 186 last: expect.any(String), 187 min: expect.any(String), 188 max: expect.any(String), 189 stateJX: expect.any(String), 190 }, 191 ` 192{ 193 "avgDuration": Any<String>, 194 "avgWeight": Any<String>, 195 "count": Any<String>, 196 "delta": Any<String>, 197 "first": Any<String>, 198 "last": Any<String>, 199 "max": Any<String>, 200 "min": Any<String>, 201 "name": "name", 202 "occurrences": Any<Number>, 203 "pid": Any<String>, 204 "process": Any<String>, 205 "rate": Any<String>, 206 "state": Any<String>, 207 "stateJX": Any<String>, 208 "thread": Any<String>, 209 "tid": Any<String>, 210 "trackId": Any<Number>, 211 "wallDuration": Any<Number>, 212} 213` 214 ); 215 }); 216 217 it('BoxSelectionTest04', function () { 218 let counter: Counter; 219 counter = { 220 id: 0, 221 trackId: 0, 222 name: '', 223 value: 0, 224 startTime: 0, 225 }; 226 expect(counter).not.toBeUndefined(); 227 expect(counter).toMatchInlineSnapshot( 228 { 229 id: expect.any(Number), 230 trackId: expect.any(Number), 231 name: expect.any(String), 232 value: expect.any(Number), 233 startTime: expect.any(Number), 234 }, 235 ` 236{ 237 "id": Any<Number>, 238 "name": Any<String>, 239 "startTime": Any<Number>, 240 "trackId": Any<Number>, 241 "value": Any<Number>, 242} 243` 244 ); 245 }); 246 247 it('BoxSelectionTest05', function () { 248 let fps: Fps; 249 fps = { 250 startNS: 0, 251 timeStr: '', 252 fps: 0, 253 }; 254 expect(fps).not.toBeUndefined(); 255 expect(fps).toMatchInlineSnapshot( 256 { 257 startNS: expect.any(Number), 258 timeStr: expect.any(String), 259 fps: expect.any(Number), 260 }, 261 ` 262{ 263 "fps": Any<Number>, 264 "startNS": Any<Number>, 265 "timeStr": Any<String>, 266} 267` 268 ); 269 }); 270 271 it('BoxSelectionTest06', function () { 272 let it: TraceRow<any> = { 273 intersectionRatio: 0, 274 isHover: true, 275 hoverX: 129, 276 hoverY: 113, 277 index: 0, 278 must: true, 279 isTransferCanvas: true, 280 isComplete: true, 281 dataList: [ 282 { 283 detail: '自绘制buffer轮转(视频/鼠标等)', 284 depth: 2, 285 name: 'ConsumeAndUpdateAllNodes', 286 parentName: 'unknown-1', 287 property: [ 288 { 289 name: 'ConsumeAndUpdateAllNodes', 290 detail: '自绘制buffer轮转(视频/鼠标等)', 291 end: 512062139514826, 292 begin: 512062139339305, 293 depth: 2, 294 instructions: 0, 295 cycles: 2, 296 frame: { 297 x: 0, 298 y: 40, 299 width: 1, 300 height: 20, 301 }, 302 startTs: 512062138606492, 303 textMetricsWidth: 289.8828125, 304 }, 305 ], 306 }, 307 ], 308 dataList2: [], 309 dataListCache: [ 310 { 311 name: 'OnReadable', 312 detail: 'OnVsync信号回调', 313 end: 512062163748680, 314 begin: 512062138606492, 315 depth: 0, 316 instructions: 132, 317 cycles: 471, 318 frame: { 319 x: 0, 320 y: 0, 321 width: 1, 322 height: 20, 323 }, 324 startTs: 512062138606492, 325 textMetricsWidth: 146.8896484375, 326 }, 327 { 328 name: 'OnReadable', 329 detail: 'OnVsync信号回调', 330 end: 512062233204930, 331 begin: 512062222968471, 332 depth: 0, 333 instructions: 144, 334 cycles: 281, 335 frame: { 336 x: 1, 337 y: 0, 338 width: 1, 339 height: 20, 340 }, 341 startTs: 512062138606492, 342 textMetricsWidth: 146.8896484375, 343 }, 344 ], 345 fixedList: [], 346 sliceCache: [-1, -1], 347 canvas: [], 348 dpr: 1, 349 offscreen: [], 350 canvasWidth: 0, 351 canvasHeight: 0, 352 isLoading: false, 353 tampName: '', 354 templateType: {}, 355 _rangeSelect: true, 356 _drawType: 0, 357 _enableCollapseChart: false, 358 online: false, 359 translateY: 0, 360 childrenList: [], 361 loadingFrame: false, 362 needRefresh: true, 363 funcMaxHeight: 0, 364 sleeping: true, 365 fragment: {}, 366 loadingPin1: 0, 367 loadingPin2: 0, 368 args: { 369 alpha: false, 370 canvasNumber: 0, 371 contextId: '', 372 isOffScreen: false, 373 skeleton: true, 374 }, 375 rootEL: {}, 376 checkBoxEL: { 377 args: null, 378 checkbox: {}, 379 }, 380 collectEL: { 381 args: null, 382 icon: {}, 383 use: {}, 384 d: null, 385 }, 386 describeEl: {}, 387 nameEL: {}, 388 canvasVessel: null, 389 tipEL: null, 390 sampleUploadEl: {}, 391 jsonFileEl: {}, 392 _frame: { 393 x: 0, 394 y: 0, 395 height: 140, 396 width: 422, 397 }, 398 rowType: 'sample', 399 }; 400 401 TraceRow.rangeSelectObject = { 402 startX: 100, 403 endX: 1000, 404 startNS: 0, 405 endNS: 100000, 406 }; 407 expect(selectionParam.pushSampleData(itRow)).toBeUndefined(); 408 }); 409 410 it('BoxSelectionTest07', function () { 411 itRow.rowType = 'cpu-data'; 412 itRow.rowId = '10'; 413 expect(selectionParam.pushCpus(itRow)).toBeUndefined(); 414 }); 415 416 it('BoxSelectionTest08', function () { 417 itRow.rowType = 'cpu-state'; 418 itRow.rowId = '10'; 419 expect(selectionParam.pushCpuStateFilterIds(itRow)).toBeUndefined(); 420 }); 421 422 it('BoxSelectionTest09', function () { 423 itRow.rowType = 'cpu-State'; 424 itRow.childrenList = []; 425 expect(selectionParam.pushCpuStateFilterIds(itRow)).toBeUndefined(); 426 }); 427 428 it('BoxSelectionTest10', function () { 429 itRow.rowType = 'cpu-frequency'; 430 itRow.childrenList = []; 431 expect(selectionParam.pushCpuFreqFilter(itRow)).toBeUndefined(); 432 }); 433 434 it('BoxSelectionTest11', function () { 435 itRow.rowType = 'cpu-freq'; 436 itRow.rowId = '10'; 437 itRow.name = 'aaa'; 438 itRow.childrenList = []; 439 expect(selectionParam.pushCpuFreqFilter(itRow)).toBeUndefined(); 440 }); 441 442 it('BoxSelectionTest12', function () { 443 itRow.rowType = 'cpu-frequency-limit'; 444 itRow.rowId = '10'; 445 itRow.name = 'aaa'; 446 itRow.childrenList = []; 447 expect(selectionParam.pushCpuFreqLimit(itRow)).toBeUndefined(); 448 }); 449 450 it('BoxSelectionTest13', function () { 451 itRow.setAttribute('cpu', '1'); 452 itRow.rowType = 'cpu-limit-freq'; 453 itRow.rowId = '10'; 454 itRow.childrenList = []; 455 expect(selectionParam.pushCpuFreqLimit(itRow)).toBeUndefined(); 456 }); 457 458 it('BoxSelectionTest14', function () { 459 itRow.rowType = 'process'; 460 itRow.rowId = '99'; 461 itRow.setAttribute('hasStartup', 'true'); 462 itRow.setAttribute('hasStaticInit', 'false'); 463 itRow.expansion = false; 464 itRow.childrenList = []; 465 expect(selectionParam.pushProcess(itRow, sp)).toBeUndefined(); 466 }); 467 468 it('BoxSelectionTest15', function () { 469 itRow.rowType = 'native-memory'; 470 itRow.rowId = '11'; 471 itRow.expansion = false; 472 itRow.childrenList = []; 473 expect(selectionParam.pushNativeMemory(itRow, sp)).toBeUndefined(); 474 }); 475 476 it('BoxSelectionTest16', function () { 477 itRow.rowType = 'func'; 478 itRow.asyncFuncName = '11'; 479 itRow.expansion = false; 480 itRow.asyncFuncNamePID = 5; 481 itRow.rowId = '7'; 482 expect(selectionParam.pushNativeMemory(itRow, sp)).toBeUndefined(); 483 }); 484 485 it('BoxSelectionTest17', function () { 486 itRow.rowType = 'heap'; 487 itRow.rowParentId = '11 12 5'; 488 itRow.setAttribute('heap-type', 'native_hook_statistic'); 489 itRow.rowId = '7'; 490 expect(selectionParam.pushHeap(itRow, sp)).toBeUndefined(); 491 }); 492 493 it('BoxSelectionTest18', function () { 494 itRow.rowType = 'ability-monitor'; 495 itRow.rowId = '8'; 496 itRow.expansion = false; 497 itRow.childrenList = []; 498 expect(selectionParam.pushMonitor(itRow, sp)).toBeUndefined(); 499 }); 500 501 it('BoxSelectionTest19', function () { 502 itRow.rowType = 'hiperf-event'; 503 expect(selectionParam.pushHiperf(itRow, sp)).toBeUndefined(); 504 }); 505 506 it('BoxSelectionTest20', function () { 507 itRow.rowType = 'hiperf-report'; 508 expect(selectionParam.pushHiperf(itRow, sp)).toBeUndefined(); 509 }); 510 511 it('BoxSelectionTest21', function () { 512 itRow.rowType = 'hiperf-callchart'; 513 itRow.drawType = 7; 514 itRow.getRowSettingKeys = jest.fn(() => ['5']); 515 expect(selectionParam.pushHiperf(itRow, sp)).toBeUndefined(); 516 }); 517 518 it('BoxSelectionTest22', function () { 519 itRow.rowType = 'hiperf-process'; 520 itRow.rowId = '18'; 521 itRow.expansion = false; 522 itRow.childrenList = []; 523 expect(selectionParam.pushHiperf(itRow, sp)).toBeUndefined(); 524 }); 525 526 it('BoxSelectionTest23', function () { 527 itRow.rowType = 'hiperf'; 528 expect(selectionParam.pushHiperf(itRow, sp)).toBeUndefined(); 529 }); 530 531 it('BoxSelectionTest24', function () { 532 itRow.rowType = 'hiperf-cpu'; 533 itRow.index = 5; 534 expect(selectionParam.pushHiperf(itRow, sp)).toBeUndefined(); 535 }); 536 537 it('BoxSelectionTest25', function () { 538 itRow.rowType = 'hiperf-thread'; 539 itRow.rowId = '5-7'; 540 expect(selectionParam.pushHiperf(itRow, sp)).toBeUndefined(); 541 }); 542 543 it('BoxSelectionTest26', function () { 544 itRow.rowType = 'file-system-cell'; 545 itRow.rowId = 'FileSystemLogicalWrite'; 546 selectionParam.fileSystemType = []; 547 expect(selectionParam.pushFileSystem(itRow, sp)).toBeUndefined(); 548 selectionParam.pushFileSystem(itRow, sp); 549 expect(selectionParam.fileSystemType).toEqual([0, 1, 3]); 550 }); 551 552 it('BoxSelectionTest26', function () { 553 itRow.rowType = 'file-system-cell'; 554 itRow.rowId = 'FileSystemLogicalWrite'; 555 selectionParam.fileSystemType = [1, 1, 1, -1]; 556 expect(selectionParam.pushFileSystem(itRow, sp)).toBeUndefined(); 557 selectionParam.pushFileSystem(itRow, sp); 558 expect(selectionParam.fileSystemType).toEqual([1, 1, 1, -1, 3]); 559 }); 560 561 it('BoxSelectionTest27', function () { 562 itRow.rowType = 'file-system-cell'; 563 itRow.rowId = 'FileSystemLogicalRead'; 564 selectionParam.fileSystemType = []; 565 expect(selectionParam.pushFileSystem(itRow, sp)).toBeUndefined(); 566 selectionParam.pushFileSystem(itRow, sp); 567 expect(selectionParam.fileSystemType).toEqual([0, 1, 2]); 568 }); 569 570 it('BoxSelectionTest28', function () { 571 itRow.rowType = 'file-system-cell'; 572 itRow.rowId = 'FileSystemLogicalRead'; 573 selectionParam.fileSystemType = [1, 1, -1]; 574 expect(selectionParam.pushFileSystem(itRow, sp)).toBeUndefined(); 575 selectionParam.pushFileSystem(itRow, sp); 576 expect(selectionParam.fileSystemType).toEqual([1, 1, -1, 2]); 577 }); 578 579 it('BoxSelectionTest29', function () { 580 itRow.rowType = 'file-system-cell'; 581 itRow.rowId = 'FileSystemVirtualMemory'; 582 selectionParam.fileSystemType = [1, 1, -1]; 583 expect(selectionParam.pushFileSystem(itRow, sp)).toBeUndefined(); 584 selectionParam.pushFileSystem(itRow, sp); 585 expect(selectionParam.fileSysVirtualMemory).toBeTruthy(); 586 }); 587 588 it('BoxSelectionTest30', function () { 589 itRow.rowType = 'file-system-cell'; 590 itRow.rowId = 'FileSystemDiskIOLatency'; 591 selectionParam.fileSystemType = [1, 1, -1]; 592 expect(selectionParam.pushFileSystem(itRow, sp)).toBeUndefined(); 593 selectionParam.pushFileSystem(itRow, sp); 594 expect(selectionParam.diskIOLatency).toBeTruthy(); 595 }); 596 597 it('BoxSelectionTest31', function () { 598 itRow.rowType = 'VmTracker'; 599 itRow.rowId = '55'; 600 itRow.expansion = false; 601 let child = new TraceRow(); 602 child.rowType = 'dma-vmTracker'; 603 itRow.childrenList = [child]; 604 expect(selectionParam.pushVmTracker(itRow, sp)).toBeUndefined(); 605 }); 606 607 it('BoxSelectionTest32', function () { 608 itRow.rowType = 'VmTracker'; 609 itRow.rowId = '100'; 610 itRow.expansion = false; 611 let child = new TraceRow(); 612 child.rowType = 'sys-memory-gpu'; 613 itRow.childrenList = [child]; 614 expect(selectionParam.pushVmTracker(itRow, sp)).toBeUndefined(); 615 }); 616 617 it('BoxSelectionTest33', function () { 618 itRow.rowType = 'VmTracker'; 619 itRow.rowId = '100'; 620 itRow.expansion = false; 621 let child = new TraceRow(); 622 child.rowType = 'purgeable-total-vm'; 623 itRow.childrenList = [child]; 624 expect(selectionParam.pushVmTracker(itRow, sp)).toBeUndefined(); 625 }); 626 627 it('BoxSelectionTest34', function () { 628 itRow.rowType = 'VmTracker'; 629 itRow.rowId = '100'; 630 itRow.expansion = false; 631 let child = new TraceRow(); 632 child.rowType = 'purgeable-pin-vm'; 633 itRow.childrenList = [child]; 634 expect(selectionParam.pushVmTracker(itRow, sp)).toBeUndefined(); 635 }); 636 637 it('BoxSelectionTest35', function () { 638 itRow.rowType = 'VmTracker'; 639 itRow.rowId = '110'; 640 itRow.expansion = false; 641 let child = new TraceRow(); 642 child.rowType = 'smaps'; 643 itRow.childrenList = [child]; 644 expect(selectionParam.pushVmTracker(itRow, sp)).toBeUndefined(); 645 }); 646 647 it('BoxSelectionTest36', function () { 648 itRow.rowType = 'VmTracker'; 649 itRow.rowId = '10'; 650 itRow.expansion = false; 651 let child = new TraceRow(); 652 child.rowType = 'VmTracker-shm'; 653 itRow.childrenList = [child]; 654 expect(selectionParam.pushVmTracker(itRow, sp)).toBeUndefined(); 655 }); 656 657 it('BoxSelectionTest37', function () { 658 itRow.rowType = 'janks'; 659 itRow.rowId = '50'; 660 itRow.name == 'Actual Timeline'; 661 itRow.rowParentId === 'frameTime'; 662 itRow.dataListCache = []; 663 expect(selectionParam.pushJank(itRow, sp)).toBeUndefined(); 664 }); 665 666 it('BoxSelectionTest38', function () { 667 TraceRow.range = { 668 refresh: true, 669 xsTxt: ['a'], 670 startX: 100, 671 endX: 1000, 672 startNS: 0, 673 endNS: 100000, 674 slicesTime: { 675 color: 'red', 676 startTime: 1000, 677 endTime: 5000, 678 }, 679 scale: 5000, 680 totalNS: 10000, 681 xs: [100], 682 }; 683 itRow.rowType = 'heap-timeline'; 684 itRow.rowId = '50'; 685 itRow.name == 'Actual Timeline'; 686 itRow.rowParentId === 'frameTime'; 687 itRow.dataListCache = []; 688 expect(selectionParam.pushHeapTimeline(itRow, sp)).toBeUndefined(); 689 }); 690 691 it('BoxSelectionTest39', function () { 692 itRow.rowType = 'js-cpu-profiler-cell'; 693 itRow.rowId = '50'; 694 itRow.dataListCache = []; 695 expect(selectionParam.pushJsCpuProfiler(itRow, sp)).toBeUndefined(); 696 }); 697 698 it('BoxSelectionTest40', function () { 699 itRow.rowType = 'sys-memory-gpu'; 700 itRow.rowId = '40'; 701 itRow.childrenList = []; 702 expect(selectionParam.pushSysMemoryGpu(itRow, sp)).toBeUndefined(); 703 }); 704 705 it('BoxSelectionTest41', function () { 706 itRow.rowType = 'sdk'; 707 itRow.rowId = '45'; 708 itRow.childrenList = []; 709 expect(selectionParam.pushSDK(itRow, sp)).toBeUndefined(); 710 }); 711 712 it('BoxSelectionTest42', function () { 713 itRow.rowType = 'sdk-counter'; 714 itRow.rowId = '47'; 715 expect(selectionParam.pushSDK(itRow, sp)).toBeUndefined(); 716 }); 717 718 it('BoxSelectionTest43', function () { 719 itRow.rowType = 'sdk-slice'; 720 itRow.rowId = '98'; 721 expect(selectionParam.pushSDK(itRow, sp)).toBeUndefined(); 722 }); 723 724 it('BoxSelectionTest44', function () { 725 itRow.rowType = 'smaps'; 726 itRow.rowId = '98'; 727 expect(selectionParam.pushVmTrackerSmaps(itRow, sp)).toBeUndefined(); 728 }); 729 730 it('BoxSelectionTest45', function () { 731 itRow.rowType = 'irq-group'; 732 itRow.rowId = '98'; 733 itRow.childrenList = []; 734 expect(selectionParam.pushIrq(itRow)).toBeUndefined(); 735 }); 736 737 it('BoxSelectionTest46', function () { 738 itRow.rowType = 'irq'; 739 itRow.rowId = '98'; 740 itRow.setAttribute('callId', '45'); 741 itRow.childrenList = []; 742 expect(selectionParam.pushIrq(itRow)).toBeUndefined(); 743 }); 744 745 it('BoxSelectionTest47', function () { 746 itRow.rowType = 'sys-memory-gpu-gl'; 747 itRow.rowId = '98'; 748 itRow.dataListCache = []; 749 expect(selectionParam.pushSysMemoryGpuGl(itRow, sp)).toBeUndefined(); 750 }); 751 752 it('BoxSelectionTest48', function () { 753 itRow.rowType = 'frame-dynamic'; 754 itRow.rowId = '98'; 755 itRow.dataListCache = []; 756 itRow.setAttribute('model-name', 'dd'); 757 expect(selectionParam.pushFrameDynamic(itRow, sp)).toBeUndefined(); 758 }); 759 760 it('BoxSelectionTest49', function () { 761 itRow.rowType = 'frame-spacing'; 762 itRow.rowId = '98'; 763 itRow.dataListCache = []; 764 expect(selectionParam.pushFrameSpacing(itRow)).toBeUndefined(); 765 }); 766 767 it('BoxSelectionTest50', function () { 768 itRow.rowType = 'frame-animation'; 769 itRow.rowId = '98'; 770 itRow.dataListCache = []; 771 expect(selectionParam.pushFrameAnimation(itRow)).toBeUndefined(); 772 }); 773 774 it('BoxSelectionTest51', function () { 775 itRow.rowType = 'sys-memory-gpu-window'; 776 itRow.rowId = '98'; 777 itRow.dataListCache = []; 778 expect(selectionParam.pushSysMemoryGpuWindow(itRow)).toBeUndefined(); 779 }); 780 781 it('BoxSelectionTest52', function () { 782 itRow.rowType = 'sys-memory-gpu-total'; 783 itRow.rowId = '98'; 784 itRow.dataListCache = []; 785 expect(selectionParam.pushSysMemoryGpuTotal(itRow)).toBeUndefined(); 786 }); 787 788 it('BoxSelectionTest53', function () { 789 itRow.rowType = 'sys-memory-gpu-graph'; 790 itRow.rowId = '98'; 791 itRow.dataListCache = []; 792 expect(selectionParam.pushSysMemoryGpuGraph(itRow)).toBeUndefined(); 793 }); 794 795 it('BoxSelectionTest54', function () { 796 itRow.rowType = 'static-init'; 797 itRow.rowId = '98'; 798 expect(selectionParam.pushStaticInit(itRow, sp)).toBeUndefined(); 799 }); 800 801 it('BoxSelectionTest55', function () { 802 itRow.rowType = 'app-startup'; 803 itRow.rowId = '98'; 804 itRow.rowParentId = '55'; 805 expect(selectionParam.pushAppStartUp(itRow, sp)).toBeUndefined(); 806 }); 807 808 it('BoxSelectionTest56', function () { 809 itRow.rowType = 'thread'; 810 itRow.rowId = '98'; 811 expect(selectionParam.pushThread(itRow, sp)).toBeUndefined(); 812 }); 813 814 it('BoxSelectionTest57', function () { 815 itRow.rowType = 'mem'; 816 itRow.rowId = '98'; 817 expect(selectionParam.pushVirtualMemory(itRow, sp)).toBeUndefined(); 818 }); 819 820 it('BoxSelectionTest58', function () { 821 itRow.rowType = 'virtual-memory-cell'; 822 itRow.rowId = '98'; 823 expect(selectionParam.pushVirtualMemory(itRow, sp)).toBeUndefined(); 824 }); 825 826 it('BoxSelectionTest59', function () { 827 itRow.rowType = 'fps'; 828 itRow.rowId = '98'; 829 expect(selectionParam.pushFps(itRow, sp)).toBeUndefined(); 830 }); 831 832 it('BoxSelectionTest60', function () { 833 itRow.rowType = 'cpu-ability'; 834 itRow.rowId = '98'; 835 expect(selectionParam.pushCpuAbility(itRow, sp)).toBeUndefined(); 836 }); 837 838 it('BoxSelectionTest61', function () { 839 itRow.rowType = 'memory-ability'; 840 itRow.rowId = '98'; 841 expect(selectionParam.pushMemoryAbility(itRow, sp)).toBeUndefined(); 842 }); 843 844 it('BoxSelectionTest62', function () { 845 itRow.rowType = 'disk-ability'; 846 itRow.rowId = '98'; 847 expect(selectionParam.pushDiskAbility(itRow, sp)).toBeUndefined(); 848 }); 849 850 it('BoxSelectionTest63', function () { 851 itRow.rowType = 'network-ability'; 852 itRow.rowId = '98'; 853 expect(selectionParam.pushNetworkAbility(itRow, sp)).toBeUndefined(); 854 }); 855 856 it('BoxSelectionTest64', function () { 857 itRow.rowType = 'dma-ability'; 858 itRow.rowId = '98'; 859 expect(selectionParam.pushDmaAbility(itRow, sp)).toBeUndefined(); 860 }); 861 862 it('BoxSelectionTest65', function () { 863 itRow.rowType = 'gpu-memory-ability'; 864 itRow.rowId = '98'; 865 expect(selectionParam.pushGpuMemoryAbility(itRow, sp)).toBeUndefined(); 866 }); 867 868 it('BoxSelectionTest66', function () { 869 itRow.rowType = 'power-energy'; 870 itRow.rowId = '98'; 871 expect(selectionParam.pushPowerEnergy(itRow, sp)).toBeUndefined(); 872 }); 873 874 it('BoxSelectionTest67', function () { 875 itRow.rowType = 'system-energy'; 876 itRow.rowId = '98'; 877 expect(selectionParam.pushSystemEnergy(itRow, sp)).toBeUndefined(); 878 }); 879 880 it('BoxSelectionTest68', function () { 881 itRow.rowType = 'anomaly-energy'; 882 itRow.rowId = '98'; 883 expect(selectionParam.pushAnomalyEnergy(itRow, sp)).toBeUndefined(); 884 }); 885 886 it('BoxSelectionTest69', function () { 887 itRow.rowType = 'VmTracker-shm'; 888 itRow.rowId = '98'; 889 expect(selectionParam.pushVmTrackerShm(itRow, sp)).toBeUndefined(); 890 }); 891 892 it('BoxSelectionTest70', function () { 893 itRow.rowType = 'clock-group'; 894 itRow.rowId = '98'; 895 expect(selectionParam.pushClock(itRow, sp)).toBeUndefined(); 896 }); 897 898 it('BoxSelectionTest71', function () { 899 itRow.rowType = 'gpu-memory-vmTracker'; 900 itRow.rowId = '98'; 901 expect(selectionParam.pushGpuMemoryVmTracker(itRow, sp)).toBeUndefined(); 902 }); 903 904 it('BoxSelectionTest72', function () { 905 itRow.rowType = 'dma-vmTracker'; 906 itRow.rowId = '98'; 907 expect(selectionParam.pushDmaVmTracker(itRow, sp)).toBeUndefined(); 908 }); 909 910 it('BoxSelectionTest73', function () { 911 itRow.rowType = 'purgeable-total-ability'; 912 itRow.rowId = '98'; 913 expect(selectionParam.pushPugreable(itRow, sp)).toBeUndefined(); 914 }); 915 916 it('BoxSelectionTest74', function () { 917 itRow.rowType = 'purgeable-pin-ability'; 918 itRow.rowId = '98'; 919 expect(selectionParam.pushPugreablePinAbility(itRow, sp)).toBeUndefined(); 920 }); 921 922 it('BoxSelectionTest75', function () { 923 itRow.rowType = 'purgeable-total-vm'; 924 itRow.rowId = '98'; 925 expect(selectionParam.pushPugreableTotalVm(itRow, sp)).toBeUndefined(); 926 }); 927 928 it('BoxSelectionTest76', function () { 929 itRow.rowType = 'purgeable-pin-vm'; 930 itRow.rowId = '98'; 931 expect(selectionParam.pushPugreablePinVm(itRow, sp)).toBeUndefined(); 932 }); 933 934 it('BoxSelectionTest77', function () { 935 itRow.rowType = 'logs'; 936 itRow.rowId = '98'; 937 expect(selectionParam.pushLogs(itRow, sp)).toBeUndefined(); 938 }); 939 940 it('BoxSelectionTest78', function () { 941 itRow.rowType = 'hi-sysevent'; 942 itRow.rowId = '98'; 943 expect(selectionParam.pushHiSysEvent(itRow, sp)).toBeUndefined(); 944 }); 945 946 it('BoxSelectionTest79', function () { 947 itRow.rowType = 'sample'; 948 itRow.rowId = '98'; 949 expect(selectionParam.pushSelection(itRow, sp)).toBeUndefined(); 950 }); 951 952 it('BoxSelectionTest80', () => { 953 let data = new GpuCounter(); 954 data.startNS = 54; 955 expect(data.startNS).toEqual(54); 956 }); 957 958 it('BoxSelectionTest81', () => { 959 let data = new Fps(); 960 data.startNS = 54; 961 expect(data.startNS).toEqual(54); 962 }); 963 964 it('BoxSelectionTest82', () => { 965 let data = new Counter(); 966 data.trackId = 54; 967 expect(data.trackId).toEqual(54); 968 }); 969 970 it('BoxSelectionTest83', () => { 971 let data = new BoxJumpParam(); 972 data.rightNs = 54; 973 expect(data.rightNs).toEqual(54); 974 }); 975 976 it('BoxSelectionTest84', () => { 977 let data = new SliceBoxJumpParam(); 978 data.leftNs = 54; 979 expect(data.leftNs).toEqual(54); 980 }); 981 982 it('BoxSelectionTest85', function () { 983 itRow.rowType = TraceRow.ROW_TYPE_XPOWER; 984 itRow.rowId = '98'; 985 expect(selectionParam.pushXpower(itRow, sp)).toBeUndefined(); 986 }); 987 988 it('BoxSelectionTest86', function () { 989 itRow.rowType = TraceRow.ROW_TYPE_XPOWER_SYSTEM_GROUP; 990 itRow.rowId = '98'; 991 expect(selectionParam.pushXpower(itRow, sp)).toBeUndefined(); 992 }); 993 994 it('BoxSelectionTest87', function () { 995 itRow.rowType = TraceRow.ROW_TYPE_XPOWER_STATISTIC; 996 itRow.rowId = '98'; 997 expect(selectionParam.pushXpower(itRow, sp)).toBeUndefined(); 998 }); 999 1000 it('BoxSelectionTest88', function () { 1001 itRow.rowType = TraceRow.ROW_TYPE_XPOWER_SYSTEM; 1002 itRow.rowId = 'Battery.RealCurrent'; 1003 expect(selectionParam.pushXpower(itRow, sp)).toBeUndefined(); 1004 }); 1005 1006 it('BoxSelectionTest89', function () { 1007 itRow.rowType = TraceRow.ROW_TYPE_XPOWER_APP_DETAIL_DISPLAY; 1008 itRow.rowId = '98'; 1009 expect(selectionParam.pushXpower(itRow, sp)).toBeUndefined(); 1010 }); 1011 1012 it('BoxSelectionTest90', function () { 1013 itRow.rowType = TraceRow.ROW_TYPE_XPOWER_WIFI_PACKETS; 1014 itRow.rowId = '98'; 1015 expect(selectionParam.pushXpower(itRow, sp)).toBeUndefined(); 1016 }); 1017 1018 it('BoxSelectionTest91', function () { 1019 itRow.rowType = TraceRow.ROW_TYPE_XPOWER_WIFI_BYTES; 1020 itRow.rowId = '98'; 1021 expect(selectionParam.pushXpower(itRow, sp)).toBeUndefined(); 1022 }); 1023 1024 it('BoxSelectionTest92', function () { 1025 itRow.rowType = TraceRow.ROW_TYPE_XPOWER_THREAD_COUNT; 1026 itRow.rowId = '98'; 1027 expect(selectionParam.pushXpower(itRow, sp)).toBeUndefined(); 1028 }); 1029 1030 it('BoxSelectionTest93', function () { 1031 itRow.rowType = TraceRow.ROW_TYPE_XPOWER_GPU_COUNT; 1032 itRow.rowId = '98'; 1033 expect(selectionParam.pushXpower(itRow, sp)).toBeUndefined(); 1034 }); 1035 1036 it('BoxSelectionTest94', function () { 1037 itRow.rowType = TraceRow.ROW_TYPE_XPOWER_THREAD_INFO; 1038 itRow.rowId = 'THREAD_ENERGY'; 1039 expect(selectionParam.pushXpowerThreadInfo(itRow, sp)).toBeUndefined(); 1040 }); 1041 1042 it('BoxSelectionTest95', function () { 1043 itRow.rowType = TraceRow.ROW_TYPE_XPOWER_THREAD_INFO; 1044 itRow.rowId = 'THREAD_LOAD'; 1045 expect(selectionParam.pushXpowerThreadInfo(itRow, sp)).toBeUndefined(); 1046 }); 1047 1048 it('BoxSelectionTest96', function () { 1049 itRow.rowType = TraceRow.ROW_TYPE_XPOWER_GPU_FREQUENCY; 1050 itRow.rowId = 'THREAD_LOAD'; 1051 expect(selectionParam.pushXpowerGpuFreq(itRow, sp)).toBeUndefined(); 1052 }); 1053 1054 it('BoxSelectionTest97', function () { 1055 itRow.rowType = TraceRow.ROW_TYPE_HANG_GROUP; 1056 itRow.rowId = 'THREAD_LOAD'; 1057 expect(selectionParam.pushHang(itRow, sp)).toBeUndefined(); 1058 }); 1059 1060 it('BoxSelectionTest98', function () { 1061 itRow.rowType = TraceRow.ROW_TYPE_HANG; 1062 itRow.rowId = 'THREAD_LOAD'; 1063 expect(selectionParam.pushHang(itRow, sp)).toBeUndefined(); 1064 }); 1065 1066 it('BoxSelectionTest99', function () { 1067 itRow.rowType = TraceRow.ROW_TYPE_PURGEABLE_PIN_ABILITY; 1068 itRow.rowId = 'THREAD_LOAD'; 1069 expect(selectionParam.pushHang(itRow, sp)).toBeUndefined(); 1070 }); 1071 1072 it('BoxSelectionTest100', function () { 1073 itRow.rowType = TraceRow.ROW_TYPE_PURGEABLE_TOTAL_VM; 1074 itRow.rowId = 'THREAD_LOAD'; 1075 expect(selectionParam.pushHang(itRow, sp)).toBeUndefined(); 1076 }); 1077 1078 it('BoxSelectionTest101', function () { 1079 itRow.rowType = TraceRow.ROW_TYPE_PURGEABLE_PIN_VM; 1080 itRow.rowId = 'THREAD_LOAD'; 1081 expect(selectionParam.pushHang(itRow, sp)).toBeUndefined(); 1082 }); 1083 1084 it('BoxSelectionTest102', function () { 1085 itRow.rowType = TraceRow.ROW_TYPE_DMA_FENCE; 1086 itRow.rowId = 'THREAD_LOAD'; 1087 expect(selectionParam.pushDmaFence(itRow, sp)).toBeUndefined(); 1088 }); 1089 1090 it('BoxSelectionTest103', function () { 1091 itRow.rowType = TraceRow.ROW_TYPE_CLOCK_GROUP; 1092 itRow.rowId = 'THREAD_LOAD'; 1093 expect(selectionParam.pushClock(itRow, sp)).toBeUndefined(); 1094 }); 1095 1096 it('BoxSelectionTest104', function () { 1097 itRow.rowType = TraceRow.ROW_TYPE_CLOCK; 1098 itRow.rowId = 'THREAD_LOAD'; 1099 expect(selectionParam.pushClock(itRow, sp)).toBeUndefined(); 1100 }); 1101 1102 it('BoxSelectionTest105', function () { 1103 itRow.rowType = TraceRow.ROW_TYPE_FILE_SYSTEM_GROUP; 1104 itRow.rowId = 'THREAD_LOAD'; 1105 expect(selectionParam.pushFileSystem(itRow, sp)).toBeUndefined(); 1106 }); 1107 1108 it('BoxSelectionTest106', function () { 1109 itRow.rowType = TraceRow.ROW_TYPE_FUNC; 1110 itRow.rowId = 'THREAD_LOAD'; 1111 expect(selectionParam.pushFileSystem(itRow, sp)).toBeUndefined(); 1112 }); 1113 1114 it('BoxSelectionTest107', function () { 1115 itRow.rowType = TraceRow.ROW_TYPE_SAMPLE; 1116 itRow.rowId = 'THREAD_LOAD'; 1117 expect(selectionParam.pushSampleData(itRow)).toBeUndefined(); 1118 }); 1119 1120 it('BoxSelectionTest108', function () { 1121 itRow.rowType = TraceRow.ROW_TYPE_CPU_STATE_ALL; 1122 itRow.rowId = 'THREAD_LOAD'; 1123 expect(selectionParam.pushCpuStateFilterIds(itRow)).toBeUndefined(); 1124 }); 1125 1126 it('BoxSelectionTest109', function () { 1127 itRow.rowType = TraceRow.ROW_TYPE_CPU_FREQ_LIMITALL; 1128 itRow.rowId = 'THREAD_LOAD'; 1129 expect(selectionParam.pushCpuFreqLimit(itRow)).toBeUndefined(); 1130 }); 1131 1132 it('BoxSelectionTest110', function () { 1133 itRow.rowType = TraceRow.ROW_TYPE_GPU_MEMORY_VMTRACKER; 1134 itRow.rowId = 'THREAD_LOAD'; 1135 expect(selectionParam.vMTrackerGpuChildRowsEvery(itRow)).toBeUndefined(); 1136 }); 1137 1138 it('BoxSelectionTest111', function () { 1139 itRow.rowType = TraceRow.ROW_TYPE_SYS_MEMORY_GPU_GL; 1140 itRow.rowId = 'THREAD_LOAD'; 1141 expect(selectionParam.vMTrackerGpuChildRowsEvery(itRow)).toBeUndefined(); 1142 }); 1143 1144 it('BoxSelectionTest112', function () { 1145 itRow.rowType = TraceRow.ROW_TYPE_SYS_MEMORY_GPU_GRAPH; 1146 itRow.rowId = 'THREAD_LOAD'; 1147 expect(selectionParam.vMTrackerGpuChildRowsEvery(itRow)).toBeUndefined(); 1148 }); 1149 1150 it('BoxSelectionTest113', function () { 1151 itRow.rowType = TraceRow.ROW_TYPE_SYS_MEMORY_GPU_TOTAL; 1152 itRow.rowId = 'THREAD_LOAD'; 1153 expect(selectionParam.vMTrackerGpuChildRowsEvery(itRow)).toBeUndefined(); 1154 }); 1155 1156 it('BoxSelectionTest114', function () { 1157 itRow.rowType = TraceRow.ROW_TYPE_SYS_MEMORY_GPU_WINDOW; 1158 itRow.rowId = 'THREAD_LOAD'; 1159 expect(selectionParam.vMTrackerGpuChildRowsEvery(itRow)).toBeUndefined(); 1160 }); 1161}); 1162