Skip to content

Commit 743ec6a

Browse files
Reduce number of DOM nodes in Profiler
1 parent 14399d0 commit 743ec6a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/view/components/profiler/flamegraph/modes/FlamegraphLayout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function FlamegraphLayout({
4949
if (pos.commitParent || pos.weight === -1) {
5050
text = (
5151
<>
52-
<span data-testid="node-name">{node.name}</span>
52+
{node.name}
5353
{filterHoc && node.hocs ? (
5454
<HocLabels hocs={node.hocs} nodeId={node.id} canMark={false} />
5555
) : (
@@ -62,7 +62,7 @@ export function FlamegraphLayout({
6262
const total = formatTime(node.endTime - node.startTime);
6363
text = (
6464
<>
65-
<span data-testid="node-name">{node.name}</span>
65+
{node.name}
6666
{filterHoc && node.hocs ? (
6767
<HocLabels hocs={node.hocs} nodeId={node.id} canMark={false} />
6868
) : (

test-e2e/tests/profiler/flamegraph/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export async function getFlameNodes(page: Page) {
55
return els.map(el => {
66
return {
77
maximized: el.hasAttribute("data-maximized"),
8-
name: el.querySelector('[data-testid="node-name"]')!.textContent || "",
8+
name: el.getAttribute("data-name") || "",
99
visible: el.hasAttribute("data-visible"),
1010
};
1111
});

0 commit comments

Comments
 (0)