Browse Source
- added translation for the profiler UI - added functionality to control data collection (only profile parts) - added new columns (Time spent (self); Time spent/call, Time spent (self)/call) - added hot path indicators - Top 20 tab is now sorted by TimeSpentSelf * fixed bug in LocalizeExtension git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@4874 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
24 changed files with 427 additions and 163 deletions
@ -0,0 +1,30 @@
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Window |
||||
x:Class="ICSharpCode.Profiler.AddIn.Dialogs.ProfilerControlWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sd="http://icsharpcode.net/sharpdevelop/core" |
||||
Title="{sd:Localize AddIns.Profiler.ProfilerControlWindow.Title}" |
||||
WindowStyle="ToolWindow" Closing="WindowClosing" |
||||
Topmost="True" |
||||
Height="60" |
||||
Width="170"> |
||||
<Grid> |
||||
<Grid.RowDefinitions> |
||||
<RowDefinition |
||||
Height="*" /> |
||||
</Grid.RowDefinitions> |
||||
<ToolBar |
||||
Grid.Column="0" |
||||
Grid.Row="0" |
||||
HorizontalAlignment="Left" |
||||
VerticalAlignment="Stretch"> |
||||
<ToggleButton |
||||
Content="CollectData" |
||||
x:Name="collectData" |
||||
Checked="CollectDataChecked" |
||||
Unchecked="CollectDataUnchecked" /> |
||||
<Button |
||||
Content="Shutdown" |
||||
x:Name="shutdown" |
||||
Click="ShutdownClick" /> |
||||
</ToolBar> |
||||
</Grid> |
||||
</Window> |
@ -0,0 +1,66 @@
@@ -0,0 +1,66 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Siegfried Pammer" email="siegfriedpammer@gmail.com"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
using ICSharpCode.Core; |
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Text; |
||||
using System.Windows; |
||||
using System.Windows.Controls; |
||||
using System.Windows.Data; |
||||
using System.Windows.Documents; |
||||
using System.Windows.Input; |
||||
using System.Windows.Media; |
||||
using ICSharpCode.Profiler.Controller; |
||||
|
||||
namespace ICSharpCode.Profiler.AddIn.Dialogs |
||||
{ |
||||
/// <summary>
|
||||
/// Interaction logic for ProfilerControlWindow.xaml
|
||||
/// </summary>
|
||||
public partial class ProfilerControlWindow : Window |
||||
{ |
||||
ProfilerRunner runner; |
||||
public bool AllowClose { get; set; } |
||||
|
||||
public ProfilerControlWindow(ProfilerRunner runner) |
||||
{ |
||||
InitializeComponent(); |
||||
|
||||
this.runner = runner; |
||||
this.collectData.IsChecked = runner.Profiler.ProfilerOptions.EnableDCAtStart; |
||||
} |
||||
|
||||
void CollectDataChecked(object sender, RoutedEventArgs e) |
||||
{ |
||||
try { |
||||
this.runner.Profiler.EnableDataCollection(); |
||||
} catch (Exception ex) { |
||||
MessageService.ShowError(ex); |
||||
} |
||||
} |
||||
|
||||
void CollectDataUnchecked(object sender, RoutedEventArgs e) |
||||
{ |
||||
try { |
||||
this.runner.Profiler.DisableDataCollection(); |
||||
} catch (Exception ex) { |
||||
MessageService.ShowError(ex); |
||||
} |
||||
} |
||||
|
||||
void ShutdownClick(object sender, RoutedEventArgs e) |
||||
{ |
||||
this.AllowClose = true; |
||||
this.runner.Stop(); |
||||
} |
||||
|
||||
void WindowClosing(object sender, System.ComponentModel.CancelEventArgs e) |
||||
{ |
||||
e.Cancel = !AllowClose; |
||||
} |
||||
} |
||||
} |
@ -1,16 +1,51 @@
@@ -1,16 +1,51 @@
|
||||
<UserControl x:Class="ICSharpCode.Profiler.AddIn.OptionsPanels.GeneralOptionsPanel" |
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="418" Height="300"> |
||||
<Grid> |
||||
<GroupBox Header="Data Collection" Margin="0,0,0,0" Name="groupBox1"> |
||||
<Grid> |
||||
<CheckBox Height="14" Margin="6,6,6,0" Name="chkEnableDC" VerticalAlignment="Top">Only collect data at the end of the session.</CheckBox> |
||||
<Slider Margin="170,26,94,0" Name="slSharedMemorySize" IsDirectionReversed="False" TickPlacement="Both" Minimum="64" Maximum="512" TickFrequency="64" SmallChange="64" LargeChange="128" IsSnapToTickEnabled="True" Height="34" VerticalAlignment="Top" /> |
||||
<Label Margin="1,26,0,0" Name="label1" Height="24" HorizontalAlignment="Left" VerticalAlignment="Top" Width="163">Size of temporary storage file:</Label> |
||||
<TextBlock HorizontalAlignment="Right" Margin="0,34,38,0" Width="50" Text="{Binding Value, ElementName=slSharedMemorySize, StringFormat=\{0\} MB}" Height="16" VerticalAlignment="Top" /> |
||||
<CheckBox Margin="6,66,6,0" Name="chkDoNotProfileNetInternals" Height="15" VerticalAlignment="Top">Do not profile .NET internal calls.</CheckBox> |
||||
<CheckBox Margin="6,87,6,0" Name="chkCombineRecursiveCalls" Height="16.723" VerticalAlignment="Top">Combine recursive calls.</CheckBox> |
||||
</Grid> |
||||
</GroupBox> |
||||
</Grid> |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<UserControl |
||||
x:Class="ICSharpCode.Profiler.AddIn.OptionsPanels.GeneralOptionsPanel" xmlns:sd="http://icsharpcode.net/sharpdevelop/core" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
||||
<StackPanel |
||||
Orientation="Vertical"> |
||||
<GroupBox |
||||
Header="{sd:Localize AddIns.Profiler.Options.General.DataCollection.Header}"> |
||||
<StackPanel |
||||
Orientation="Vertical"> |
||||
<CheckBox Margin="3" |
||||
Name="chkEnableDC" |
||||
VerticalAlignment="Top" |
||||
Content="{sd:Localize AddIns.Profiler.Options.General.DataCollection.EnableDC}" /> |
||||
<CheckBox Margin="3" |
||||
Name="chkEnableDCAtStartup" |
||||
VerticalAlignment="Top" |
||||
Content="{sd:Localize AddIns.Profiler.Options.General.DataCollection.EnableDCAtStartup}" /> |
||||
<StackPanel Margin="3" |
||||
Orientation="Horizontal"> |
||||
<Label Margin="3" |
||||
HorizontalAlignment="Left" |
||||
VerticalAlignment="Top" |
||||
Content="{sd:Localize AddIns.Profiler.Options.General.DataCollection.SizeOfStorageDescription}" /> |
||||
<Slider Margin="3" Width="150" |
||||
Name="slSharedMemorySize" |
||||
IsDirectionReversed="False" |
||||
TickPlacement="Both" |
||||
Minimum="64" |
||||
Maximum="512" |
||||
TickFrequency="64" |
||||
SmallChange="64" |
||||
LargeChange="128" |
||||
IsSnapToTickEnabled="True" |
||||
VerticalAlignment="Top" /> |
||||
<TextBlock Margin="3" |
||||
HorizontalAlignment="Right" |
||||
Text="{Binding Value, ElementName=slSharedMemorySize, StringFormat=\{0\} MB}" |
||||
VerticalAlignment="Top" /> |
||||
</StackPanel> |
||||
<CheckBox Margin="3" |
||||
Name="chkDoNotProfileNetInternals" |
||||
VerticalAlignment="Top" |
||||
Content="{sd:Localize AddIns.Profiler.Options.General.DataCollection.DoNotProfileNetInternals}" /> |
||||
<CheckBox Margin="3" |
||||
Name="chkCombineRecursiveCalls" |
||||
VerticalAlignment="Top" |
||||
Content="{sd:Localize AddIns.Profiler.Options.General.DataCollection.CombineRecursiveCalls}" /> |
||||
</StackPanel> |
||||
</GroupBox> |
||||
</StackPanel> |
||||
</UserControl> |
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Siegfried Pammer" email="siegfriedpammer@gmail.com"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.Profiler.Controls |
||||
{ |
||||
/// <summary>
|
||||
/// Description of ControlsTranslation.
|
||||
/// </summary>
|
||||
public class ControlsTranslation |
||||
{ |
||||
public virtual string WaitBarText { |
||||
get { |
||||
return "Refreshing view, please wait ..."; |
||||
} |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue