From a06bb58c34f10cbb7c3d0862a66a59107eaa7646 Mon Sep 17 00:00:00 2001 From: Dmitry Dmitriev Date: Sun, 19 Jun 2016 13:02:56 +0300 Subject: [PATCH 01/17] Benchmark package added --- .../BenchmarkMultithreadingConsole.csproj | 6 ++++++ .../BenchmarkMultithreadingConsole/packages.config | 4 ++++ 2 files changed, 10 insertions(+) create mode 100644 BenchmarkMultithreading/BenchmarkMultithreadingConsole/packages.config diff --git a/BenchmarkMultithreading/BenchmarkMultithreadingConsole/BenchmarkMultithreadingConsole.csproj b/BenchmarkMultithreading/BenchmarkMultithreadingConsole/BenchmarkMultithreadingConsole.csproj index d08bb06..7e81457 100644 --- a/BenchmarkMultithreading/BenchmarkMultithreadingConsole/BenchmarkMultithreadingConsole.csproj +++ b/BenchmarkMultithreading/BenchmarkMultithreadingConsole/BenchmarkMultithreadingConsole.csproj @@ -33,8 +33,13 @@ 4 + + ..\packages\BenchmarkDotNet.0.9.7\lib\net40\BenchmarkDotNet.dll + True + + @@ -48,6 +53,7 @@ + + \ No newline at end of file diff --git a/BenchmarkMultithreading/BenchmarkMultithreading/Benchmarks.cs b/BenchmarkMultithreading/BenchmarkMultithreading/Benchmarks.cs new file mode 100644 index 0000000..a62f015 --- /dev/null +++ b/BenchmarkMultithreading/BenchmarkMultithreading/Benchmarks.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using BenchmarkDotNet.Attributes; + +namespace BenchmarkMultithreading +{ + public class Benchmarks + { + #region public methods + [Setup] + public void Setup() + { + + } + + [Benchmark] + public void Lock() + { + + } + + [Benchmark] + public void MonitorEnter() + { + + } + #endregion + } +} diff --git a/BenchmarkMultithreading/BenchmarkMultithreading/Benchmarks/Lock.cs b/BenchmarkMultithreading/BenchmarkMultithreading/Benchmarks/Lock.cs new file mode 100644 index 0000000..186ddd8 --- /dev/null +++ b/BenchmarkMultithreading/BenchmarkMultithreading/Benchmarks/Lock.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BenchmarkMultithreading.Benchmarks +{ + class Lock + { + + } +} diff --git a/BenchmarkMultithreading/BenchmarkMultithreading/Benchmarks/MonitorEnter.cs b/BenchmarkMultithreading/BenchmarkMultithreading/Benchmarks/MonitorEnter.cs new file mode 100644 index 0000000..60a28e7 --- /dev/null +++ b/BenchmarkMultithreading/BenchmarkMultithreading/Benchmarks/MonitorEnter.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BenchmarkMultithreading.Benchmarks +{ + class MonitorEnter + { + } +} diff --git a/BenchmarkMultithreading/BenchmarkMultithreading/Properties/AssemblyInfo.cs b/BenchmarkMultithreading/BenchmarkMultithreading/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1378edf --- /dev/null +++ b/BenchmarkMultithreading/BenchmarkMultithreading/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +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("BenchmarkMultithreading")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("BenchmarkMultithreading")] +[assembly: AssemblyCopyright("Copyright © 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("9f098a77-241d-4e01-9b3d-29fe857e1511")] + +// 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")] diff --git a/BenchmarkMultithreading/BenchmarkMultithreadingConsole/packages.config b/BenchmarkMultithreading/BenchmarkMultithreading/packages.config similarity index 100% rename from BenchmarkMultithreading/BenchmarkMultithreadingConsole/packages.config rename to BenchmarkMultithreading/BenchmarkMultithreading/packages.config diff --git a/BenchmarkMultithreading/BenchmarkMultithreadingConsole/BenchmarkMultithreadingConsole.csproj b/BenchmarkMultithreading/BenchmarkMultithreadingConsole/BenchmarkMultithreadingConsole.csproj index 7e81457..e92d2e9 100644 --- a/BenchmarkMultithreading/BenchmarkMultithreadingConsole/BenchmarkMultithreadingConsole.csproj +++ b/BenchmarkMultithreading/BenchmarkMultithreadingConsole/BenchmarkMultithreadingConsole.csproj @@ -33,10 +33,6 @@ 4 - - ..\packages\BenchmarkDotNet.0.9.7\lib\net40\BenchmarkDotNet.dll - True - @@ -53,7 +49,6 @@ -