Lines Matching refs:node
144 …private calMaxDepth(node: ChartStruct, depth: number, isCalRoot: boolean, isCalDisplay: boolean): …
145 node.depth = depth;
146 this.clearDisplayInfo(node);
147 if (node.isSearch && isCalDisplay) {
149 module.count = node.drawCount = node.count;
150 module.dur = node.drawDur = node.dur;
151 module.size = node.drawSize = node.size;
152 this.setParentDisplayInfo(node, module);
157 if (node.children && node.children.length > 0) {
160 for (let children of node.children) {
161 children.parent = node;
162 if (node.depth == 0 && isCalRoot) {
169 if (node.depth == 0 && isCalRoot) {
170 node.size = parentSize;
171 node.count = parentCount;
172 node.dur = parentDuration;
179 private setParentDisplayInfo(node: ChartStruct, module: Module): void {
180 if (node.parent) {
181 node.parent.drawCount += module.count;
182 node.parent.drawDur += module.dur;
183 node.parent.drawSize += module.size;
184 this.setParentDisplayInfo(node.parent, module);
188 private clearDisplayInfo(node: ChartStruct): void {
189 node.drawCount = 0;
190 node.drawDur = 0;
191 node.drawSize = 0;
204 for (let node of this.currentData!) {
205 let nodeSize = node.drawSize || node.size;
209 if (!node.frame) {
210 node.frame = new Rect(x, scaleHeight, width, nmHeight);
212 node.frame!.x = x;
213 node.frame!.y = scaleHeight;
214 node.frame!.width = width;
215 node.frame!.height = nmHeight;
219 node.percent = nodeSize / this.currentSize;
220 draw(this.canvasContext!, node);
222 this.setStructFuncFrame(node);
223 this.drawFrameChart(node);
228 for (let node of this.currentData!) {
229 let nodeCount = node.drawCount || node.count;
233 if (!node.frame) {
234 node.frame = new Rect(x, scaleHeight, width, perfHeight);
236 node.frame!.x = x;
237 node.frame!.y = scaleHeight;
238 node.frame!.width = width;
239 node.frame!.height = perfHeight;
243 node.percent = nodeCount / this.currentCount;
244 draw(this.canvasContext!, node);
246 this.setStructFuncFrame(node);
247 this.drawFrameChart(node);
252 for (let node of this.currentData!) {
253 let nodeDur = node.drawDur || node.dur;
257 if (!node.frame) {
258 node.frame = new Rect(x, scaleHeight, width, ebpfHeight);
260 node.frame!.x = x;
261 node.frame!.y = scaleHeight;
262 node.frame!.width = width;
263 node.frame!.height = ebpfHeight;
267 node.percent = nodeDur / this.currentDuration;
268 draw(this.canvasContext!, node);
270 this.setStructFuncFrame(node);
271 this.drawFrameChart(node);
399 private setStructFuncFrame(node: ChartStruct) {
400 if (node.children && node.children.length > 0) {
401 for (let children of node.children) {
402 node.isDraw = false;
403 children.parent = node;
430 private drawFrameChart(node: ChartStruct) {
432 let nodeSize = node.drawSize || node.size;
433 let nodeCount = node.drawCount || node.count;
434 let nodeDur = node.drawDur || node.dur;
438 if (node.children && node.children.length > 0) {
439 for (let children of node.children) {
455 let x = node.frame!.x;
462 children.frame!.width = (childSize / (nodeSize - ignoreSize)) * node.frame!.width;
466 children.frame!.width = (childCount / (nodeCount - ignoreCount)) * node.frame!.width;
470 children.frame!.width = (childDur / (nodeDur - ignoreDur)) * node.frame!.width;
478 let firstChildren = node.children[0];
479 firstChildren.frame!.x = node.frame!.x;
480 firstChildren.frame!.width = node.frame!.width;
496 for (let node of nodes) {
497 if (node.frame?.contains(canvasX, canvasY)) {
498 return node;
500 let result = this.searchData(node.children, canvasX, canvasY);