@ -46,7 +46,7 @@ namespace ICSharpCode.Profiler.Controls
@@ -46,7 +46,7 @@ namespace ICSharpCode.Profiler.Controls
public event EventHandler < NodeEventArgs < CallTreeNodeViewModel > > RequestBringIntoView ;
protected virtual void OnRequestBringIntoView ( NodeEventArgs < CallTreeNodeViewModel > e )
{
{
if ( RequestBringIntoView ! = null ) {
RequestBringIntoView ( this , e ) ;
}
@ -101,6 +101,15 @@ namespace ICSharpCode.Profiler.Controls
@@ -101,6 +101,15 @@ namespace ICSharpCode.Profiler.Controls
}
}
public Visibility HotPathIndicatorVisibility {
get {
if ( TimePercentageOfParent > = 0.2 )
return Visibility . Visible ;
return Visibility . Collapsed ;
}
}
CallTreeNodeViewModel GetNodeFromLevel ( int level )
{
if ( this . level > level ) {
@ -258,7 +267,7 @@ namespace ICSharpCode.Profiler.Controls
@@ -258,7 +267,7 @@ namespace ICSharpCode.Profiler.Controls
OnPropertyChanged ( "IsExpanded" ) ;
this . IsExpandedChanged ( new NodeEventArgs < CallTreeNodeViewModel > ( this ) ) ;
if ( ! isExpanded ) {
if ( isExpanded ) {
DeselectChildren ( children ) ;
}
}
@ -328,6 +337,35 @@ namespace ICSharpCode.Profiler.Controls
@@ -328,6 +337,35 @@ namespace ICSharpCode.Profiler.Controls
}
}
public string TimeSpentSelf {
get {
if ( ! node . IsThread ) {
double value = node . TimeSpent - node . Children . Aggregate ( 0.0 , ( sum , item ) = > sum + item . TimeSpent ) ;
return value . ToString ( "f6" ) + "ms" ;
} else
return null ;
}
}
public string TimeSpentSelfPerCall {
get {
if ( ! node . IsThread ) {
double value = node . TimeSpent - node . Children . Aggregate ( 0.0 , ( sum , item ) = > sum + item . TimeSpent ) ;
return ( value / node . CallCount ) . ToString ( "f6" ) + "ms" ;
} else
return null ;
}
}
public string TimeSpentPerCall {
get {
if ( ! node . IsThread )
return ( node . TimeSpent / node . CallCount ) . ToString ( "f6" ) + "ms" ;
else
return null ;
}
}
public string CallCount {
get {
if ( ! node . IsThread )