Remove extra spacing

This commit is contained in:
Lorin Thwaits
2023-02-20 19:33:29 +00:00
parent 434b798c98
commit b062f2c734
1461 changed files with 13333 additions and 76271 deletions
@@ -195,7 +195,7 @@
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
@@ -51,23 +51,23 @@
((System.ComponentModel.ISupportInitialize)(this.TransactionCount)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ThreadCount)).BeginInit();
this.SuspendLayout();
//
//
// LabelReadsPerWrite
//
//
this.LabelReadsPerWrite.Location = new System.Drawing.Point(0, 0);
this.LabelReadsPerWrite.Name = "LabelReadsPerWrite";
this.LabelReadsPerWrite.Size = new System.Drawing.Size(100, 23);
this.LabelReadsPerWrite.TabIndex = 50;
//
//
// ReadsPerWrite
//
//
this.ReadsPerWrite.Location = new System.Drawing.Point(0, 0);
this.ReadsPerWrite.Name = "ReadsPerWrite";
this.ReadsPerWrite.Size = new System.Drawing.Size(120, 20);
this.ReadsPerWrite.TabIndex = 51;
//
//
// LabelRPT
//
//
this.LabelRPT.AutoSize = true;
this.LabelRPT.BackColor = System.Drawing.Color.Transparent;
this.LabelRPT.Location = new System.Drawing.Point(14, 101);
@@ -75,9 +75,9 @@
this.LabelRPT.Size = new System.Drawing.Size(107, 13);
this.LabelRPT.TabIndex = 44;
this.LabelRPT.Text = "Requests per Thread";
//
//
// RequestCount
//
//
this.RequestCount.Location = new System.Drawing.Point(152, 99);
this.RequestCount.Maximum = new decimal(new int[] {
5000000,
@@ -97,9 +97,9 @@
0,
0,
0});
//
//
// lblInstance
//
//
this.lblInstance.AutoSize = true;
this.lblInstance.BackColor = System.Drawing.Color.Transparent;
this.lblInstance.Location = new System.Drawing.Point(14, 217);
@@ -107,17 +107,17 @@
this.lblInstance.Size = new System.Drawing.Size(91, 13);
this.lblInstance.TabIndex = 42;
this.lblInstance.Text = "Connection String";
//
//
// tbConnectionString
//
//
this.tbConnectionString.Location = new System.Drawing.Point(16, 243);
this.tbConnectionString.Name = "tbConnectionString";
this.tbConnectionString.Size = new System.Drawing.Size(271, 20);
this.tbConnectionString.TabIndex = 40;
this.tbConnectionString.TextChanged += new System.EventHandler(this.tbInstance_TextChanged);
//
//
// label3
//
//
this.label3.AutoSize = true;
this.label3.BackColor = System.Drawing.Color.Transparent;
this.label3.Location = new System.Drawing.Point(14, 25);
@@ -125,17 +125,17 @@
this.label3.Size = new System.Drawing.Size(109, 13);
this.label3.TabIndex = 38;
this.label3.Text = "Max TPS (thousands)";
//
//
// txtMaxTPS
//
//
this.txtMaxTPS.Location = new System.Drawing.Point(152, 22);
this.txtMaxTPS.Name = "txtMaxTPS";
this.txtMaxTPS.Size = new System.Drawing.Size(99, 20);
this.txtMaxTPS.TabIndex = 37;
this.txtMaxTPS.TabStop = false;
//
//
// lblRunningThread
//
//
this.lblRunningThread.AutoSize = true;
this.lblRunningThread.BackColor = System.Drawing.Color.Transparent;
this.lblRunningThread.Location = new System.Drawing.Point(14, 50);
@@ -143,18 +143,18 @@
this.lblRunningThread.Size = new System.Drawing.Size(107, 13);
this.lblRunningThread.TabIndex = 36;
this.lblRunningThread.Text = "Max PageRead Time";
//
//
// txtMaxPageRead
//
//
this.txtMaxPageRead.Location = new System.Drawing.Point(152, 47);
this.txtMaxPageRead.Name = "txtMaxPageRead";
this.txtMaxPageRead.Size = new System.Drawing.Size(99, 20);
this.txtMaxPageRead.TabIndex = 35;
this.txtMaxPageRead.TabStop = false;
this.txtMaxPageRead.Text = "10000";
//
//
// lblServerTran
//
//
this.lblServerTran.AutoSize = true;
this.lblServerTran.BackColor = System.Drawing.Color.Transparent;
this.lblServerTran.Location = new System.Drawing.Point(14, 153);
@@ -162,9 +162,9 @@
this.lblServerTran.Size = new System.Drawing.Size(102, 13);
this.lblServerTran.TabIndex = 34;
this.lblServerTran.Text = "Server Transactions";
//
//
// TransactionCount
//
//
this.TransactionCount.Location = new System.Drawing.Point(152, 151);
this.TransactionCount.Maximum = new decimal(new int[] {
5000000,
@@ -184,9 +184,9 @@
0,
0,
0});
//
//
// lblThreadCnt
//
//
this.lblThreadCnt.AutoSize = true;
this.lblThreadCnt.BackColor = System.Drawing.Color.Transparent;
this.lblThreadCnt.Location = new System.Drawing.Point(14, 127);
@@ -194,9 +194,9 @@
this.lblThreadCnt.Size = new System.Drawing.Size(46, 13);
this.lblThreadCnt.TabIndex = 31;
this.lblThreadCnt.Text = "Threads";
//
//
// ThreadCount
//
//
this.ThreadCount.Location = new System.Drawing.Point(152, 125);
this.ThreadCount.Maximum = new decimal(new int[] {
200,
@@ -216,9 +216,9 @@
0,
0,
0});
//
//
// btnSave
//
//
this.btnSave.Location = new System.Drawing.Point(16, 293);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(149, 23);
@@ -226,9 +226,9 @@
this.btnSave.Text = "Save Configuration Values";
this.btnSave.UseVisualStyleBackColor = true;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
//
// FrmConfig
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(310, 332);
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
@@ -26,36 +26,36 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
@@ -72,9 +72,9 @@
((System.ComponentModel.ISupportInitialize)(this.chtPageReads)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.chtCPU)).BeginInit();
this.SuspendLayout();
//
//
// btnRun
//
//
this.btnRun.BackColor = System.Drawing.Color.White;
this.btnRun.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnRun.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -86,9 +86,9 @@
this.btnRun.Text = "Start";
this.btnRun.UseVisualStyleBackColor = false;
this.btnRun.Click += new System.EventHandler(this.OnRunClick);
//
//
// btnStop
//
//
this.btnStop.BackColor = System.Drawing.Color.White;
this.btnStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -101,9 +101,9 @@
this.btnStop.Text = "Stop";
this.btnStop.UseVisualStyleBackColor = false;
this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
//
//
// btnRegress
//
//
this.btnRegress.BackColor = System.Drawing.Color.White;
this.btnRegress.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnRegress.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -115,9 +115,9 @@
this.btnRegress.Text = "Regress";
this.btnRegress.UseVisualStyleBackColor = false;
this.btnRegress.Click += new System.EventHandler(this.btnRegress_Click);
//
//
// btnAutoTune
//
//
this.btnAutoTune.BackColor = System.Drawing.Color.White;
this.btnAutoTune.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAutoTune.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -129,9 +129,9 @@
this.btnAutoTune.Text = "Auto Tune";
this.btnAutoTune.UseVisualStyleBackColor = false;
this.btnAutoTune.Click += new System.EventHandler(this.btnAutoTune_Click);
//
//
// lbResults
//
//
this.lbResults.BackColor = System.Drawing.Color.Transparent;
this.lbResults.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbResults.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(166)))));
@@ -141,9 +141,9 @@
this.lbResults.TabIndex = 31;
this.lbResults.Text = "Baseline";
this.lbResults.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
//
// menuStrip1
//
//
this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.optionsToolStripMenuItem});
@@ -153,32 +153,32 @@
this.menuStrip1.Size = new System.Drawing.Size(815, 24);
this.menuStrip1.TabIndex = 32;
this.menuStrip1.Text = "menuStrip1";
//
//
// optionsToolStripMenuItem
//
//
this.optionsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.configurationToolStripMenuItem,
this.exitToolStripMenuItem});
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(61, 22);
this.optionsToolStripMenuItem.Text = "Options";
//
//
// configurationToolStripMenuItem
//
//
this.configurationToolStripMenuItem.Name = "configurationToolStripMenuItem";
this.configurationToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.configurationToolStripMenuItem.Text = "Configuration";
this.configurationToolStripMenuItem.Click += new System.EventHandler(this.configurationToolStripMenuItem_Click);
//
//
// exitToolStripMenuItem
//
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.exitToolStripMenuItem.Text = "Exit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
//
// ErrorMessages
//
//
this.ErrorMessages.Location = new System.Drawing.Point(846, 79);
this.ErrorMessages.Multiline = true;
this.ErrorMessages.Name = "ErrorMessages";
@@ -187,9 +187,9 @@
this.ErrorMessages.Size = new System.Drawing.Size(360, 272);
this.ErrorMessages.TabIndex = 5;
this.ErrorMessages.TabStop = false;
//
//
// chtTPS
//
//
this.chtTPS.BackColor = System.Drawing.Color.Transparent;
chartArea1.AxisX.IntervalType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Seconds;
chartArea1.AxisX.MajorGrid.Enabled = false;
@@ -222,9 +222,9 @@
this.chtTPS.Size = new System.Drawing.Size(755, 267);
this.chtTPS.TabIndex = 33;
this.chtTPS.Text = "chtTPS";
//
//
// statusStrip1
//
//
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripStatusLabel1,
@@ -236,40 +236,40 @@
this.statusStrip1.Size = new System.Drawing.Size(815, 22);
this.statusStrip1.TabIndex = 35;
this.statusStrip1.Text = "statusStrip1";
//
//
// toolStripStatusLabel1
//
//
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
this.toolStripStatusLabel1.Size = new System.Drawing.Size(80, 17);
this.toolStripStatusLabel1.Text = "Elapsed Time:";
//
//
// lblTime
//
//
this.lblTime.Name = "lblTime";
this.lblTime.Size = new System.Drawing.Size(13, 17);
this.lblTime.Text = "0";
//
//
// toolStripStatusLabel3
//
//
this.toolStripStatusLabel3.Name = "toolStripStatusLabel3";
this.toolStripStatusLabel3.Size = new System.Drawing.Size(100, 17);
this.toolStripStatusLabel3.Text = "Running Threads:";
//
//
// lblThreads
//
//
this.lblThreads.Name = "lblThreads";
this.lblThreads.Size = new System.Drawing.Size(13, 17);
this.lblThreads.Text = "0";
//
//
// splitContainer1
//
//
this.splitContainer1.BackColor = System.Drawing.Color.Transparent;
this.splitContainer1.Location = new System.Drawing.Point(0, 25);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
//
// splitContainer1.Panel1
//
//
this.splitContainer1.Panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.splitContainer1.Panel1.Controls.Add(this.btnReset);
this.splitContainer1.Panel1.Controls.Add(this.btnAutoTune);
@@ -280,17 +280,17 @@
this.splitContainer1.Panel1.Controls.Add(this.btnRun);
this.splitContainer1.Panel1.Controls.Add(this.btnStop);
this.splitContainer1.Panel1.Controls.Add(this.lbResults);
//
//
// splitContainer1.Panel2
//
//
this.splitContainer1.Panel2.Controls.Add(this.chtPageReads);
this.splitContainer1.Panel2.Controls.Add(this.chtCPU);
this.splitContainer1.Size = new System.Drawing.Size(786, 655);
this.splitContainer1.SplitterDistance = 398;
this.splitContainer1.TabIndex = 39;
//
//
// btnReset
//
//
this.btnReset.BackColor = System.Drawing.Color.White;
this.btnReset.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReset.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -302,9 +302,9 @@
this.btnReset.Text = "Reset";
this.btnReset.UseVisualStyleBackColor = false;
this.btnReset.Click += new System.EventHandler(this.btnReset_Click);
//
//
// label2
//
//
this.label2.AutoSize = true;
this.label2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -314,9 +314,9 @@
this.label2.Size = new System.Drawing.Size(142, 17);
this.label2.TabIndex = 42;
this.label2.Text = "Batch Requests / sec";
//
//
// btnToggle
//
//
this.btnToggle.BackColor = System.Drawing.Color.White;
this.btnToggle.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnToggle.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -328,9 +328,9 @@
this.btnToggle.Text = "Show diagnostics ";
this.btnToggle.UseVisualStyleBackColor = false;
this.btnToggle.Click += new System.EventHandler(this.btnToggle_Click);
//
//
// chtPageReads
//
//
chartArea2.AxisX.Enabled = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.False;
chartArea2.AxisX.LabelStyle.Enabled = false;
chartArea2.AxisX.LineColor = System.Drawing.Color.White;
@@ -361,9 +361,9 @@
this.chtPageReads.TabIndex = 42;
this.chtPageReads.Text = "chtPageReads";
this.chtPageReads.Click += new System.EventHandler(this.chtPageReads_Click);
//
//
// chtCPU
//
//
this.chtCPU.BackColor = System.Drawing.Color.Transparent;
chartArea3.AxisX.LabelStyle.Enabled = false;
chartArea3.AxisX.LineColor = System.Drawing.Color.White;
@@ -399,9 +399,9 @@
this.chtCPU.Size = new System.Drawing.Size(786, 253);
this.chtCPU.TabIndex = 41;
this.chtCPU.Click += new System.EventHandler(this.chtCPU_Click);
//
//
// label3
//
//
this.label3.AutoSize = true;
this.label3.BackColor = System.Drawing.Color.Transparent;
this.label3.Location = new System.Drawing.Point(843, 40);
@@ -409,9 +409,9 @@
this.label3.Size = new System.Drawing.Size(83, 13);
this.label3.TabIndex = 11;
this.label3.Text = "Error Messages:";
//
//
// FrmMain
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.BackColor = System.Drawing.Color.White;
@@ -1,15 +1,15 @@
//----------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
// EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
//----------------------------------------------------------------------------------
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious. No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
//----------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
// EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
//----------------------------------------------------------------------------------
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious. No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
using System;
using System.Collections.Generic;
@@ -22,12 +22,12 @@ using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;
using System.Windows.Forms.Integration;
/// <summary>
///
/// Documentation References:
/// <summary>
///
/// Documentation References:
/// Automatic Tuning: http://docs.microsoft.com/sql/relational-databases/automatic-tuning/automatic-tuning
/// </summary>
///
/// </summary>
///
namespace DemoWorkload
{
@@ -36,7 +36,7 @@ namespace DemoWorkload
delegate void SetTextCallback(string text);
public Object ErrorLock = new Object();
public Object StopLock = new Object();
public Object StopLock = new Object();
List<Thread> RunningThreads = new List<Thread>();
Thread MonitorThread;
@@ -48,7 +48,7 @@ namespace DemoWorkload
int TPSChartTime = 0;
public int ReadAutoTune()
{
{
string ConfigSelect = string.Format("select count(*) from sys.database_automatic_tuning_options where actual_state = 1");
System.Data.SqlClient.SqlConnection conn = new SqlConnection(Program.CONN_STR);
@@ -79,13 +79,13 @@ namespace DemoWorkload
{
InitializeComponent();
}
delegate void SetInt64Callback(Int64 value);
delegate void SetIntCallback(int value);
/// <summary>
/// <summary>
/// Adds a line of text into the message box
/// </summary>
/// </summary>
private void AddText(string text)
{
// InvokeRequired required compares the thread ID of the
@@ -102,31 +102,31 @@ namespace DemoWorkload
}
}
/// <summary>
/// <summary>
/// Updates the thread count display
/// </summary>
/// </summary>
private void UpdateCount(string TC)
{
try { this.lblThreads.Text = TC.ToString(); }
catch (Exception ex) { ShowThreadExceptionDialog("UpdateCount", ex); }
}
/// <summary>
/// <summary>
/// Updates the elapsed time display
/// </summary>
/// </summary>
private void UpdateElapsed(string Elapsed)
{
this.lblTime.Text = Elapsed.ToString();
this.lblTime.Text = Elapsed.ToString();
}
/// <summary>
/// Updates the CPU% bar in the chart
/// <summary>
/// Updates the CPU% bar in the chart
/// Note that this proc does NOT cause the chart to refresh.
/// that is done in UpdateTPS(), which should be called after this proc.
/// </summary>
/// </summary>
private void UpdateCPUChart(int CPU)
{
try {
try {
if (this.statusStrip1.InvokeRequired)
{
SetIntCallback d = new SetIntCallback(UpdateCPUChart);
@@ -143,12 +143,12 @@ namespace DemoWorkload
catch (Exception ex) { ShowThreadExceptionDialog("UpdateCPUChart", ex); }
}
/// <summary>
/// <summary>
/// Updates PageReads in the Chart
/// </summary>
/// </summary>
private void UpdatePageReadChart(Int64 PageReads)
{
try {
try {
if (this.statusStrip1.InvokeRequired)
{
SetInt64Callback d = new SetInt64Callback(UpdatePageReadChart);
@@ -165,12 +165,12 @@ namespace DemoWorkload
catch (Exception ex) { ShowThreadExceptionDialog("UpdatePageReadChart", ex); }
}
/// <summary>
/// <summary>
/// Updates the TPS bar in the chart, and causes the whole chart to be re-drawn with the new data.
/// </summary>
/// </summary>
private void UpdateTPSChart(Int64 TPS)
{
try {
try {
if (this.statusStrip1.InvokeRequired)
{
SetInt64Callback d = new SetInt64Callback(UpdateTPSChart);
@@ -181,9 +181,9 @@ namespace DemoWorkload
// Updating Speedometer
if (TPS >= 0)
{
//double normalizedTPS = (double)TPS;
//double normalizedTPS = (double)TPS;
//uiControls.speedDial.CurrentValue = normalizedTPS;
//uiControls.speedDial.DialText = normalizedTPS.ToString("#.##");
//uiControls.speedDial.DialText = normalizedTPS.ToString("#.##");
// Updating TPS chart
TPSChartTime++;
@@ -207,9 +207,9 @@ namespace DemoWorkload
catch (Exception ex) { ShowThreadExceptionDialog("UpdateTPSChart", ex); }
}
/// <summary>
/// <summary>
/// Updates Results
/// </summary>
/// </summary>
public void UpdateResults(string Results)
{
try
@@ -235,9 +235,9 @@ namespace DemoWorkload
catch (Exception ex) { ShowThreadExceptionDialog("UpdateResults", ex); }
}
/// <summary>
/// <summary>
/// Executes Read Commands
/// </summary>
/// </summary>
void OnRunClick(object sender, EventArgs e)
{
try
@@ -268,7 +268,7 @@ namespace DemoWorkload
catch (Exception ex) { ShowThreadExceptionDialog("OnRunClick", ex); }
}
/// <summary>
/// <summary>
/// Executes Transactions on the target server
/// </summary>
void ThreadWorker(object tp)
@@ -317,7 +317,7 @@ namespace DemoWorkload
}
}
/// <summary>
/// <summary>
/// Thread Monitor
/// </summary>
void ThreadMonitor()
@@ -377,7 +377,7 @@ namespace DemoWorkload
}
mo_tables = ReadAutoTune();
if (mo_tables == 0)
{
//This is the case where Auto Tuning is turned OFF.
@@ -468,7 +468,7 @@ namespace DemoWorkload
UpdateTPSChart(TPS);
}
/// <summary>
/// <summary>
/// Stop Button
/// </summary>
private void btnStop_Click(object sender, EventArgs e)
@@ -478,7 +478,7 @@ namespace DemoWorkload
Stopped = true;
}
}
/// <summary>
/// <summary>
/// Application Exit
/// </summary>
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
@@ -486,7 +486,7 @@ namespace DemoWorkload
Application.Exit();
}
/// <summary>
/// <summary>
/// Regression Button
/// </summary>
private void btnRegress_Click(object sender, EventArgs e)
@@ -534,7 +534,7 @@ namespace DemoWorkload
catch (Exception ex) { ShowThreadExceptionDialog("btnRegress_Click", ex); }
}
/// <summary>
/// <summary>
/// Auto Tuning Button
/// </summary>
private void btnAutoTune_Click(object sender, EventArgs e)
@@ -586,7 +586,7 @@ namespace DemoWorkload
catch (Exception ex) { ShowThreadExceptionDialog("btnAutoTune_Click", ex); }
}
/// <summary>
/// <summary>
/// Reset Button
/// </summary>
private void btnReset_Click(object sender, EventArgs e)
@@ -632,7 +632,7 @@ namespace DemoWorkload
catch (Exception ex) { ShowThreadExceptionDialog("btnReset_Click", ex); }
}
/// <summary>
/// <summary>
/// Configuration Settings
/// </summary>
private void configurationToolStripMenuItem_Click(object sender, EventArgs e)
@@ -645,7 +645,7 @@ namespace DemoWorkload
catch (Exception ex) { ShowThreadExceptionDialog("configurationToolStripMenuItem_Click", ex); }
}
/// <summary>
/// <summary>
/// Show Diagnostics
/// </summary>
private void btnToggle_Click(object sender, EventArgs e)
@@ -667,7 +667,7 @@ namespace DemoWorkload
catch (Exception ex) { ShowThreadExceptionDialog("btnToggle_Click", ex); }
}
/// <summary>
/// <summary>
/// Frm Main Load
/// </summary>
private void FrmMain_Load(object sender, EventArgs e)
@@ -685,7 +685,7 @@ namespace DemoWorkload
catch (Exception ex) { ShowThreadExceptionDialog("FrmMain_Load", ex);}
}
/// <summary>
/// <summary>
/// Frm Main Closing
/// </summary>
private void FrmMain_FormClosing(object sender, FormClosingEventArgs e)
@@ -701,7 +701,7 @@ namespace DemoWorkload
}
}
/// <summary>
/// <summary>
/// Creates an error message and displays it.
/// </summary>
private static DialogResult ShowThreadExceptionDialog(string title, Exception e)
@@ -723,7 +723,7 @@ namespace DemoWorkload
}
}
/// <summary>
/// <summary>
/// ThreadParams Class
/// </summary>
class ThreadParams
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
@@ -26,36 +26,36 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
@@ -3,7 +3,7 @@ using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("DemoWorkload")]
@@ -15,8 +15,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
@@ -26,11 +26,11 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
@@ -10,8 +10,8 @@
namespace DemoWorkload.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
@@ -23,15 +23,15 @@ namespace DemoWorkload.Properties {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
@@ -45,7 +45,7 @@ namespace DemoWorkload.Properties {
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
@@ -59,7 +59,7 @@ namespace DemoWorkload.Properties {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@@ -69,7 +69,7 @@ namespace DemoWorkload.Properties {
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@@ -79,7 +79,7 @@ namespace DemoWorkload.Properties {
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
@@ -26,36 +26,36 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
@@ -9,14 +9,14 @@
//------------------------------------------------------------------------------
namespace DemoWorkload.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
@@ -37,7 +37,7 @@ This Windows Forms sample application built on .NET Framework 4.6 demonstrates t
7. Build the app for release and run it. Do not use the debugger, as that will slow down the app.
8. Start the workload with the **Start** button, and run for a while to show perf profile. Then press the **Regress** button to introduce the problem and observe the throughput going down.
8. Start the workload with the **Start** button, and run for a while to show perf profile. Then press the **Regress** button to introduce the problem and observe the throughput going down.
9. Run for a while to show perf profile of regressed workload, and then press the **Auto Tuning** button and observe the system going back to a previously good plan captured by Query Store, and throughput is restored to initial Baseline status. You can tweak aspects of the workload (e.g., number of threads) through the configuration form accessed using the "Options" menu. No need to recompile or restart the application.
@@ -9,7 +9,7 @@ namespace FlgpWwiDemo.Controllers
public class DemoController : Controller
{
IQueryMapper queryMapper = null;
public DemoController(IQueryMapper queryMapper)
{
this.queryMapper = queryMapper;
@@ -27,7 +27,7 @@ namespace FlgpWwiDemo.Controllers
await this.queryMapper
.OnError(ex=> status = ex.Message)
.ExecuteReader("EXEC dbo.report 7", reader => {
result = reader.GetDecimal(0);
result = reader.GetDecimal(0);
end = DateTimeOffset.Now.ToUnixTimeMilliseconds();
});
return "{\"x\":\"" + DateTime.Now.ToUniversalTime().ToString() + "\",\"y\":" + (end-start) + ",\"start\":" + start + ",\"end\":" + end + ",\"result\":" + result +",\"status\":\"" + status + "\"}";
@@ -12,7 +12,7 @@ This code sample demonstrates how [Automatic tuning in SQL Server 2017 CTP2.0+](
<a name=about-this-sample></a>
## About this sample
## About this sample
1. **Applies to:** SQL Server 2017 (or higher) Enterprise / Developer / Evaluation Edition
2. **Key features:**
- Automatic tuning / forcing last good plan
@@ -31,7 +31,7 @@ namespace FlgpWwiDemo
public void ConfigureServices(IServiceCollection services)
{
string ConnString = Configuration["ConnectionStrings:Wwi"];
// Adding data access services/components.
services.AddTransient<IQueryMapper>(
sp => new QueryMapper(new SqlConnection(ConnString))
@@ -146,7 +146,7 @@ FROM sys.dm_db_tuning_recommendations
[recommended plan_id] int '$.recommendedPlanId'
) as planForceDetails;
-- 5. Recommendation is in "Verifying" state, but the last good plan is forced, so the query will be faster:
EXEC sp_executesql N'select avg([UnitPrice]*[Quantity])
from Sales.OrderLines
@@ -17,13 +17,13 @@ GO
CREATE SCHEMA [Sequences];
GO
CREATE SEQUENCE [Sequences].[OrderLineID]
CREATE SEQUENCE [Sequences].[OrderLineID]
AS [int]
START WITH 231413
INCREMENT BY 1
MINVALUE -2147483648
MAXVALUE 2147483647
CACHE;
CACHE;
GO
CREATE TABLE Sales.OrderLines(
@@ -39,10 +39,10 @@ CREATE TABLE Sales.OrderLines(
PickingCompletedWhen datetime2(7) NULL,
LastEditedBy int NOT NULL,
LastEditedWhen datetime2(7) NOT NULL
);
);
GO
ALTER TABLE [Sales].[OrderLines]
ADD CONSTRAINT [DF_Sales_OrderLines_OrderLineID]
ADD CONSTRAINT [DF_Sales_OrderLines_OrderLineID]
DEFAULT (NEXT VALUE FOR [Sequences].[OrderLineID]) FOR [OrderLineID]
GO
ALTER TABLE [Sales].[OrderLines]
@@ -18,7 +18,7 @@ CREATE NONCLUSTERED COLUMNSTORE INDEX [NCCX_Sales_OrderLines] ON [Sales].[OrderL
[UnitPrice],
[PickedQuantity],
[PackageTypeID] -- adding package type id for demo purpose
)WITH (DROP_EXISTING = OFF, COMPRESSION_DELAY = 0)
)WITH (DROP_EXISTING = OFF, COMPRESSION_DELAY = 0)
GO
CREATE OR ALTER PROCEDURE [dbo].[initialize]