diff options
author | Oleksii Kovalov <OleksiiKovalov@users.noreply.github.com> | 2014-07-31 22:54:11 +0000 |
---|---|---|
committer | Oleksii Kovalov <OleksiiKovalov@users.noreply.github.com> | 2014-07-31 22:54:11 +0000 |
commit | 9ceaa873d48aefc1b74b019e205d41dd76bdf572 (patch) | |
tree | abaf30706fa42b9811de521a49fa9100cb1eafba | |
parent | 8fa90ace26472517cfba8364e68c92b9e8c7db86 (diff) | |
download | expressprofiler-9ceaa873d48aefc1b74b019e205d41dd76bdf572.zip expressprofiler-9ceaa873d48aefc1b74b019e205d41dd76bdf572.tar.gz expressprofiler-9ceaa873d48aefc1b74b019e205d41dd76bdf572.tar.bz2 |
[*] added SQLStmtStarting, SQLStmtCompleted events
-rw-r--r-- | ExpressProfiler/ExpressProfiler/MainForm.cs | 25 | ||||
-rw-r--r-- | ExpressProfiler/ExpressProfiler/TraceProperties.cs | 21 | ||||
-rw-r--r-- | ExpressProfiler/ExpressProfiler/TraceProperties.designer.cs | 20 |
3 files changed, 53 insertions, 13 deletions
diff --git a/ExpressProfiler/ExpressProfiler/MainForm.cs b/ExpressProfiler/ExpressProfiler/MainForm.cs index e0d5f7b..5cfb856 100644 --- a/ExpressProfiler/ExpressProfiler/MainForm.cs +++ b/ExpressProfiler/ExpressProfiler/MainForm.cs @@ -571,6 +571,31 @@ namespace ExpressProfiler }
+ if (m_currentsettings.EventsColumns.SQLStmtStarting)
+ {
+ m_Rdr.SetEvent(ProfilerEvents.TSQL.SQLStmtStarting,
+ ProfilerEventColumns.TextData, ProfilerEventColumns.LoginName,
+ ProfilerEventColumns.CPU, ProfilerEventColumns.Reads,
+ ProfilerEventColumns.Writes, ProfilerEventColumns.Duration,
+ ProfilerEventColumns.SPID
+ , ProfilerEventColumns.StartTime, ProfilerEventColumns.EndTime
+ , ProfilerEventColumns.DatabaseName
+ , ProfilerEventColumns.ApplicationName
+ );
+ }
+ if (m_currentsettings.EventsColumns.SQLStmtCompleted)
+ {
+ m_Rdr.SetEvent(ProfilerEvents.TSQL.SQLStmtCompleted,
+ ProfilerEventColumns.TextData, ProfilerEventColumns.LoginName,
+ ProfilerEventColumns.CPU, ProfilerEventColumns.Reads,
+ ProfilerEventColumns.Writes, ProfilerEventColumns.Duration,
+ ProfilerEventColumns.SPID
+ , ProfilerEventColumns.StartTime, ProfilerEventColumns.EndTime
+ , ProfilerEventColumns.DatabaseName
+ , ProfilerEventColumns.ApplicationName
+ );
+ }
+
if (null != m_currentsettings.Filters.Duration)
{
SetIntFilter(m_currentsettings.Filters.Duration*1000,
diff --git a/ExpressProfiler/ExpressProfiler/TraceProperties.cs b/ExpressProfiler/ExpressProfiler/TraceProperties.cs index 5c5497e..9b093e2 100644 --- a/ExpressProfiler/ExpressProfiler/TraceProperties.cs +++ b/ExpressProfiler/ExpressProfiler/TraceProperties.cs @@ -111,7 +111,9 @@ namespace ExpressProfiler EndTime = EventsColumns.EndTime,
ObjectName = EventsColumns.ObjectName,
StartTime = EventsColumns.StartTime,
- BlockedProcessPeport = EventsColumns.BlockedProcessPeport
+ BlockedProcessPeport = EventsColumns.BlockedProcessPeport,
+ SQLStmtStarting = EventsColumns.SQLStmtStarting,
+ SQLStmtCompleted = EventsColumns.SQLStmtCompleted
}
,Filters = new TraceFilters
{
@@ -162,11 +164,11 @@ namespace ExpressProfiler [DefaultValue(false)]
public bool RPCCompleted { get; set; }
[Category(@"Events")]
- [DisplayName(@"Batch:Starting")]
+ [DisplayName(@"SQL:BatchStarting")]
[DefaultValue(false)]
public bool BatchStarting { get; set; }
[Category(@"Events")]
- [DisplayName(@"Batch:Completed")]
+ [DisplayName(@"SQL:BatchCompleted")]
[DefaultValue(false)]
public bool BatchCompleted { get; set; }
[Category(@"Events")]
@@ -185,6 +187,15 @@ namespace ExpressProfiler [DisplayName(@"Blocked process report")]
[DefaultValue(false)]
public bool BlockedProcessPeport { get; set; }
+ [Category(@"Events")]
+ [DisplayName(@"SQL:StmtStarting")]
+ [DefaultValue(false)]
+ public bool SQLStmtStarting { get; set; }
+ [Category(@"Events")]
+ [DisplayName(@"SQL:StmtCompleted")]
+ [DefaultValue(false)]
+ public bool SQLStmtCompleted { get; set; }
+
@@ -321,7 +332,9 @@ namespace ExpressProfiler || ts.EventsColumns.SPStmtCompleted
|| ts.EventsColumns.SPStmtStarting
|| ts.EventsColumns.UserErrorMessage
- ||ts.EventsColumns.BlockedProcessPeport;
+ || ts.EventsColumns.BlockedProcessPeport
+ || ts.EventsColumns.SQLStmtStarting
+ || ts.EventsColumns.SQLStmtCompleted;
}
diff --git a/ExpressProfiler/ExpressProfiler/TraceProperties.designer.cs b/ExpressProfiler/ExpressProfiler/TraceProperties.designer.cs index 0000414..7760d58 100644 --- a/ExpressProfiler/ExpressProfiler/TraceProperties.designer.cs +++ b/ExpressProfiler/ExpressProfiler/TraceProperties.designer.cs @@ -62,7 +62,7 @@ this.panel1.Controls.Add(this.btnCancel);
this.panel1.Controls.Add(this.btnRun);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.panel1.Location = new System.Drawing.Point(0, 405);
+ this.panel1.Location = new System.Drawing.Point(0, 508);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(381, 29);
this.panel1.TabIndex = 1;
@@ -105,7 +105,7 @@ this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
- this.tabControl1.Size = new System.Drawing.Size(381, 405);
+ this.tabControl1.Size = new System.Drawing.Size(381, 508);
this.tabControl1.TabIndex = 2;
//
// tabPage1
@@ -114,19 +114,20 @@ this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
- this.tabPage1.Size = new System.Drawing.Size(373, 379);
+ this.tabPage1.Size = new System.Drawing.Size(373, 482);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Filters";
this.tabPage1.UseVisualStyleBackColor = true;
//
// edFilters
//
- this.edFilters.Dock = System.Windows.Forms.DockStyle.Top;
+ this.edFilters.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.edFilters.HelpVisible = false;
this.edFilters.Location = new System.Drawing.Point(3, 3);
this.edFilters.Name = "edFilters";
this.edFilters.PropertySort = System.Windows.Forms.PropertySort.Categorized;
this.edFilters.SelectedObject = this.btnCancel;
- this.edFilters.Size = new System.Drawing.Size(367, 438);
+ this.edFilters.Size = new System.Drawing.Size(367, 476);
this.edFilters.TabIndex = 0;
this.edFilters.ToolbarVisible = false;
//
@@ -136,18 +137,19 @@ this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
- this.tabPage2.Size = new System.Drawing.Size(373, 379);
+ this.tabPage2.Size = new System.Drawing.Size(373, 482);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Columns and events";
this.tabPage2.UseVisualStyleBackColor = true;
//
// edEvents
//
- this.edEvents.Dock = System.Windows.Forms.DockStyle.Top;
+ this.edEvents.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.edEvents.HelpVisible = false;
this.edEvents.Location = new System.Drawing.Point(3, 3);
this.edEvents.Name = "edEvents";
this.edEvents.SelectedObject = this.btnRun;
- this.edEvents.Size = new System.Drawing.Size(367, 439);
+ this.edEvents.Size = new System.Drawing.Size(367, 476);
this.edEvents.TabIndex = 1;
this.edEvents.ToolbarVisible = false;
//
@@ -157,7 +159,7 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel;
- this.ClientSize = new System.Drawing.Size(381, 434);
+ this.ClientSize = new System.Drawing.Size(381, 537);
this.ControlBox = false;
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.panel1);
|