@@ -23,6 +23,33 @@ public TimelineNodeTooltip()
23
23
InitializeComponent ( ) ;
24
24
}
25
25
26
+ private string GetThisIncludeDetailsText ( TimelineNode node )
27
+ {
28
+ if ( node . Category == CompilerData . CompileCategory . Include && node . Value is CompileValue && node . Parent != null &&
29
+ node . Parent . Category == CompilerData . CompileCategory . Include && node . Parent . Value is CompileValue )
30
+ {
31
+ CompileValue includeeValue = ( node . Value as CompileValue ) ;
32
+ CompileValue includerValue = ( node . Parent . Value as CompileValue ) ;
33
+
34
+ int includeeIndex = CompilerData . Instance . GetIndexOf ( CompilerData . CompileCategory . Include , includeeValue ) ;
35
+ int includerIndex = CompilerData . Instance . GetIndexOf ( CompilerData . CompileCategory . Include , includerValue ) ;
36
+
37
+ IncludersInclValue inclValue = CompilerIncluders . Instance . GetIncludeInclValue ( includerIndex , includeeIndex ) ;
38
+
39
+ if ( inclValue != null )
40
+ {
41
+ return includerValue . Name + " => " + includeeValue . Name + ":\n -"
42
+ + " Max: " + Common . UIConverters . GetTimeStr ( inclValue . Max )
43
+ + " Avg: " + Common . UIConverters . GetTimeStr ( inclValue . Average )
44
+ + " Acc: " + Common . UIConverters . GetTimeStr ( inclValue . Accumulated )
45
+ + " Units: " + inclValue . Count ;
46
+ }
47
+
48
+ }
49
+
50
+ return null ;
51
+ }
52
+
26
53
private void OnNode ( )
27
54
{
28
55
if ( node != null )
@@ -52,7 +79,15 @@ private void OnNode()
52
79
+ " (Self: " + Common . UIConverters . GetTimeStr ( val . SelfMax ) + ")"
53
80
+ " Min: " + Common . UIConverters . GetTimeStr ( val . Min )
54
81
+ " Avg: " + Common . UIConverters . GetTimeStr ( val . Average )
82
+ + " Acc: " + Common . UIConverters . GetTimeStr ( val . Accumulated )
83
+ + " (Self: " + Common . UIConverters . GetTimeStr ( val . SelfAccumulated ) + ")"
55
84
+ " Units: " + val . Count ;
85
+
86
+ string thisDetailsTxt = GetThisIncludeDetailsText ( node ) ;
87
+ if ( thisDetailsTxt != null )
88
+ {
89
+ detailsText . Text = thisDetailsTxt + "\n Global:\n - " + detailsText . Text ;
90
+ }
56
91
}
57
92
else if ( node . Value is UnitValue )
58
93
{
0 commit comments