From ab4366e421741163d9099f46d821760fc17407f2 Mon Sep 17 00:00:00 2001 From: Perry Skountrianos - MSFT Date: Wed, 23 Mar 2016 16:16:37 -0700 Subject: [PATCH 01/13] Update FrmMain.cs {minor} Removed try/catch for UpdateElapsed() as it was throwing on App Exit() while threads where still executing. --- Ticket Reservations/DemoWorkload/FrmMain.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Ticket Reservations/DemoWorkload/FrmMain.cs b/Ticket Reservations/DemoWorkload/FrmMain.cs index 3cc1823c..bd34e072 100644 --- a/Ticket Reservations/DemoWorkload/FrmMain.cs +++ b/Ticket Reservations/DemoWorkload/FrmMain.cs @@ -91,8 +91,7 @@ namespace DemoWorkload /// private void UpdateElapsed(string Elapsed) { - try { this.lblTime.Text = Elapsed.ToString(); } - catch (Exception ex) { ShowThreadExceptionDialog("UpdateElapsed", ex); } + this.lblTime.Text = Elapsed.ToString(); } /// From b593b970abe8bb0f5bc5180603840e3206f1336d Mon Sep 17 00:00:00 2001 From: barbkess Date: Thu, 24 Mar 2016 15:56:03 -0700 Subject: [PATCH 02/13] initial folders --- .../DemoWorkload/App.Config | 68 +- .../DemoWorkload/DemoWorkload.csproj | 412 ++++---- .../DemoWorkload/DemoWorkload.csproj.user | 0 .../DemoWorkload/DemoWorkload.ruleset | 0 .../DemoWorkload/FrmConfig.Designer.cs | 0 .../DemoWorkload/FrmConfig.cs | 0 .../DemoWorkload/FrmConfig.resx | 0 .../DemoWorkload/FrmMain.Designer.cs | 956 +++++++++--------- .../DemoWorkload/FrmMain.cs | 0 .../DemoWorkload/FrmMain.resx | 0 .../DemoWorkload/Program.cs | 0 .../DemoWorkload/Properties/AssemblyInfo.cs | 78 +- .../Properties/Resources.Designer.cs | 0 .../DemoWorkload/Properties/Resources.resx | 0 .../Properties/Settings.Designer.cs | 0 .../DemoWorkload/Properties/Settings.settings | 0 .../DemoWorkload/Resources/SQLBackground.jpg | Bin .../DemoWorkload/Resources/sqlserver.ico | Bin .../DemoWorkload/UIControls.cs | 0 .../DemoWorkload/packages.config | 0 .../ticket-reservations}/InMemoryOLTPDemo.sln | 0 .../in-memory/ticket-reservations}/README.md | 0 .../ticket-reservations}/Screenshots/1.png | Bin .../TicketReservations.sqlproj | 150 +-- .../Sequences/TicketReservationSequence.sql | 0 .../BatchInsertReservations.sql | 56 +- .../dbo/Stored Procedures/Demo_Reset.sql | 0 .../InsertReservationDetails.sql | 58 +- .../ReadMultipleReservations.sql | 56 +- .../dbo/Tables/TicketReservationDetail.sql | 36 +- 30 files changed, 935 insertions(+), 935 deletions(-) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/DemoWorkload/App.Config (98%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/DemoWorkload/DemoWorkload.csproj (97%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/DemoWorkload/DemoWorkload.csproj.user (100%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/DemoWorkload/DemoWorkload.ruleset (100%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/DemoWorkload/FrmConfig.Designer.cs (100%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/DemoWorkload/FrmConfig.cs (100%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/DemoWorkload/FrmConfig.resx (100%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/DemoWorkload/FrmMain.Designer.cs (98%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/DemoWorkload/FrmMain.cs (100%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/DemoWorkload/FrmMain.resx (100%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/DemoWorkload/Program.cs (100%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/DemoWorkload/Properties/AssemblyInfo.cs (97%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/DemoWorkload/Properties/Resources.Designer.cs (100%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/DemoWorkload/Properties/Resources.resx (100%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/DemoWorkload/Properties/Settings.Designer.cs (100%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/DemoWorkload/Properties/Settings.settings (100%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/DemoWorkload/Resources/SQLBackground.jpg (100%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/DemoWorkload/Resources/sqlserver.ico (100%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/DemoWorkload/UIControls.cs (100%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/DemoWorkload/packages.config (100%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/InMemoryOLTPDemo.sln (100%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/README.md (100%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/Screenshots/1.png (100%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/TicketReservations/TicketReservations.sqlproj (98%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/TicketReservations/dbo/Sequences/TicketReservationSequence.sql (100%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/TicketReservations/dbo/Stored Procedures/BatchInsertReservations.sql (96%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/TicketReservations/dbo/Stored Procedures/Demo_Reset.sql (100%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/TicketReservations/dbo/Stored Procedures/InsertReservationDetails.sql (97%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/TicketReservations/dbo/Stored Procedures/ReadMultipleReservations.sql (96%) rename {Ticket Reservations => samples/in-memory/ticket-reservations}/TicketReservations/dbo/Tables/TicketReservationDetail.sql (97%) diff --git a/Ticket Reservations/DemoWorkload/App.Config b/samples/in-memory/ticket-reservations/DemoWorkload/App.Config similarity index 98% rename from Ticket Reservations/DemoWorkload/App.Config rename to samples/in-memory/ticket-reservations/DemoWorkload/App.Config index c4912ea9..38a9a578 100644 --- a/Ticket Reservations/DemoWorkload/App.Config +++ b/samples/in-memory/ticket-reservations/DemoWorkload/App.Config @@ -1,35 +1,35 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Ticket Reservations/DemoWorkload/DemoWorkload.csproj b/samples/in-memory/ticket-reservations/DemoWorkload/DemoWorkload.csproj similarity index 97% rename from Ticket Reservations/DemoWorkload/DemoWorkload.csproj rename to samples/in-memory/ticket-reservations/DemoWorkload/DemoWorkload.csproj index 922dbce9..81c12707 100644 --- a/Ticket Reservations/DemoWorkload/DemoWorkload.csproj +++ b/samples/in-memory/ticket-reservations/DemoWorkload/DemoWorkload.csproj @@ -1,207 +1,207 @@ - - - - Debug - x86 - 8.0.30703 - 2.0 - {2881A3C4-9153-46F2-8196-9929ED9C17D6} - WinExe - Properties - DemoWorkload - DemoWorkload - v4.6 - - - 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - x86 - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - DemoWorkload.ruleset - - - x86 - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - DemoWorkload.ruleset - - - true - bin\Debug\ - DEBUG;TRACE - full - AnyCPU - bin\Debug\WindowsFormsApplication2.exe.CodeAnalysisLog.xml - true - GlobalSuppressions.cs - prompt - DemoWorkload.ruleset - ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets - true - ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules - false - false - true - - - bin\Release\ - TRACE - true - pdbonly - AnyCPU - bin\Release\WindowsFormsApplication2.exe.CodeAnalysisLog.xml - true - GlobalSuppressions.cs - prompt - DemoWorkload.ruleset - ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets - true - ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules - false - false - - - Resources\sqlserver.ico - - - false - - - false - - - - - - - - ..\packages\CircularGauge.1.0.0\Lib\Net40-Client\CircularGauge.dll - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - Form - - - FrmConfig.cs - - - Form - - - FrmMain.cs - - - - - FrmConfig.cs - - - FrmMain.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - - - - - - - - - - False - Microsoft .NET Framework 4.6 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 - false - - - - - + + + + Debug + x86 + 8.0.30703 + 2.0 + {2881A3C4-9153-46F2-8196-9929ED9C17D6} + WinExe + Properties + DemoWorkload + DemoWorkload + v4.6 + + + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + DemoWorkload.ruleset + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + DemoWorkload.ruleset + + + true + bin\Debug\ + DEBUG;TRACE + full + AnyCPU + bin\Debug\WindowsFormsApplication2.exe.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + DemoWorkload.ruleset + ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets + true + ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules + false + false + true + + + bin\Release\ + TRACE + true + pdbonly + AnyCPU + bin\Release\WindowsFormsApplication2.exe.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + DemoWorkload.ruleset + ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets + true + ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules + false + false + + + Resources\sqlserver.ico + + + false + + + false + + + + + + + + ..\packages\CircularGauge.1.0.0\Lib\Net40-Client\CircularGauge.dll + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + Form + + + FrmConfig.cs + + + Form + + + FrmMain.cs + + + + + FrmConfig.cs + + + FrmMain.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + + + + + + False + Microsoft .NET Framework 4.6 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + + + \ No newline at end of file diff --git a/Ticket Reservations/DemoWorkload/DemoWorkload.csproj.user b/samples/in-memory/ticket-reservations/DemoWorkload/DemoWorkload.csproj.user similarity index 100% rename from Ticket Reservations/DemoWorkload/DemoWorkload.csproj.user rename to samples/in-memory/ticket-reservations/DemoWorkload/DemoWorkload.csproj.user diff --git a/Ticket Reservations/DemoWorkload/DemoWorkload.ruleset b/samples/in-memory/ticket-reservations/DemoWorkload/DemoWorkload.ruleset similarity index 100% rename from Ticket Reservations/DemoWorkload/DemoWorkload.ruleset rename to samples/in-memory/ticket-reservations/DemoWorkload/DemoWorkload.ruleset diff --git a/Ticket Reservations/DemoWorkload/FrmConfig.Designer.cs b/samples/in-memory/ticket-reservations/DemoWorkload/FrmConfig.Designer.cs similarity index 100% rename from Ticket Reservations/DemoWorkload/FrmConfig.Designer.cs rename to samples/in-memory/ticket-reservations/DemoWorkload/FrmConfig.Designer.cs diff --git a/Ticket Reservations/DemoWorkload/FrmConfig.cs b/samples/in-memory/ticket-reservations/DemoWorkload/FrmConfig.cs similarity index 100% rename from Ticket Reservations/DemoWorkload/FrmConfig.cs rename to samples/in-memory/ticket-reservations/DemoWorkload/FrmConfig.cs diff --git a/Ticket Reservations/DemoWorkload/FrmConfig.resx b/samples/in-memory/ticket-reservations/DemoWorkload/FrmConfig.resx similarity index 100% rename from Ticket Reservations/DemoWorkload/FrmConfig.resx rename to samples/in-memory/ticket-reservations/DemoWorkload/FrmConfig.resx diff --git a/Ticket Reservations/DemoWorkload/FrmMain.Designer.cs b/samples/in-memory/ticket-reservations/DemoWorkload/FrmMain.Designer.cs similarity index 98% rename from Ticket Reservations/DemoWorkload/FrmMain.Designer.cs rename to samples/in-memory/ticket-reservations/DemoWorkload/FrmMain.Designer.cs index 2fad3781..f9820e1b 100644 --- a/Ticket Reservations/DemoWorkload/FrmMain.Designer.cs +++ b/samples/in-memory/ticket-reservations/DemoWorkload/FrmMain.Designer.cs @@ -1,478 +1,478 @@ -namespace DemoWorkload -{ - partial class FrmMain - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); - System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); - System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint1 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0D, 0D); - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series(); - System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint2 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0D, 1D); - System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea3 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); - System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series(); - System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint3 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0D, 1D); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain)); - this.btnRun = new System.Windows.Forms.Button(); - this.btnStop = new System.Windows.Forms.Button(); - this.lbResults = new System.Windows.Forms.Label(); - this.menuStrip1 = new System.Windows.Forms.MenuStrip(); - this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.configurationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ErrorMessages = new System.Windows.Forms.TextBox(); - this.chtTPS = new System.Windows.Forms.DataVisualization.Charting.Chart(); - this.statusStrip1 = new System.Windows.Forms.StatusStrip(); - this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); - this.lblTime = new System.Windows.Forms.ToolStripStatusLabel(); - this.toolStripStatusLabel3 = new System.Windows.Forms.ToolStripStatusLabel(); - this.lblThreads = new System.Windows.Forms.ToolStripStatusLabel(); - this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.label4 = new System.Windows.Forms.Label(); - this.speedDialPanel = new System.Windows.Forms.Panel(); - this.label2 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.btnToggle = new System.Windows.Forms.Button(); - this.chtLatches = new System.Windows.Forms.DataVisualization.Charting.Chart(); - this.chtCPU = new System.Windows.Forms.DataVisualization.Charting.Chart(); - this.label3 = new System.Windows.Forms.Label(); - this.menuStrip1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.chtTPS)).BeginInit(); - this.statusStrip1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); - this.splitContainer1.Panel1.SuspendLayout(); - this.splitContainer1.Panel2.SuspendLayout(); - this.splitContainer1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.chtLatches)).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))); - this.btnRun.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btnRun.Location = new System.Drawing.Point(801, 20); - this.btnRun.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.btnRun.Name = "btnRun"; - this.btnRun.Size = new System.Drawing.Size(112, 37); - this.btnRun.TabIndex = 3; - 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))); - this.btnStop.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btnStop.Location = new System.Drawing.Point(923, 20); - this.btnStop.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.btnStop.Name = "btnStop"; - this.btnStop.Size = new System.Drawing.Size(109, 37); - this.btnStop.TabIndex = 25; - this.btnStop.Tag = "Data"; - this.btnStop.Text = "Stop"; - this.btnStop.UseVisualStyleBackColor = false; - this.btnStop.Click += new System.EventHandler(this.btnStop_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))))); - this.lbResults.Location = new System.Drawing.Point(-47, 4); - this.lbResults.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lbResults.Name = "lbResults"; - this.lbResults.Size = new System.Drawing.Size(313, 65); - 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}); - this.menuStrip1.Location = new System.Drawing.Point(0, 0); - this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Padding = new System.Windows.Forms.Padding(8, 1, 0, 1); - this.menuStrip1.Size = new System.Drawing.Size(1087, 26); - 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(73, 24); - this.optionsToolStripMenuItem.Text = "Options"; - // - // configurationToolStripMenuItem - // - this.configurationToolStripMenuItem.Name = "configurationToolStripMenuItem"; - this.configurationToolStripMenuItem.Size = new System.Drawing.Size(175, 26); - 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(175, 26); - this.exitToolStripMenuItem.Text = "Exit"; - this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); - // - // ErrorMessages - // - this.ErrorMessages.Location = new System.Drawing.Point(1128, 97); - this.ErrorMessages.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.ErrorMessages.Multiline = true; - this.ErrorMessages.Name = "ErrorMessages"; - this.ErrorMessages.ReadOnly = true; - this.ErrorMessages.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.ErrorMessages.Size = new System.Drawing.Size(479, 334); - 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; - chartArea1.AxisX.MajorGrid.Interval = 0D; - chartArea1.AxisX.MajorGrid.IntervalOffset = 0D; - chartArea1.AxisX.MajorGrid.IntervalType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto; - chartArea1.AxisX.MajorTickMark.Enabled = false; - chartArea1.AxisX.Maximum = 100D; - chartArea1.AxisX.Minimum = 0D; - chartArea1.AxisY.MajorGrid.Enabled = false; - chartArea1.AxisY.Minimum = 0D; - chartArea1.BackColor = System.Drawing.Color.Transparent; - chartArea1.Name = "ChartArea1"; - this.chtTPS.ChartAreas.Add(chartArea1); - legend1.BackColor = System.Drawing.Color.Transparent; - legend1.Enabled = false; - legend1.Name = "Legend1"; - this.chtTPS.Legends.Add(legend1); - this.chtTPS.Location = new System.Drawing.Point(449, 110); - this.chtTPS.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.chtTPS.Name = "chtTPS"; - this.chtTPS.Palette = System.Windows.Forms.DataVisualization.Charting.ChartColorPalette.None; - series1.ChartArea = "ChartArea1"; - series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Area; - series1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(166))))); - series1.Legend = "Legend1"; - series1.MarkerBorderWidth = 3; - series1.Name = "TPS"; - series1.Points.Add(dataPoint1); - this.chtTPS.Series.Add(series1); - this.chtTPS.Size = new System.Drawing.Size(464, 330); - this.chtTPS.TabIndex = 33; - this.chtTPS.Text = "chart1"; - // - // statusStrip1 - // - this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); - this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolStripStatusLabel1, - this.lblTime, - this.toolStripStatusLabel3, - this.lblThreads}); - this.statusStrip1.Location = new System.Drawing.Point(0, 796); - this.statusStrip1.Name = "statusStrip1"; - this.statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 19, 0); - this.statusStrip1.Size = new System.Drawing.Size(1087, 25); - this.statusStrip1.TabIndex = 35; - this.statusStrip1.Text = "statusStrip1"; - // - // toolStripStatusLabel1 - // - this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; - this.toolStripStatusLabel1.Size = new System.Drawing.Size(101, 20); - this.toolStripStatusLabel1.Text = "Elapsed Time:"; - // - // lblTime - // - this.lblTime.Name = "lblTime"; - this.lblTime.Size = new System.Drawing.Size(17, 20); - this.lblTime.Text = "0"; - // - // toolStripStatusLabel3 - // - this.toolStripStatusLabel3.Name = "toolStripStatusLabel3"; - this.toolStripStatusLabel3.Size = new System.Drawing.Size(122, 20); - this.toolStripStatusLabel3.Text = "Running Threads:"; - // - // lblThreads - // - this.lblThreads.Name = "lblThreads"; - this.lblThreads.Size = new System.Drawing.Size(17, 20); - this.lblThreads.Text = "0"; - // - // splitContainer1 - // - this.splitContainer1.BackColor = System.Drawing.Color.Transparent; - this.splitContainer1.Location = new System.Drawing.Point(0, 31); - this.splitContainer1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - 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.label4); - this.splitContainer1.Panel1.Controls.Add(this.speedDialPanel); - this.splitContainer1.Panel1.Controls.Add(this.label2); - this.splitContainer1.Panel1.Controls.Add(this.label1); - this.splitContainer1.Panel1.Controls.Add(this.btnToggle); - this.splitContainer1.Panel1.Controls.Add(this.chtTPS); - 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.chtLatches); - this.splitContainer1.Panel2.Controls.Add(this.chtCPU); - this.splitContainer1.Size = new System.Drawing.Size(1048, 806); - this.splitContainer1.SplitterDistance = 490; - this.splitContainer1.SplitterWidth = 5; - this.splitContainer1.TabIndex = 39; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label4.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.label4.Location = new System.Drawing.Point(156, 400); - this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(158, 17); - this.label4.TabIndex = 45; - this.label4.Text = "Transactions/sec x1000"; - // - // speedDialPanel - // - this.speedDialPanel.Location = new System.Drawing.Point(28, 106); - this.speedDialPanel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); - this.speedDialPanel.Name = "speedDialPanel"; - this.speedDialPanel.Size = new System.Drawing.Size(425, 320); - this.speedDialPanel.TabIndex = 43; - // - // 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))); - this.label2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.label2.Location = new System.Drawing.Point(472, 85); - this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(148, 20); - this.label2.TabIndex = 42; - this.label2.Text = "Transactions / sec"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label1.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.label1.Location = new System.Drawing.Point(27, 84); - this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(310, 20); - this.label1.TabIndex = 41; - this.label1.Text = "Increase in performance since last reset"; - // - // 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))); - this.btnToggle.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btnToggle.Location = new System.Drawing.Point(24, 446); - this.btnToggle.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.btnToggle.Name = "btnToggle"; - this.btnToggle.Size = new System.Drawing.Size(199, 37); - this.btnToggle.TabIndex = 39; - this.btnToggle.Text = "Show diagnostics "; - this.btnToggle.UseVisualStyleBackColor = false; - this.btnToggle.Click += new System.EventHandler(this.btnToggle_Click); - // - // chtLatches - // - chartArea2.AxisX.Enabled = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.False; - chartArea2.AxisX.LabelStyle.Enabled = false; - chartArea2.AxisX.LineColor = System.Drawing.Color.White; - chartArea2.AxisX.LineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.NotSet; - chartArea2.AxisX.LineWidth = 0; - chartArea2.AxisX.MajorGrid.Enabled = false; - chartArea2.AxisX.MajorTickMark.Enabled = false; - chartArea2.AxisY.LineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.NotSet; - chartArea2.AxisY.MajorGrid.Enabled = false; - chartArea2.AxisY.MajorTickMark.Enabled = false; - chartArea2.AxisY.Maximum = 170000D; - chartArea2.AxisY.Minimum = 0D; - chartArea2.AxisY.Title = "Current latches / sec"; - chartArea2.AxisY.TitleFont = new System.Drawing.Font("Microsoft Sans Serif", 10F); - chartArea2.AxisY.TitleForeColor = System.Drawing.SystemColors.ControlDarkDark; - chartArea2.BorderWidth = 0; - chartArea2.Name = "ChartArea1"; - this.chtLatches.ChartAreas.Add(chartArea2); - this.chtLatches.Location = new System.Drawing.Point(0, 148); - this.chtLatches.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.chtLatches.Name = "chtLatches"; - series2.ChartArea = "ChartArea1"; - series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Bar; - series2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(73)))), ((int)(((byte)(0))))); - series2.Name = "Latches"; - series2.Points.Add(dataPoint2); - this.chtLatches.Series.Add(series2); - this.chtLatches.Size = new System.Drawing.Size(913, 103); - this.chtLatches.TabIndex = 42; - this.chtLatches.Text = "chart1"; - // - // chtCPU - // - this.chtCPU.BackColor = System.Drawing.Color.Transparent; - chartArea3.AxisX.LabelStyle.Enabled = false; - chartArea3.AxisX.LineColor = System.Drawing.Color.White; - chartArea3.AxisX.MajorGrid.Enabled = false; - chartArea3.AxisX.MajorTickMark.Enabled = false; - chartArea3.AxisX.MaximumAutoSize = 10F; - chartArea3.AxisY.LineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.NotSet; - chartArea3.AxisY.MajorGrid.Enabled = false; - chartArea3.AxisY.MajorTickMark.Enabled = false; - chartArea3.AxisY.Maximum = 100D; - chartArea3.AxisY.Minimum = 0D; - chartArea3.AxisY.Title = "Current % CPU Usage"; - chartArea3.AxisY.TitleForeColor = System.Drawing.SystemColors.ControlDarkDark; - chartArea3.BackColor = System.Drawing.Color.White; - chartArea3.BorderColor = System.Drawing.Color.White; - chartArea3.Name = "ChartArea1"; - chartArea3.Position.Auto = false; - chartArea3.Position.Height = 30F; - chartArea3.Position.Width = 77.49682F; - chartArea3.Position.X = 3F; - chartArea3.Position.Y = 1F; - this.chtCPU.ChartAreas.Add(chartArea3); - this.chtCPU.Dock = System.Windows.Forms.DockStyle.Fill; - this.chtCPU.Location = new System.Drawing.Point(0, 0); - this.chtCPU.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.chtCPU.Name = "chtCPU"; - this.chtCPU.Palette = System.Windows.Forms.DataVisualization.Charting.ChartColorPalette.None; - series3.ChartArea = "ChartArea1"; - series3.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Bar; - series3.Color = System.Drawing.Color.FromArgb(((int)(((byte)(140)))), ((int)(((byte)(198)))), ((int)(((byte)(0))))); - series3.Name = "CPUUsage"; - series3.Points.Add(dataPoint3); - this.chtCPU.Series.Add(series3); - this.chtCPU.Size = new System.Drawing.Size(1048, 311); - this.chtCPU.TabIndex = 41; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.BackColor = System.Drawing.Color.Transparent; - this.label3.Location = new System.Drawing.Point(1124, 49); - this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(112, 17); - this.label3.TabIndex = 11; - this.label3.Text = "Error Messages:"; - // - // FrmMain - // - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.White; - this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.ClientSize = new System.Drawing.Size(1087, 821); - this.Controls.Add(this.statusStrip1); - this.Controls.Add(this.splitContainer1); - this.Controls.Add(this.label3); - this.Controls.Add(this.ErrorMessages); - this.Controls.Add(this.menuStrip1); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.MainMenuStrip = this.menuStrip1; - this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.Name = "FrmMain"; - this.Text = "Blue Yonder Ticket Reservation Simulator"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmMain_FormClosing); - this.Load += new System.EventHandler(this.FrmMain_Load); - this.menuStrip1.ResumeLayout(false); - this.menuStrip1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.chtTPS)).EndInit(); - this.statusStrip1.ResumeLayout(false); - this.statusStrip1.PerformLayout(); - this.splitContainer1.Panel1.ResumeLayout(false); - this.splitContainer1.Panel1.PerformLayout(); - this.splitContainer1.Panel2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); - this.splitContainer1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.chtLatches)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.chtCPU)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Button btnRun; - private System.Windows.Forms.Button btnStop; - private System.Windows.Forms.Label lbResults; - private System.Windows.Forms.MenuStrip menuStrip1; - private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem configurationToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; - private System.Windows.Forms.TextBox ErrorMessages; - private System.Windows.Forms.DataVisualization.Charting.Chart chtTPS; - private System.Windows.Forms.StatusStrip statusStrip1; - private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1; - private System.Windows.Forms.ToolStripStatusLabel lblTime; - private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel3; - private System.Windows.Forms.ToolStripStatusLabel lblThreads; - private System.Windows.Forms.SplitContainer splitContainer1; - private System.Windows.Forms.Button btnToggle; - private System.Windows.Forms.DataVisualization.Charting.Chart chtCPU; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.DataVisualization.Charting.Chart chtLatches; - private System.Windows.Forms.Panel speedDialPanel; - private System.Windows.Forms.Label label4; - } -} - +namespace DemoWorkload +{ + partial class FrmMain + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); + System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); + System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint1 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0D, 0D); + System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); + System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint2 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0D, 1D); + System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea3 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); + System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series(); + System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint3 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(0D, 1D); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain)); + this.btnRun = new System.Windows.Forms.Button(); + this.btnStop = new System.Windows.Forms.Button(); + this.lbResults = new System.Windows.Forms.Label(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.configurationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ErrorMessages = new System.Windows.Forms.TextBox(); + this.chtTPS = new System.Windows.Forms.DataVisualization.Charting.Chart(); + this.statusStrip1 = new System.Windows.Forms.StatusStrip(); + this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); + this.lblTime = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel3 = new System.Windows.Forms.ToolStripStatusLabel(); + this.lblThreads = new System.Windows.Forms.ToolStripStatusLabel(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.label4 = new System.Windows.Forms.Label(); + this.speedDialPanel = new System.Windows.Forms.Panel(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.btnToggle = new System.Windows.Forms.Button(); + this.chtLatches = new System.Windows.Forms.DataVisualization.Charting.Chart(); + this.chtCPU = new System.Windows.Forms.DataVisualization.Charting.Chart(); + this.label3 = new System.Windows.Forms.Label(); + this.menuStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.chtTPS)).BeginInit(); + this.statusStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.chtLatches)).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))); + this.btnRun.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnRun.Location = new System.Drawing.Point(801, 20); + this.btnRun.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btnRun.Name = "btnRun"; + this.btnRun.Size = new System.Drawing.Size(112, 37); + this.btnRun.TabIndex = 3; + 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))); + this.btnStop.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnStop.Location = new System.Drawing.Point(923, 20); + this.btnStop.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btnStop.Name = "btnStop"; + this.btnStop.Size = new System.Drawing.Size(109, 37); + this.btnStop.TabIndex = 25; + this.btnStop.Tag = "Data"; + this.btnStop.Text = "Stop"; + this.btnStop.UseVisualStyleBackColor = false; + this.btnStop.Click += new System.EventHandler(this.btnStop_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))))); + this.lbResults.Location = new System.Drawing.Point(-47, 4); + this.lbResults.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lbResults.Name = "lbResults"; + this.lbResults.Size = new System.Drawing.Size(313, 65); + 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}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Padding = new System.Windows.Forms.Padding(8, 1, 0, 1); + this.menuStrip1.Size = new System.Drawing.Size(1087, 26); + 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(73, 24); + this.optionsToolStripMenuItem.Text = "Options"; + // + // configurationToolStripMenuItem + // + this.configurationToolStripMenuItem.Name = "configurationToolStripMenuItem"; + this.configurationToolStripMenuItem.Size = new System.Drawing.Size(175, 26); + 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(175, 26); + this.exitToolStripMenuItem.Text = "Exit"; + this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); + // + // ErrorMessages + // + this.ErrorMessages.Location = new System.Drawing.Point(1128, 97); + this.ErrorMessages.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.ErrorMessages.Multiline = true; + this.ErrorMessages.Name = "ErrorMessages"; + this.ErrorMessages.ReadOnly = true; + this.ErrorMessages.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.ErrorMessages.Size = new System.Drawing.Size(479, 334); + 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; + chartArea1.AxisX.MajorGrid.Interval = 0D; + chartArea1.AxisX.MajorGrid.IntervalOffset = 0D; + chartArea1.AxisX.MajorGrid.IntervalType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Auto; + chartArea1.AxisX.MajorTickMark.Enabled = false; + chartArea1.AxisX.Maximum = 100D; + chartArea1.AxisX.Minimum = 0D; + chartArea1.AxisY.MajorGrid.Enabled = false; + chartArea1.AxisY.Minimum = 0D; + chartArea1.BackColor = System.Drawing.Color.Transparent; + chartArea1.Name = "ChartArea1"; + this.chtTPS.ChartAreas.Add(chartArea1); + legend1.BackColor = System.Drawing.Color.Transparent; + legend1.Enabled = false; + legend1.Name = "Legend1"; + this.chtTPS.Legends.Add(legend1); + this.chtTPS.Location = new System.Drawing.Point(449, 110); + this.chtTPS.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.chtTPS.Name = "chtTPS"; + this.chtTPS.Palette = System.Windows.Forms.DataVisualization.Charting.ChartColorPalette.None; + series1.ChartArea = "ChartArea1"; + series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Area; + series1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(166))))); + series1.Legend = "Legend1"; + series1.MarkerBorderWidth = 3; + series1.Name = "TPS"; + series1.Points.Add(dataPoint1); + this.chtTPS.Series.Add(series1); + this.chtTPS.Size = new System.Drawing.Size(464, 330); + this.chtTPS.TabIndex = 33; + this.chtTPS.Text = "chart1"; + // + // statusStrip1 + // + this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); + this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripStatusLabel1, + this.lblTime, + this.toolStripStatusLabel3, + this.lblThreads}); + this.statusStrip1.Location = new System.Drawing.Point(0, 796); + this.statusStrip1.Name = "statusStrip1"; + this.statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 19, 0); + this.statusStrip1.Size = new System.Drawing.Size(1087, 25); + this.statusStrip1.TabIndex = 35; + this.statusStrip1.Text = "statusStrip1"; + // + // toolStripStatusLabel1 + // + this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; + this.toolStripStatusLabel1.Size = new System.Drawing.Size(101, 20); + this.toolStripStatusLabel1.Text = "Elapsed Time:"; + // + // lblTime + // + this.lblTime.Name = "lblTime"; + this.lblTime.Size = new System.Drawing.Size(17, 20); + this.lblTime.Text = "0"; + // + // toolStripStatusLabel3 + // + this.toolStripStatusLabel3.Name = "toolStripStatusLabel3"; + this.toolStripStatusLabel3.Size = new System.Drawing.Size(122, 20); + this.toolStripStatusLabel3.Text = "Running Threads:"; + // + // lblThreads + // + this.lblThreads.Name = "lblThreads"; + this.lblThreads.Size = new System.Drawing.Size(17, 20); + this.lblThreads.Text = "0"; + // + // splitContainer1 + // + this.splitContainer1.BackColor = System.Drawing.Color.Transparent; + this.splitContainer1.Location = new System.Drawing.Point(0, 31); + this.splitContainer1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + 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.label4); + this.splitContainer1.Panel1.Controls.Add(this.speedDialPanel); + this.splitContainer1.Panel1.Controls.Add(this.label2); + this.splitContainer1.Panel1.Controls.Add(this.label1); + this.splitContainer1.Panel1.Controls.Add(this.btnToggle); + this.splitContainer1.Panel1.Controls.Add(this.chtTPS); + 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.chtLatches); + this.splitContainer1.Panel2.Controls.Add(this.chtCPU); + this.splitContainer1.Size = new System.Drawing.Size(1048, 806); + this.splitContainer1.SplitterDistance = 490; + this.splitContainer1.SplitterWidth = 5; + this.splitContainer1.TabIndex = 39; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label4.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.label4.Location = new System.Drawing.Point(156, 400); + this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(158, 17); + this.label4.TabIndex = 45; + this.label4.Text = "Transactions/sec x1000"; + // + // speedDialPanel + // + this.speedDialPanel.Location = new System.Drawing.Point(28, 106); + this.speedDialPanel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.speedDialPanel.Name = "speedDialPanel"; + this.speedDialPanel.Size = new System.Drawing.Size(425, 320); + this.speedDialPanel.TabIndex = 43; + // + // 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))); + this.label2.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.label2.Location = new System.Drawing.Point(472, 85); + this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(148, 20); + this.label2.TabIndex = 42; + this.label2.Text = "Transactions / sec"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.label1.Location = new System.Drawing.Point(27, 84); + this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(310, 20); + this.label1.TabIndex = 41; + this.label1.Text = "Increase in performance since last reset"; + // + // 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))); + this.btnToggle.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnToggle.Location = new System.Drawing.Point(24, 446); + this.btnToggle.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btnToggle.Name = "btnToggle"; + this.btnToggle.Size = new System.Drawing.Size(199, 37); + this.btnToggle.TabIndex = 39; + this.btnToggle.Text = "Show diagnostics "; + this.btnToggle.UseVisualStyleBackColor = false; + this.btnToggle.Click += new System.EventHandler(this.btnToggle_Click); + // + // chtLatches + // + chartArea2.AxisX.Enabled = System.Windows.Forms.DataVisualization.Charting.AxisEnabled.False; + chartArea2.AxisX.LabelStyle.Enabled = false; + chartArea2.AxisX.LineColor = System.Drawing.Color.White; + chartArea2.AxisX.LineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.NotSet; + chartArea2.AxisX.LineWidth = 0; + chartArea2.AxisX.MajorGrid.Enabled = false; + chartArea2.AxisX.MajorTickMark.Enabled = false; + chartArea2.AxisY.LineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.NotSet; + chartArea2.AxisY.MajorGrid.Enabled = false; + chartArea2.AxisY.MajorTickMark.Enabled = false; + chartArea2.AxisY.Maximum = 170000D; + chartArea2.AxisY.Minimum = 0D; + chartArea2.AxisY.Title = "Current latches / sec"; + chartArea2.AxisY.TitleFont = new System.Drawing.Font("Microsoft Sans Serif", 10F); + chartArea2.AxisY.TitleForeColor = System.Drawing.SystemColors.ControlDarkDark; + chartArea2.BorderWidth = 0; + chartArea2.Name = "ChartArea1"; + this.chtLatches.ChartAreas.Add(chartArea2); + this.chtLatches.Location = new System.Drawing.Point(0, 148); + this.chtLatches.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.chtLatches.Name = "chtLatches"; + series2.ChartArea = "ChartArea1"; + series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Bar; + series2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(73)))), ((int)(((byte)(0))))); + series2.Name = "Latches"; + series2.Points.Add(dataPoint2); + this.chtLatches.Series.Add(series2); + this.chtLatches.Size = new System.Drawing.Size(913, 103); + this.chtLatches.TabIndex = 42; + this.chtLatches.Text = "chart1"; + // + // chtCPU + // + this.chtCPU.BackColor = System.Drawing.Color.Transparent; + chartArea3.AxisX.LabelStyle.Enabled = false; + chartArea3.AxisX.LineColor = System.Drawing.Color.White; + chartArea3.AxisX.MajorGrid.Enabled = false; + chartArea3.AxisX.MajorTickMark.Enabled = false; + chartArea3.AxisX.MaximumAutoSize = 10F; + chartArea3.AxisY.LineDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.NotSet; + chartArea3.AxisY.MajorGrid.Enabled = false; + chartArea3.AxisY.MajorTickMark.Enabled = false; + chartArea3.AxisY.Maximum = 100D; + chartArea3.AxisY.Minimum = 0D; + chartArea3.AxisY.Title = "Current % CPU Usage"; + chartArea3.AxisY.TitleForeColor = System.Drawing.SystemColors.ControlDarkDark; + chartArea3.BackColor = System.Drawing.Color.White; + chartArea3.BorderColor = System.Drawing.Color.White; + chartArea3.Name = "ChartArea1"; + chartArea3.Position.Auto = false; + chartArea3.Position.Height = 30F; + chartArea3.Position.Width = 77.49682F; + chartArea3.Position.X = 3F; + chartArea3.Position.Y = 1F; + this.chtCPU.ChartAreas.Add(chartArea3); + this.chtCPU.Dock = System.Windows.Forms.DockStyle.Fill; + this.chtCPU.Location = new System.Drawing.Point(0, 0); + this.chtCPU.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.chtCPU.Name = "chtCPU"; + this.chtCPU.Palette = System.Windows.Forms.DataVisualization.Charting.ChartColorPalette.None; + series3.ChartArea = "ChartArea1"; + series3.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Bar; + series3.Color = System.Drawing.Color.FromArgb(((int)(((byte)(140)))), ((int)(((byte)(198)))), ((int)(((byte)(0))))); + series3.Name = "CPUUsage"; + series3.Points.Add(dataPoint3); + this.chtCPU.Series.Add(series3); + this.chtCPU.Size = new System.Drawing.Size(1048, 311); + this.chtCPU.TabIndex = 41; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.BackColor = System.Drawing.Color.Transparent; + this.label3.Location = new System.Drawing.Point(1124, 49); + this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(112, 17); + this.label3.TabIndex = 11; + this.label3.Text = "Error Messages:"; + // + // FrmMain + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.ClientSize = new System.Drawing.Size(1087, 821); + this.Controls.Add(this.statusStrip1); + this.Controls.Add(this.splitContainer1); + this.Controls.Add(this.label3); + this.Controls.Add(this.ErrorMessages); + this.Controls.Add(this.menuStrip1); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MainMenuStrip = this.menuStrip1; + this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.Name = "FrmMain"; + this.Text = "Blue Yonder Ticket Reservation Simulator"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmMain_FormClosing); + this.Load += new System.EventHandler(this.FrmMain_Load); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.chtTPS)).EndInit(); + this.statusStrip1.ResumeLayout(false); + this.statusStrip1.PerformLayout(); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel1.PerformLayout(); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.chtLatches)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.chtCPU)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button btnRun; + private System.Windows.Forms.Button btnStop; + private System.Windows.Forms.Label lbResults; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem configurationToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; + private System.Windows.Forms.TextBox ErrorMessages; + private System.Windows.Forms.DataVisualization.Charting.Chart chtTPS; + private System.Windows.Forms.StatusStrip statusStrip1; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1; + private System.Windows.Forms.ToolStripStatusLabel lblTime; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel3; + private System.Windows.Forms.ToolStripStatusLabel lblThreads; + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.Button btnToggle; + private System.Windows.Forms.DataVisualization.Charting.Chart chtCPU; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.DataVisualization.Charting.Chart chtLatches; + private System.Windows.Forms.Panel speedDialPanel; + private System.Windows.Forms.Label label4; + } +} + diff --git a/Ticket Reservations/DemoWorkload/FrmMain.cs b/samples/in-memory/ticket-reservations/DemoWorkload/FrmMain.cs similarity index 100% rename from Ticket Reservations/DemoWorkload/FrmMain.cs rename to samples/in-memory/ticket-reservations/DemoWorkload/FrmMain.cs diff --git a/Ticket Reservations/DemoWorkload/FrmMain.resx b/samples/in-memory/ticket-reservations/DemoWorkload/FrmMain.resx similarity index 100% rename from Ticket Reservations/DemoWorkload/FrmMain.resx rename to samples/in-memory/ticket-reservations/DemoWorkload/FrmMain.resx diff --git a/Ticket Reservations/DemoWorkload/Program.cs b/samples/in-memory/ticket-reservations/DemoWorkload/Program.cs similarity index 100% rename from Ticket Reservations/DemoWorkload/Program.cs rename to samples/in-memory/ticket-reservations/DemoWorkload/Program.cs diff --git a/Ticket Reservations/DemoWorkload/Properties/AssemblyInfo.cs b/samples/in-memory/ticket-reservations/DemoWorkload/Properties/AssemblyInfo.cs similarity index 97% rename from Ticket Reservations/DemoWorkload/Properties/AssemblyInfo.cs rename to samples/in-memory/ticket-reservations/DemoWorkload/Properties/AssemblyInfo.cs index fc31df96..b7f7dbf0 100644 --- a/Ticket Reservations/DemoWorkload/Properties/AssemblyInfo.cs +++ b/samples/in-memory/ticket-reservations/DemoWorkload/Properties/AssemblyInfo.cs @@ -1,39 +1,39 @@ -using System.Resources; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 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")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("DemoWorkload")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2016")] -[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 -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("b5dbed29-db11-442b-bd31-d0e6e97feff7")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// 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")] -[assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: NeutralResourcesLanguage("en-US")] - +using System.Resources; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 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")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("DemoWorkload")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2016")] +[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 +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("b5dbed29-db11-442b-bd31-d0e6e97feff7")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// 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")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: NeutralResourcesLanguage("en-US")] + diff --git a/Ticket Reservations/DemoWorkload/Properties/Resources.Designer.cs b/samples/in-memory/ticket-reservations/DemoWorkload/Properties/Resources.Designer.cs similarity index 100% rename from Ticket Reservations/DemoWorkload/Properties/Resources.Designer.cs rename to samples/in-memory/ticket-reservations/DemoWorkload/Properties/Resources.Designer.cs diff --git a/Ticket Reservations/DemoWorkload/Properties/Resources.resx b/samples/in-memory/ticket-reservations/DemoWorkload/Properties/Resources.resx similarity index 100% rename from Ticket Reservations/DemoWorkload/Properties/Resources.resx rename to samples/in-memory/ticket-reservations/DemoWorkload/Properties/Resources.resx diff --git a/Ticket Reservations/DemoWorkload/Properties/Settings.Designer.cs b/samples/in-memory/ticket-reservations/DemoWorkload/Properties/Settings.Designer.cs similarity index 100% rename from Ticket Reservations/DemoWorkload/Properties/Settings.Designer.cs rename to samples/in-memory/ticket-reservations/DemoWorkload/Properties/Settings.Designer.cs diff --git a/Ticket Reservations/DemoWorkload/Properties/Settings.settings b/samples/in-memory/ticket-reservations/DemoWorkload/Properties/Settings.settings similarity index 100% rename from Ticket Reservations/DemoWorkload/Properties/Settings.settings rename to samples/in-memory/ticket-reservations/DemoWorkload/Properties/Settings.settings diff --git a/Ticket Reservations/DemoWorkload/Resources/SQLBackground.jpg b/samples/in-memory/ticket-reservations/DemoWorkload/Resources/SQLBackground.jpg similarity index 100% rename from Ticket Reservations/DemoWorkload/Resources/SQLBackground.jpg rename to samples/in-memory/ticket-reservations/DemoWorkload/Resources/SQLBackground.jpg diff --git a/Ticket Reservations/DemoWorkload/Resources/sqlserver.ico b/samples/in-memory/ticket-reservations/DemoWorkload/Resources/sqlserver.ico similarity index 100% rename from Ticket Reservations/DemoWorkload/Resources/sqlserver.ico rename to samples/in-memory/ticket-reservations/DemoWorkload/Resources/sqlserver.ico diff --git a/Ticket Reservations/DemoWorkload/UIControls.cs b/samples/in-memory/ticket-reservations/DemoWorkload/UIControls.cs similarity index 100% rename from Ticket Reservations/DemoWorkload/UIControls.cs rename to samples/in-memory/ticket-reservations/DemoWorkload/UIControls.cs diff --git a/Ticket Reservations/DemoWorkload/packages.config b/samples/in-memory/ticket-reservations/DemoWorkload/packages.config similarity index 100% rename from Ticket Reservations/DemoWorkload/packages.config rename to samples/in-memory/ticket-reservations/DemoWorkload/packages.config diff --git a/Ticket Reservations/InMemoryOLTPDemo.sln b/samples/in-memory/ticket-reservations/InMemoryOLTPDemo.sln similarity index 100% rename from Ticket Reservations/InMemoryOLTPDemo.sln rename to samples/in-memory/ticket-reservations/InMemoryOLTPDemo.sln diff --git a/Ticket Reservations/README.md b/samples/in-memory/ticket-reservations/README.md similarity index 100% rename from Ticket Reservations/README.md rename to samples/in-memory/ticket-reservations/README.md diff --git a/Ticket Reservations/Screenshots/1.png b/samples/in-memory/ticket-reservations/Screenshots/1.png similarity index 100% rename from Ticket Reservations/Screenshots/1.png rename to samples/in-memory/ticket-reservations/Screenshots/1.png diff --git a/Ticket Reservations/TicketReservations/TicketReservations.sqlproj b/samples/in-memory/ticket-reservations/TicketReservations/TicketReservations.sqlproj similarity index 98% rename from Ticket Reservations/TicketReservations/TicketReservations.sqlproj rename to samples/in-memory/ticket-reservations/TicketReservations/TicketReservations.sqlproj index 111b4490..3628bb33 100644 --- a/Ticket Reservations/TicketReservations/TicketReservations.sqlproj +++ b/samples/in-memory/ticket-reservations/TicketReservations/TicketReservations.sqlproj @@ -1,76 +1,76 @@ - - - - - Debug - AnyCPU - TicketReservations - 2.0 - 4.1 - {38641248-77ea-479b-b496-3eda463acead} - Microsoft.Data.Tools.Schema.Sql.Sql130DatabaseSchemaProvider - Database - - - TicketReservations - TicketReservations - 1033,CI - BySchemaAndSchemaType - True - v4.5 - CS - Properties - False - True - True - SQL_Latin1_General_CP1_CI_AS - PRIMARY - True - - - bin\Release\ - $(MSBuildProjectName).sql - False - pdbonly - true - false - true - prompt - 4 - - - bin\Debug\ - $(MSBuildProjectName).sql - false - true - full - false - true - true - prompt - 4 - - - 11.0 - - True - 11.0 - - - - - - - - - - - - - - - - - - + + + + + Debug + AnyCPU + TicketReservations + 2.0 + 4.1 + {38641248-77ea-479b-b496-3eda463acead} + Microsoft.Data.Tools.Schema.Sql.Sql130DatabaseSchemaProvider + Database + + + TicketReservations + TicketReservations + 1033,CI + BySchemaAndSchemaType + True + v4.5 + CS + Properties + False + True + True + SQL_Latin1_General_CP1_CI_AS + PRIMARY + True + + + bin\Release\ + $(MSBuildProjectName).sql + False + pdbonly + true + false + true + prompt + 4 + + + bin\Debug\ + $(MSBuildProjectName).sql + false + true + full + false + true + true + prompt + 4 + + + 11.0 + + True + 11.0 + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Ticket Reservations/TicketReservations/dbo/Sequences/TicketReservationSequence.sql b/samples/in-memory/ticket-reservations/TicketReservations/dbo/Sequences/TicketReservationSequence.sql similarity index 100% rename from Ticket Reservations/TicketReservations/dbo/Sequences/TicketReservationSequence.sql rename to samples/in-memory/ticket-reservations/TicketReservations/dbo/Sequences/TicketReservationSequence.sql diff --git a/Ticket Reservations/TicketReservations/dbo/Stored Procedures/BatchInsertReservations.sql b/samples/in-memory/ticket-reservations/TicketReservations/dbo/Stored Procedures/BatchInsertReservations.sql similarity index 96% rename from Ticket Reservations/TicketReservations/dbo/Stored Procedures/BatchInsertReservations.sql rename to samples/in-memory/ticket-reservations/TicketReservations/dbo/Stored Procedures/BatchInsertReservations.sql index d9e25821..66f481c1 100644 --- a/Ticket Reservations/TicketReservations/dbo/Stored Procedures/BatchInsertReservations.sql +++ b/samples/in-memory/ticket-reservations/TicketReservations/dbo/Stored Procedures/BatchInsertReservations.sql @@ -1,28 +1,28 @@ --- helper stored procedure to - -CREATE PROCEDURE BatchInsertReservations(@ServerTransactions int, @RowsPerTransaction int, @ThreadID int) -AS -BEGIN - DECLARE @tranCount int = 0; - DECLARE @TS Datetime2; - DECLARE @Char_TS NVARCHAR(23); - DECLARE @CurrentSeq int = 0; - - SET @TS = SYSDATETIME(); - SET @Char_TS = CAST(@TS AS NVARCHAR(23)); - WHILE (@tranCount < @ServerTransactions) - BEGIN - BEGIN TRY - BEGIN TRAN - SET @CurrentSeq = NEXT VALUE FOR TicketReservationSequence ; - EXEC InsertReservationDetails @CurrentSeq, @RowsPerTransaction, @Char_TS, @ThreadID; - COMMIT TRAN - END TRY - BEGIN CATCH - IF XACT_STATE() = -1 - ROLLBACK TRAN - ;THROW - END CATCH - SET @tranCount += 1; - END -END +-- helper stored procedure to + +CREATE PROCEDURE BatchInsertReservations(@ServerTransactions int, @RowsPerTransaction int, @ThreadID int) +AS +BEGIN + DECLARE @tranCount int = 0; + DECLARE @TS Datetime2; + DECLARE @Char_TS NVARCHAR(23); + DECLARE @CurrentSeq int = 0; + + SET @TS = SYSDATETIME(); + SET @Char_TS = CAST(@TS AS NVARCHAR(23)); + WHILE (@tranCount < @ServerTransactions) + BEGIN + BEGIN TRY + BEGIN TRAN + SET @CurrentSeq = NEXT VALUE FOR TicketReservationSequence ; + EXEC InsertReservationDetails @CurrentSeq, @RowsPerTransaction, @Char_TS, @ThreadID; + COMMIT TRAN + END TRY + BEGIN CATCH + IF XACT_STATE() = -1 + ROLLBACK TRAN + ;THROW + END CATCH + SET @tranCount += 1; + END +END diff --git a/Ticket Reservations/TicketReservations/dbo/Stored Procedures/Demo_Reset.sql b/samples/in-memory/ticket-reservations/TicketReservations/dbo/Stored Procedures/Demo_Reset.sql similarity index 100% rename from Ticket Reservations/TicketReservations/dbo/Stored Procedures/Demo_Reset.sql rename to samples/in-memory/ticket-reservations/TicketReservations/dbo/Stored Procedures/Demo_Reset.sql diff --git a/Ticket Reservations/TicketReservations/dbo/Stored Procedures/InsertReservationDetails.sql b/samples/in-memory/ticket-reservations/TicketReservations/dbo/Stored Procedures/InsertReservationDetails.sql similarity index 97% rename from Ticket Reservations/TicketReservations/dbo/Stored Procedures/InsertReservationDetails.sql rename to samples/in-memory/ticket-reservations/TicketReservations/dbo/Stored Procedures/InsertReservationDetails.sql index 0af9a5b1..71139dbe 100644 --- a/Ticket Reservations/TicketReservations/dbo/Stored Procedures/InsertReservationDetails.sql +++ b/samples/in-memory/ticket-reservations/TicketReservations/dbo/Stored Procedures/InsertReservationDetails.sql @@ -1,30 +1,30 @@ - -CREATE PROCEDURE InsertReservationDetails(@TicketReservationID int, @LineCount int, @Comment NVARCHAR(1000), @FlightID int) -AS -BEGIN - DECLARE @loop int = 0; - WHILE (@loop < @LineCount) - BEGIN - INSERT INTO dbo.TicketReservationDetail (TicketReservationID, Quantity, FlightID, Comment) - VALUES(@TicketReservationID, @loop % 8 + 1, @FlightID, @Comment); - SET @loop += 1; - END -END - - -/* --- natively compiled version of the stored procedure: -CREATE PROCEDURE InsertReservationDetails(@TicketReservationID int, @LineCount int, @Comment NVARCHAR(1000), @FlightID int) -WITH NATIVE_COMPILATION, SCHEMABINDING -as -BEGIN ATOMIC WITH (TRANSACTION ISOLATION LEVEL=SNAPSHOT, LANGUAGE=N'English') - - - DECLARE @loop int = 0; - while (@loop < @LineCount) - BEGIN - INSERT INTO dbo.TicketReservationDetail (TicketReservationID, Quantity, FlightID, Comment) VALUES(@TicketReservationID, @loop % 8 + 1, @FlightID, @Comment); - SET @loop += 1; - END -END + +CREATE PROCEDURE InsertReservationDetails(@TicketReservationID int, @LineCount int, @Comment NVARCHAR(1000), @FlightID int) +AS +BEGIN + DECLARE @loop int = 0; + WHILE (@loop < @LineCount) + BEGIN + INSERT INTO dbo.TicketReservationDetail (TicketReservationID, Quantity, FlightID, Comment) + VALUES(@TicketReservationID, @loop % 8 + 1, @FlightID, @Comment); + SET @loop += 1; + END +END + + +/* +-- natively compiled version of the stored procedure: +CREATE PROCEDURE InsertReservationDetails(@TicketReservationID int, @LineCount int, @Comment NVARCHAR(1000), @FlightID int) +WITH NATIVE_COMPILATION, SCHEMABINDING +as +BEGIN ATOMIC WITH (TRANSACTION ISOLATION LEVEL=SNAPSHOT, LANGUAGE=N'English') + + + DECLARE @loop int = 0; + while (@loop < @LineCount) + BEGIN + INSERT INTO dbo.TicketReservationDetail (TicketReservationID, Quantity, FlightID, Comment) VALUES(@TicketReservationID, @loop % 8 + 1, @FlightID, @Comment); + SET @loop += 1; + END +END */ \ No newline at end of file diff --git a/Ticket Reservations/TicketReservations/dbo/Stored Procedures/ReadMultipleReservations.sql b/samples/in-memory/ticket-reservations/TicketReservations/dbo/Stored Procedures/ReadMultipleReservations.sql similarity index 96% rename from Ticket Reservations/TicketReservations/dbo/Stored Procedures/ReadMultipleReservations.sql rename to samples/in-memory/ticket-reservations/TicketReservations/dbo/Stored Procedures/ReadMultipleReservations.sql index 20e8c127..c98ebeed 100644 --- a/Ticket Reservations/TicketReservations/dbo/Stored Procedures/ReadMultipleReservations.sql +++ b/samples/in-memory/ticket-reservations/TicketReservations/dbo/Stored Procedures/ReadMultipleReservations.sql @@ -1,28 +1,28 @@ -CREATE PROCEDURE ReadMultipleReservations(@ServerTransactions int, @RowsPerTransaction int, @ThreadID int) -AS -BEGIN - DECLARE @tranCount int = 0; - DECLARE @CurrentSeq int = 0; - DECLARE @Sum int = 0; - DECLARE @loop int = 0; - WHILE (@tranCount < @ServerTransactions) - BEGIN - BEGIN TRY - SELECT @CurrentSeq = RAND() * IDENT_CURRENT(N'dbo.TicketReservationDetail') - SET @loop = 0 - BEGIN TRAN - WHILE (@loop < @RowsPerTransaction) - BEGIN - SELECT @Sum += FlightID from dbo.TicketReservationDetail where TicketReservationDetailID = @CurrentSeq - @loop; - SET @loop += 1; - END - COMMIT TRAN - END TRY - BEGIN CATCH - IF XACT_STATE() = -1 - ROLLBACK TRAN - ;THROW - END CATCH - SET @tranCount += 1; - END -END +CREATE PROCEDURE ReadMultipleReservations(@ServerTransactions int, @RowsPerTransaction int, @ThreadID int) +AS +BEGIN + DECLARE @tranCount int = 0; + DECLARE @CurrentSeq int = 0; + DECLARE @Sum int = 0; + DECLARE @loop int = 0; + WHILE (@tranCount < @ServerTransactions) + BEGIN + BEGIN TRY + SELECT @CurrentSeq = RAND() * IDENT_CURRENT(N'dbo.TicketReservationDetail') + SET @loop = 0 + BEGIN TRAN + WHILE (@loop < @RowsPerTransaction) + BEGIN + SELECT @Sum += FlightID from dbo.TicketReservationDetail where TicketReservationDetailID = @CurrentSeq - @loop; + SET @loop += 1; + END + COMMIT TRAN + END TRY + BEGIN CATCH + IF XACT_STATE() = -1 + ROLLBACK TRAN + ;THROW + END CATCH + SET @tranCount += 1; + END +END diff --git a/Ticket Reservations/TicketReservations/dbo/Tables/TicketReservationDetail.sql b/samples/in-memory/ticket-reservations/TicketReservations/dbo/Tables/TicketReservationDetail.sql similarity index 97% rename from Ticket Reservations/TicketReservations/dbo/Tables/TicketReservationDetail.sql rename to samples/in-memory/ticket-reservations/TicketReservations/dbo/Tables/TicketReservationDetail.sql index 4b92a570..c706b546 100644 --- a/Ticket Reservations/TicketReservations/dbo/Tables/TicketReservationDetail.sql +++ b/samples/in-memory/ticket-reservations/TicketReservations/dbo/Tables/TicketReservationDetail.sql @@ -1,18 +1,18 @@ -CREATE TABLE [dbo].[TicketReservationDetail] ( - TicketReservationID BIGINT NOT NULL, - TicketReservationDetailID BIGINT IDENTITY NOT NULL, - Quantity INT NOT NULL, - FlightID INT NOT NULL, - Comment NVARCHAR (1000), --- disk-based table: - CONSTRAINT [PK_TicketReservationDetail] PRIMARY KEY CLUSTERED (TicketReservationDetailID) -); - --- for memory-optimized, replace the last two lines with the following: --- CONSTRAINT [PK_TicketReservationDetail] PRIMARY KEY NONCLUSTERED (TicketReservationDetailID) ---) WITH (MEMORY_OPTIMIZED=ON); ---GO - --- For SQL Server, include the following filegroup. For Azure DB, leave out the filegroup --- ALTER DATABASE [$(DatabaseName)] ADD FILEGROUP [mod] CONTAINS MEMORY_OPTIMIZED_DATA - +CREATE TABLE [dbo].[TicketReservationDetail] ( + TicketReservationID BIGINT NOT NULL, + TicketReservationDetailID BIGINT IDENTITY NOT NULL, + Quantity INT NOT NULL, + FlightID INT NOT NULL, + Comment NVARCHAR (1000), +-- disk-based table: + CONSTRAINT [PK_TicketReservationDetail] PRIMARY KEY CLUSTERED (TicketReservationDetailID) +); + +-- for memory-optimized, replace the last two lines with the following: +-- CONSTRAINT [PK_TicketReservationDetail] PRIMARY KEY NONCLUSTERED (TicketReservationDetailID) +--) WITH (MEMORY_OPTIMIZED=ON); +--GO + +-- For SQL Server, include the following filegroup. For Azure DB, leave out the filegroup +-- ALTER DATABASE [$(DatabaseName)] ADD FILEGROUP [mod] CONTAINS MEMORY_OPTIMIZED_DATA + From 8fd70a46b8ea9735a13e935f830040c58b7cbbfe Mon Sep 17 00:00:00 2001 From: barbkess Date: Thu, 24 Mar 2016 16:00:50 -0700 Subject: [PATCH 03/13] license --- README.md | 2 +- license.txt | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 license.txt diff --git a/README.md b/README.md index d1cdaa05..b0b156b6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# SQL-Server-Samples +# sql-server-samples Coming Soon... diff --git a/license.txt b/license.txt new file mode 100644 index 00000000..8184d71c --- /dev/null +++ b/license.txt @@ -0,0 +1,7 @@ +Copyright (c) Microsoft Corporation. Distributed under the following terms: + +1. Microsoft and any contributors to this project each grants you a license, under its respective copyrights, to the Microsoft SQL Server Sample Documentation under the [Creative Commons Attribution 3.0 United States License](http://creativecommons.org/licenses/by/3.0/us/legalcode). In addition, with respect to any sample code contained in the documentation, Microsoft and any such contributors grants you an additional license, under its respective intellectual property rights, to use the code to develop or design your software for Microsoft Azure. + +2. Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. This license does not grant you rights to use any names, logos, or trademarks. For Microsoft’s general trademark guidelines, go to [http://go.microsoft.com/fwlink/?LinkID=254653](http://go.microsoft.com/fwlink/?LinkID=254653). + +3. Microsoft and any contributors reserves all others rights, whether under copyrights, patents, or trademarks, or by implication, estoppel or otherwise. \ No newline at end of file From 2ae7ee23e3c0b17c0be6d69223dde36b8a72eacb Mon Sep 17 00:00:00 2001 From: barbkess Date: Thu, 24 Mar 2016 16:10:01 -0700 Subject: [PATCH 04/13] new folders --- samples/master-data-services/README.md | 56 ++++++++++++++++++++++++++ samples/r-services/README.md | 56 ++++++++++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 samples/master-data-services/README.md create mode 100644 samples/r-services/README.md diff --git a/samples/master-data-services/README.md b/samples/master-data-services/README.md new file mode 100644 index 00000000..9671dc6e --- /dev/null +++ b/samples/master-data-services/README.md @@ -0,0 +1,56 @@ +# Ticket Reservations Sample + +Ticket Reservations is a Windows Forms sample application built on .NET Framework 4.6 that demonstrates the performance benefits of using SQL Server memory optimized tables and native compiled stored procedures. You can compare the performance before and after enabling In-Memory OLTP by observing the transactions/sec as well as the current CPU Usage and latches/sec. + +![Alt text](Screenshots/1.png "Ticket Reservations") + +## Running this sample +1. Before you can run this sample, you must have the following perquisites: + - SQL Server 2016 CTP3 (or higher) + - Visual Studio 2015 (or higher) with the latest SSDT installed. + +2. Clone this repository using Git for Windows (http://www.git-scm.com/), or download the zip file. + +3. From Visual Studio, open the **InMemoryOLTPDemo.sln** file from the root directory. + +4. In Visual Studio Build menu, select **Build Solution** (or Press F6). + +5. In the **App.config** file, located in the project root, find the **TicketReservations** app setting and edit the connectionString if needed. Currently it is configured to connect to the local default SQL Server Instance using Integrated Security. + +6. Publish the TicketReservations Database + - Right click on the TicketReservations SQL Server Database Project and Select **Publish** + - Click Edit... to choose your connection string + - Click Publish + - Note: For publishing to Azure SQL you need to change the DB project target platform to **Microsoft Azure SQL Database V12** + +7. You can now run and debug the application locally by pressing **F5** in Visual Studio. + +8. Start the workload with the **Start** button, and run for a while to show perf profile. Then press stop to stop the workload. + +9. In the database project, + - Change TicketReservations.sql to a memory-optimized table (instructions commented in the file itself) + - Change InsertTicketReservations.sql to natively compiled (instructions in the same file) + +10. Publish the database project to the same database – the tool will take care of making the necessary changes. + Note that, as part of publication, the data is copied from the old disk-based table to the new memory-optimized table, so the longer you run the initial workload, the longer this publication takes. + +11. Go back to the app and run the workload again. No need to recompile or restart the application. + +The perf gains from In-Memory OLTP as shown by the load generation app depend on two factors: +- Hardware + - more cores => higher perf gain + - slower log IO => lower perf gain +- Configuration settings in the load generator + - more rows per transaction => higher perf gain + - more reads per write => lower perf gain + - default setting is 10 rows per transaction and 1 read per write + +With default settings on one machine with 24 logical cores and relatively slow SSD for the log the app shows around performance 40X gain, and in this case the bottleneck was log IO. + + +## About the code +The code included in this sample is not intended to be a set of best practices on how to build scalable enterprise grade web applications. This is beyond the scope of this quick start sample. + +## More information +- [In-Memory OLTP (In-Memory Optimization)] (https://msdn.microsoft.com/en-us/library/dn133186.aspx) +- [OLTP and database management] (https://www.microsoft.com/en-us/server-cloud/solutions/oltp-database-management.aspx) diff --git a/samples/r-services/README.md b/samples/r-services/README.md new file mode 100644 index 00000000..9671dc6e --- /dev/null +++ b/samples/r-services/README.md @@ -0,0 +1,56 @@ +# Ticket Reservations Sample + +Ticket Reservations is a Windows Forms sample application built on .NET Framework 4.6 that demonstrates the performance benefits of using SQL Server memory optimized tables and native compiled stored procedures. You can compare the performance before and after enabling In-Memory OLTP by observing the transactions/sec as well as the current CPU Usage and latches/sec. + +![Alt text](Screenshots/1.png "Ticket Reservations") + +## Running this sample +1. Before you can run this sample, you must have the following perquisites: + - SQL Server 2016 CTP3 (or higher) + - Visual Studio 2015 (or higher) with the latest SSDT installed. + +2. Clone this repository using Git for Windows (http://www.git-scm.com/), or download the zip file. + +3. From Visual Studio, open the **InMemoryOLTPDemo.sln** file from the root directory. + +4. In Visual Studio Build menu, select **Build Solution** (or Press F6). + +5. In the **App.config** file, located in the project root, find the **TicketReservations** app setting and edit the connectionString if needed. Currently it is configured to connect to the local default SQL Server Instance using Integrated Security. + +6. Publish the TicketReservations Database + - Right click on the TicketReservations SQL Server Database Project and Select **Publish** + - Click Edit... to choose your connection string + - Click Publish + - Note: For publishing to Azure SQL you need to change the DB project target platform to **Microsoft Azure SQL Database V12** + +7. You can now run and debug the application locally by pressing **F5** in Visual Studio. + +8. Start the workload with the **Start** button, and run for a while to show perf profile. Then press stop to stop the workload. + +9. In the database project, + - Change TicketReservations.sql to a memory-optimized table (instructions commented in the file itself) + - Change InsertTicketReservations.sql to natively compiled (instructions in the same file) + +10. Publish the database project to the same database – the tool will take care of making the necessary changes. + Note that, as part of publication, the data is copied from the old disk-based table to the new memory-optimized table, so the longer you run the initial workload, the longer this publication takes. + +11. Go back to the app and run the workload again. No need to recompile or restart the application. + +The perf gains from In-Memory OLTP as shown by the load generation app depend on two factors: +- Hardware + - more cores => higher perf gain + - slower log IO => lower perf gain +- Configuration settings in the load generator + - more rows per transaction => higher perf gain + - more reads per write => lower perf gain + - default setting is 10 rows per transaction and 1 read per write + +With default settings on one machine with 24 logical cores and relatively slow SSD for the log the app shows around performance 40X gain, and in this case the bottleneck was log IO. + + +## About the code +The code included in this sample is not intended to be a set of best practices on how to build scalable enterprise grade web applications. This is beyond the scope of this quick start sample. + +## More information +- [In-Memory OLTP (In-Memory Optimization)] (https://msdn.microsoft.com/en-us/library/dn133186.aspx) +- [OLTP and database management] (https://www.microsoft.com/en-us/server-cloud/solutions/oltp-database-management.aspx) From bcf97740845737afdc1f4af11efd3e734e56cb3d Mon Sep 17 00:00:00 2001 From: barbkess Date: Thu, 24 Mar 2016 16:36:59 -0700 Subject: [PATCH 05/13] Add SQL Server --- license.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/license.txt b/license.txt index 8184d71c..700c2116 100644 --- a/license.txt +++ b/license.txt @@ -2,6 +2,6 @@ Copyright (c) Microsoft Corporation. Distributed under the following terms: 1. Microsoft and any contributors to this project each grants you a license, under its respective copyrights, to the Microsoft SQL Server Sample Documentation under the [Creative Commons Attribution 3.0 United States License](http://creativecommons.org/licenses/by/3.0/us/legalcode). In addition, with respect to any sample code contained in the documentation, Microsoft and any such contributors grants you an additional license, under its respective intellectual property rights, to use the code to develop or design your software for Microsoft Azure. -2. Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. This license does not grant you rights to use any names, logos, or trademarks. For Microsoft’s general trademark guidelines, go to [http://go.microsoft.com/fwlink/?LinkID=254653](http://go.microsoft.com/fwlink/?LinkID=254653). +2. Microsoft, Windows, Microsoft SQL Server, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. This license does not grant you rights to use any names, logos, or trademarks. For Microsoft’s general trademark guidelines, go to [http://go.microsoft.com/fwlink/?LinkID=254653](http://go.microsoft.com/fwlink/?LinkID=254653). 3. Microsoft and any contributors reserves all others rights, whether under copyrights, patents, or trademarks, or by implication, estoppel or otherwise. \ No newline at end of file From 7c92bb2e8b0a4be887e22d6ad4e0965d9c0a6af4 Mon Sep 17 00:00:00 2001 From: barbkess Date: Thu, 24 Mar 2016 16:40:14 -0700 Subject: [PATCH 06/13] add SQL Server --- license.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/license.txt b/license.txt index 700c2116..88bdce42 100644 --- a/license.txt +++ b/license.txt @@ -1,6 +1,6 @@ Copyright (c) Microsoft Corporation. Distributed under the following terms: -1. Microsoft and any contributors to this project each grants you a license, under its respective copyrights, to the Microsoft SQL Server Sample Documentation under the [Creative Commons Attribution 3.0 United States License](http://creativecommons.org/licenses/by/3.0/us/legalcode). In addition, with respect to any sample code contained in the documentation, Microsoft and any such contributors grants you an additional license, under its respective intellectual property rights, to use the code to develop or design your software for Microsoft Azure. +1. Microsoft and any contributors to this project each grants you a license, under its respective copyrights, to the Microsoft SQL Server Sample Documentation under the [Creative Commons Attribution 3.0 United States License](http://creativecommons.org/licenses/by/3.0/us/legalcode). In addition, with respect to any sample code contained in the documentation, Microsoft and any such contributors grants you an additional license, under its respective intellectual property rights, to use the code to develop or design your software for Microsoft SQL Server and Microsoft Azure. 2. Microsoft, Windows, Microsoft SQL Server, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. This license does not grant you rights to use any names, logos, or trademarks. For Microsoft’s general trademark guidelines, go to [http://go.microsoft.com/fwlink/?LinkID=254653](http://go.microsoft.com/fwlink/?LinkID=254653). From 8a7cd2057475f17cb753c5ba8ba966ec94623b83 Mon Sep 17 00:00:00 2001 From: Perry Skountrianos Date: Fri, 25 Mar 2016 09:32:42 -0700 Subject: [PATCH 07/13] SQL Server main README --- README.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b0b156b6..5c113527 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,18 @@ -# sql-server-samples +# SQL Server Code Samples +This GitHub repository contains a set of SQL Server code samples that demonstrate the usage of various SQL Server features. Refer to the README.md file in each sub-directory for details on using each sample. -Coming Soon... +## Sample Categories +**In-memory** + - Ticket Reservations: Windows Forms sample application built on .NET Framework 4.6 that demonstrates the performance benefits of using SQL Server memory optimized tables and native compiled stored procedures. You can compare the performance before and after enabling In-Memory OLTP by observing the transactions/sec as well as the current CPU Usage and latches/sec. + +**Master Data Services** + - Samples coming soon + +**R Services** + - Samples coming soon + +## License +These samples and templates are all licensed under MIT. + +## Questions +Email questions at: sqlserversamples@micrososft.com From 3caf055cf3a15b19e241a80cc60b149d600a9325 Mon Sep 17 00:00:00 2001 From: barbkess Date: Fri, 25 Mar 2016 10:16:32 -0700 Subject: [PATCH 08/13] readme additions --- README.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5c113527..7e8ee9aa 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # SQL Server Code Samples -This GitHub repository contains a set of SQL Server code samples that demonstrate the usage of various SQL Server features. Refer to the README.md file in each sub-directory for details on using each sample. +This GitHub repository contains code samples that demonstrate how to use SQL Server features. Each sample includes a README file that explains how to run and use the sample. + ## Sample Categories **In-memory** @@ -11,8 +12,20 @@ This GitHub repository contains a set of SQL Server code samples that demonstrat **R Services** - Samples coming soon + +## Adding Samples +To add a sample create a subdirectory under ./samples. Start the sample name with the SQL Server feature you are showcasing. Use all lower case and separate the words with hyphens (e.g., in-memory-ticket-reservations). + +Include a README.txt file at the root of the sample that explains how to run the sample. Use the README_samples_template.txt as your template. + + +## Working in GitHub +To work in GitHub, go to https://github.com/microsoft/sql-server-samples and fork the repository. Work in your own fork and when you are ready to submit to make a change or publish your sample for the first time, submit a pull request into the master branch of sql-server-samples. One of the approvers will review your request and accept or reject the pull request. + + ## License -These samples and templates are all licensed under MIT. +These samples and templates are all licensed under the MIT license. See the license.txt file in the root. + ## Questions -Email questions at: sqlserversamples@micrososft.com +Email questions to: sqlserversamples@micrososft.com. From 3b7b1d9f380730f99f1b818fbcd4c36c4536d8ee Mon Sep 17 00:00:00 2001 From: barbkess Date: Fri, 25 Mar 2016 10:21:39 -0700 Subject: [PATCH 09/13] template --- README.md | 2 +- README_samples_template.md | 56 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 README_samples_template.md diff --git a/README.md b/README.md index 7e8ee9aa..e461d8de 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ This GitHub repository contains code samples that demonstrate how to use SQL Ser ## Adding Samples To add a sample create a subdirectory under ./samples. Start the sample name with the SQL Server feature you are showcasing. Use all lower case and separate the words with hyphens (e.g., in-memory-ticket-reservations). -Include a README.txt file at the root of the sample that explains how to run the sample. Use the README_samples_template.txt as your template. +Include a README.md file at the root of the sample that explains how to run the sample. Use the README_samples_template.md as your template. ## Working in GitHub diff --git a/README_samples_template.md b/README_samples_template.md new file mode 100644 index 00000000..9671dc6e --- /dev/null +++ b/README_samples_template.md @@ -0,0 +1,56 @@ +# Ticket Reservations Sample + +Ticket Reservations is a Windows Forms sample application built on .NET Framework 4.6 that demonstrates the performance benefits of using SQL Server memory optimized tables and native compiled stored procedures. You can compare the performance before and after enabling In-Memory OLTP by observing the transactions/sec as well as the current CPU Usage and latches/sec. + +![Alt text](Screenshots/1.png "Ticket Reservations") + +## Running this sample +1. Before you can run this sample, you must have the following perquisites: + - SQL Server 2016 CTP3 (or higher) + - Visual Studio 2015 (or higher) with the latest SSDT installed. + +2. Clone this repository using Git for Windows (http://www.git-scm.com/), or download the zip file. + +3. From Visual Studio, open the **InMemoryOLTPDemo.sln** file from the root directory. + +4. In Visual Studio Build menu, select **Build Solution** (or Press F6). + +5. In the **App.config** file, located in the project root, find the **TicketReservations** app setting and edit the connectionString if needed. Currently it is configured to connect to the local default SQL Server Instance using Integrated Security. + +6. Publish the TicketReservations Database + - Right click on the TicketReservations SQL Server Database Project and Select **Publish** + - Click Edit... to choose your connection string + - Click Publish + - Note: For publishing to Azure SQL you need to change the DB project target platform to **Microsoft Azure SQL Database V12** + +7. You can now run and debug the application locally by pressing **F5** in Visual Studio. + +8. Start the workload with the **Start** button, and run for a while to show perf profile. Then press stop to stop the workload. + +9. In the database project, + - Change TicketReservations.sql to a memory-optimized table (instructions commented in the file itself) + - Change InsertTicketReservations.sql to natively compiled (instructions in the same file) + +10. Publish the database project to the same database – the tool will take care of making the necessary changes. + Note that, as part of publication, the data is copied from the old disk-based table to the new memory-optimized table, so the longer you run the initial workload, the longer this publication takes. + +11. Go back to the app and run the workload again. No need to recompile or restart the application. + +The perf gains from In-Memory OLTP as shown by the load generation app depend on two factors: +- Hardware + - more cores => higher perf gain + - slower log IO => lower perf gain +- Configuration settings in the load generator + - more rows per transaction => higher perf gain + - more reads per write => lower perf gain + - default setting is 10 rows per transaction and 1 read per write + +With default settings on one machine with 24 logical cores and relatively slow SSD for the log the app shows around performance 40X gain, and in this case the bottleneck was log IO. + + +## About the code +The code included in this sample is not intended to be a set of best practices on how to build scalable enterprise grade web applications. This is beyond the scope of this quick start sample. + +## More information +- [In-Memory OLTP (In-Memory Optimization)] (https://msdn.microsoft.com/en-us/library/dn133186.aspx) +- [OLTP and database management] (https://www.microsoft.com/en-us/server-cloud/solutions/oltp-database-management.aspx) From cf7739f64d2e44b6596c68103627417a802f7f79 Mon Sep 17 00:00:00 2001 From: Perry Skountrianos - MSFT Date: Fri, 25 Mar 2016 10:27:27 -0700 Subject: [PATCH 10/13] Update README.md --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e461d8de..ecfaf494 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,17 @@ This GitHub repository contains code samples that demonstrate how to use SQL Ser ## Sample Categories **In-memory** - - Ticket Reservations: Windows Forms sample application built on .NET Framework 4.6 that demonstrates the performance benefits of using SQL Server memory optimized tables and native compiled stored procedures. You can compare the performance before and after enabling In-Memory OLTP by observing the transactions/sec as well as the current CPU Usage and latches/sec. + +In-Memory OLTP can significantly improve OLTP database application performance. It is a memory-optimized database engine integrated into the SQL Server engine, optimized for OLTP. With In-Memory OLTP you can increase the transaction throughput by up to 30 times, depending on the specifics of the workload. The performance gains come from: + - For memory-optimized tables, the design of their structure is free of the physical limitations of hard drives that force design compromises. + - Core transaction processing is completely free of locks. + - Natively compiled modules execute Transact-SQL statements more efficiently. + +Read the following resources for mroe information. +- [In-Memory OLTP (In-Memory Optimization)] (https://msdn.microsoft.com/en-us/library/dn133186.aspx) +- [Quick Start 1: In-Memory OLTP Technologies for Faster Transact-SQL Performance] (https://msdn.microsoft.com/en-us/library/mt694156.aspx) +- [Get started with Columnstore for real time operational analytics] (https://msdn.microsoft.com/en-us/library/dn817827.aspx) +- [Columnstore Indexes Guide] (https://msdn.microsoft.com/en-us/library/gg492088.aspx) **Master Data Services** - Samples coming soon From 0eab92b6896d344ddc1a0667f64f7f406d591d78 Mon Sep 17 00:00:00 2001 From: Perry Skountrianos - MSFT Date: Fri, 25 Mar 2016 10:31:31 -0700 Subject: [PATCH 11/13] Update README.md --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ecfaf494..3e49e88d 100644 --- a/README.md +++ b/README.md @@ -17,11 +17,14 @@ Read the following resources for mroe information. - [Columnstore Indexes Guide] (https://msdn.microsoft.com/en-us/library/gg492088.aspx) **Master Data Services** - - Samples coming soon + +Master Data Services (MDS) is the SQL Server solution for master data management. Master data management (MDM) enables you organization to discover and define non-transactional lists of data, and compile maintainable, reliable master lists. This article briefly describe the MDS components and provides links to additional information. + +For information about the new features in SQL Server 2016, see [What's New in Master Data Services (MDS)] (https://msdn.microsoft.com/en-us/library/ff929136.aspx). **R Services** - - Samples coming soon +[SQL Server 2016 R Services] (http://blogs.microsoft.com/firehose/tag/sql-server-2016-r-services/) ## Adding Samples To add a sample create a subdirectory under ./samples. Start the sample name with the SQL Server feature you are showcasing. Use all lower case and separate the words with hyphens (e.g., in-memory-ticket-reservations). From 5aa4a06ad261ef92a099e00488f7eac22337399a Mon Sep 17 00:00:00 2001 From: Perry Skountrianos - MSFT Date: Fri, 25 Mar 2016 10:35:07 -0700 Subject: [PATCH 12/13] Update README_samples_template.md {minor} Fixing image link --- README_samples_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_samples_template.md b/README_samples_template.md index 9671dc6e..deee3483 100644 --- a/README_samples_template.md +++ b/README_samples_template.md @@ -2,7 +2,7 @@ Ticket Reservations is a Windows Forms sample application built on .NET Framework 4.6 that demonstrates the performance benefits of using SQL Server memory optimized tables and native compiled stored procedures. You can compare the performance before and after enabling In-Memory OLTP by observing the transactions/sec as well as the current CPU Usage and latches/sec. -![Alt text](Screenshots/1.png "Ticket Reservations") +![Alt text](samples/in-memory/ticket-reservations/Screenshots/1.png "Ticket Reservations") ## Running this sample 1. Before you can run this sample, you must have the following perquisites: From 67e523f61fb65203656cf125279e7e7314a248d2 Mon Sep 17 00:00:00 2001 From: Perry Skountrianos Date: Fri, 25 Mar 2016 10:53:00 -0700 Subject: [PATCH 13/13] Readme Files edits --- README.md | 35 +--------------- samples/in-memory/README.md | 12 ++++++ samples/master-data-services/README.md | 57 ++------------------------ samples/r-services/README.md | 57 +------------------------- 4 files changed, 18 insertions(+), 143 deletions(-) create mode 100644 samples/in-memory/README.md diff --git a/README.md b/README.md index 3e49e88d..1351c2d2 100644 --- a/README.md +++ b/README.md @@ -1,44 +1,11 @@ # SQL Server Code Samples This GitHub repository contains code samples that demonstrate how to use SQL Server features. Each sample includes a README file that explains how to run and use the sample. - -## Sample Categories -**In-memory** - -In-Memory OLTP can significantly improve OLTP database application performance. It is a memory-optimized database engine integrated into the SQL Server engine, optimized for OLTP. With In-Memory OLTP you can increase the transaction throughput by up to 30 times, depending on the specifics of the workload. The performance gains come from: - - For memory-optimized tables, the design of their structure is free of the physical limitations of hard drives that force design compromises. - - Core transaction processing is completely free of locks. - - Natively compiled modules execute Transact-SQL statements more efficiently. - -Read the following resources for mroe information. -- [In-Memory OLTP (In-Memory Optimization)] (https://msdn.microsoft.com/en-us/library/dn133186.aspx) -- [Quick Start 1: In-Memory OLTP Technologies for Faster Transact-SQL Performance] (https://msdn.microsoft.com/en-us/library/mt694156.aspx) -- [Get started with Columnstore for real time operational analytics] (https://msdn.microsoft.com/en-us/library/dn817827.aspx) -- [Columnstore Indexes Guide] (https://msdn.microsoft.com/en-us/library/gg492088.aspx) - -**Master Data Services** - -Master Data Services (MDS) is the SQL Server solution for master data management. Master data management (MDM) enables you organization to discover and define non-transactional lists of data, and compile maintainable, reliable master lists. This article briefly describe the MDS components and provides links to additional information. - -For information about the new features in SQL Server 2016, see [What's New in Master Data Services (MDS)] (https://msdn.microsoft.com/en-us/library/ff929136.aspx). - -**R Services** - -[SQL Server 2016 R Services] (http://blogs.microsoft.com/firehose/tag/sql-server-2016-r-services/) - -## Adding Samples -To add a sample create a subdirectory under ./samples. Start the sample name with the SQL Server feature you are showcasing. Use all lower case and separate the words with hyphens (e.g., in-memory-ticket-reservations). - -Include a README.md file at the root of the sample that explains how to run the sample. Use the README_samples_template.md as your template. - - ## Working in GitHub -To work in GitHub, go to https://github.com/microsoft/sql-server-samples and fork the repository. Work in your own fork and when you are ready to submit to make a change or publish your sample for the first time, submit a pull request into the master branch of sql-server-samples. One of the approvers will review your request and accept or reject the pull request. - +To work in GitHub, go to https://github.com/microsoft/sql-server-samples and fork the repository. Work in your own fork and when you are ready to submit to make a change or publish your sample for the first time, submit a pull request into the master branch of sql-server-samples. One of the approvers will review your request and accept or reject the pull request. ## License These samples and templates are all licensed under the MIT license. See the license.txt file in the root. - ## Questions Email questions to: sqlserversamples@micrososft.com. diff --git a/samples/in-memory/README.md b/samples/in-memory/README.md new file mode 100644 index 00000000..5757615f --- /dev/null +++ b/samples/in-memory/README.md @@ -0,0 +1,12 @@ +# SQL Server In-memory + +In-Memory OLTP can significantly improve OLTP database application performance. It is a memory-optimized database engine integrated into the SQL Server engine, optimized for OLTP. With In-Memory OLTP you can increase the transaction throughput by up to 30 times, depending on the specifics of the workload. The performance gains come from: + - For memory-optimized tables, the design of their structure is free of the physical limitations of hard drives that force design compromises. + - Core transaction processing is completely free of locks. + - Natively compiled modules execute Transact-SQL statements more efficiently. + +Read the following resources for mroe information. +- [In-Memory OLTP (In-Memory Optimization)] (https://msdn.microsoft.com/en-us/library/dn133186.aspx) +- [Quick Start 1: In-Memory OLTP Technologies for Faster Transact-SQL Performance] (https://msdn.microsoft.com/en-us/library/mt694156.aspx) +- [Get started with Columnstore for real time operational analytics] (https://msdn.microsoft.com/en-us/library/dn817827.aspx) +- [Columnstore Indexes Guide] (https://msdn.microsoft.com/en-us/library/gg492088.aspx) diff --git a/samples/master-data-services/README.md b/samples/master-data-services/README.md index 9671dc6e..fac7c4ae 100644 --- a/samples/master-data-services/README.md +++ b/samples/master-data-services/README.md @@ -1,56 +1,5 @@ -# Ticket Reservations Sample +# Master Data Services -Ticket Reservations is a Windows Forms sample application built on .NET Framework 4.6 that demonstrates the performance benefits of using SQL Server memory optimized tables and native compiled stored procedures. You can compare the performance before and after enabling In-Memory OLTP by observing the transactions/sec as well as the current CPU Usage and latches/sec. +Master Data Services (MDS) is the SQL Server solution for master data management. Master data management (MDM) enables you organization to discover and define non-transactional lists of data, and compile maintainable, reliable master lists. This article briefly describe the MDS components and provides links to additional information. -![Alt text](Screenshots/1.png "Ticket Reservations") - -## Running this sample -1. Before you can run this sample, you must have the following perquisites: - - SQL Server 2016 CTP3 (or higher) - - Visual Studio 2015 (or higher) with the latest SSDT installed. - -2. Clone this repository using Git for Windows (http://www.git-scm.com/), or download the zip file. - -3. From Visual Studio, open the **InMemoryOLTPDemo.sln** file from the root directory. - -4. In Visual Studio Build menu, select **Build Solution** (or Press F6). - -5. In the **App.config** file, located in the project root, find the **TicketReservations** app setting and edit the connectionString if needed. Currently it is configured to connect to the local default SQL Server Instance using Integrated Security. - -6. Publish the TicketReservations Database - - Right click on the TicketReservations SQL Server Database Project and Select **Publish** - - Click Edit... to choose your connection string - - Click Publish - - Note: For publishing to Azure SQL you need to change the DB project target platform to **Microsoft Azure SQL Database V12** - -7. You can now run and debug the application locally by pressing **F5** in Visual Studio. - -8. Start the workload with the **Start** button, and run for a while to show perf profile. Then press stop to stop the workload. - -9. In the database project, - - Change TicketReservations.sql to a memory-optimized table (instructions commented in the file itself) - - Change InsertTicketReservations.sql to natively compiled (instructions in the same file) - -10. Publish the database project to the same database – the tool will take care of making the necessary changes. - Note that, as part of publication, the data is copied from the old disk-based table to the new memory-optimized table, so the longer you run the initial workload, the longer this publication takes. - -11. Go back to the app and run the workload again. No need to recompile or restart the application. - -The perf gains from In-Memory OLTP as shown by the load generation app depend on two factors: -- Hardware - - more cores => higher perf gain - - slower log IO => lower perf gain -- Configuration settings in the load generator - - more rows per transaction => higher perf gain - - more reads per write => lower perf gain - - default setting is 10 rows per transaction and 1 read per write - -With default settings on one machine with 24 logical cores and relatively slow SSD for the log the app shows around performance 40X gain, and in this case the bottleneck was log IO. - - -## About the code -The code included in this sample is not intended to be a set of best practices on how to build scalable enterprise grade web applications. This is beyond the scope of this quick start sample. - -## More information -- [In-Memory OLTP (In-Memory Optimization)] (https://msdn.microsoft.com/en-us/library/dn133186.aspx) -- [OLTP and database management] (https://www.microsoft.com/en-us/server-cloud/solutions/oltp-database-management.aspx) +For information about the new features in SQL Server 2016, see [What's New in Master Data Services (MDS)] (https://msdn.microsoft.com/en-us/library/ff929136.aspx). diff --git a/samples/r-services/README.md b/samples/r-services/README.md index 9671dc6e..bb8dc0e2 100644 --- a/samples/r-services/README.md +++ b/samples/r-services/README.md @@ -1,56 +1,3 @@ -# Ticket Reservations Sample +# R Services -Ticket Reservations is a Windows Forms sample application built on .NET Framework 4.6 that demonstrates the performance benefits of using SQL Server memory optimized tables and native compiled stored procedures. You can compare the performance before and after enabling In-Memory OLTP by observing the transactions/sec as well as the current CPU Usage and latches/sec. - -![Alt text](Screenshots/1.png "Ticket Reservations") - -## Running this sample -1. Before you can run this sample, you must have the following perquisites: - - SQL Server 2016 CTP3 (or higher) - - Visual Studio 2015 (or higher) with the latest SSDT installed. - -2. Clone this repository using Git for Windows (http://www.git-scm.com/), or download the zip file. - -3. From Visual Studio, open the **InMemoryOLTPDemo.sln** file from the root directory. - -4. In Visual Studio Build menu, select **Build Solution** (or Press F6). - -5. In the **App.config** file, located in the project root, find the **TicketReservations** app setting and edit the connectionString if needed. Currently it is configured to connect to the local default SQL Server Instance using Integrated Security. - -6. Publish the TicketReservations Database - - Right click on the TicketReservations SQL Server Database Project and Select **Publish** - - Click Edit... to choose your connection string - - Click Publish - - Note: For publishing to Azure SQL you need to change the DB project target platform to **Microsoft Azure SQL Database V12** - -7. You can now run and debug the application locally by pressing **F5** in Visual Studio. - -8. Start the workload with the **Start** button, and run for a while to show perf profile. Then press stop to stop the workload. - -9. In the database project, - - Change TicketReservations.sql to a memory-optimized table (instructions commented in the file itself) - - Change InsertTicketReservations.sql to natively compiled (instructions in the same file) - -10. Publish the database project to the same database – the tool will take care of making the necessary changes. - Note that, as part of publication, the data is copied from the old disk-based table to the new memory-optimized table, so the longer you run the initial workload, the longer this publication takes. - -11. Go back to the app and run the workload again. No need to recompile or restart the application. - -The perf gains from In-Memory OLTP as shown by the load generation app depend on two factors: -- Hardware - - more cores => higher perf gain - - slower log IO => lower perf gain -- Configuration settings in the load generator - - more rows per transaction => higher perf gain - - more reads per write => lower perf gain - - default setting is 10 rows per transaction and 1 read per write - -With default settings on one machine with 24 logical cores and relatively slow SSD for the log the app shows around performance 40X gain, and in this case the bottleneck was log IO. - - -## About the code -The code included in this sample is not intended to be a set of best practices on how to build scalable enterprise grade web applications. This is beyond the scope of this quick start sample. - -## More information -- [In-Memory OLTP (In-Memory Optimization)] (https://msdn.microsoft.com/en-us/library/dn133186.aspx) -- [OLTP and database management] (https://www.microsoft.com/en-us/server-cloud/solutions/oltp-database-management.aspx) +[SQL Server 2016 R Services] (http://blogs.microsoft.com/firehose/tag/sql-server-2016-r-services/)