From 3362f31c860e1e7d7b2bac76a973e91757b5f226 Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Tue, 29 Jul 2014 18:46:30 +0300 Subject: [PATCH 01/40] .net 40 support: added Task.Delay and Task.FromResult equivalents --- Src/Metrics/Utils/ActionScheduler.cs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Src/Metrics/Utils/ActionScheduler.cs b/Src/Metrics/Utils/ActionScheduler.cs index 2b805568..aa1367f8 100644 --- a/Src/Metrics/Utils/ActionScheduler.cs +++ b/Src/Metrics/Utils/ActionScheduler.cs @@ -64,7 +64,7 @@ private static void RunScheduler(TimeSpan interval, Func(); + System.Timers.Timer timer = new System.Timers.Timer(); + timer.Elapsed += (obj, args) => + { + tcs.TrySetResult(true); + }; + timer.Interval = interval.TotalMilliseconds; + timer.AutoReset = false; + timer.Start(); + return tcs.Task; + } + private static Task Completed() { - return Task.FromResult(true); + var taskSource = new TaskCompletionSource(); + taskSource.SetResult(true); + return taskSource.Task; } private static void HandleException(Exception x) From 9ade14bd687ba777a295b84c8eeab53ebd05d1f4 Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Tue, 29 Jul 2014 19:13:08 +0300 Subject: [PATCH 02/40] first try of .net 4.0 version --- Metrics.sln | 55 ------------- .../Metrics.SampleReporter.csproj | 2 +- .../Metrics.Samples/Metrics.Samples.csproj | 4 +- .../Metrics.SamplesConsole.csproj | 8 +- .../Metrics.StupidBenchmarks.csproj | 13 ++- Samples/NancyFx.Sample/NancyFx.Sample.csproj | 11 ++- Samples/NancyFx.Sample/packages.config | 2 +- Samples/Owin.Sample/App.config | 4 + Samples/Owin.Sample/Owin.Sample.csproj | 6 +- Src/Adapters/Metrics.NLog/Metrics.NLog.csproj | 11 +-- Src/Adapters/Metrics.NLog/packages.config | 2 +- .../Nancy.Metrics/Nancy.Metrics.csproj | 7 +- Src/Adapters/Nancy.Metrics/packages.config | 2 +- Src/Adapters/Owin.Metrics/Owin.Metrics.csproj | 16 ++-- Src/Adapters/Owin.Metrics/packages.config | 4 +- Src/Metrics.Tests/Metrics.Tests.csproj | 23 +++--- Src/Metrics.Tests/packages.config | 10 +-- Src/Metrics/Metrics.csproj | 2 +- Src/Metrics/Utils/ActionScheduler.cs | 79 ++++--------------- 19 files changed, 81 insertions(+), 180 deletions(-) diff --git a/Metrics.sln b/Metrics.sln index c83208e0..a9995d7a 100644 --- a/Metrics.sln +++ b/Metrics.sln @@ -16,14 +16,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{FE317A EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{30108C17-0671-4786-90D0-0564718C3F70}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NancyFx.Sample", "Samples\NancyFx.Sample\NancyFx.Sample.csproj", "{B7C6EF21-0797-4B53-A917-1CFF8267CD67}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Metrics.Samples", "Samples\Metrics.Samples\Metrics.Samples.csproj", "{D08A63D0-F440-477C-9565-1264AE0879D0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Metrics.SamplesConsole", "Samples\Metrics.SamplesConsole\Metrics.SamplesConsole.csproj", "{7416F90D-FFD6-4E34-8638-5234C8B9EC39}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Metrics.StupidBenchmarks", "Samples\Metrics.StupidBenchmarks\Metrics.StupidBenchmarks.csproj", "{A9074D3E-3421-483D-AF98-4AAEEED11ECA}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Adapters", "Adapters", "{443860DA-6378-47D0-A4AE-4E79975C5E1C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nancy.Metrics", "Src\Adapters\Nancy.Metrics\Nancy.Metrics.csproj", "{FBFF51D8-52F4-4EEF-8498-122A14B37D6C}" @@ -43,16 +39,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution SharedAssemblyInfo.cs = SharedAssemblyInfo.cs EndProjectSection EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Metrics.Samples.FSharp", "Samples\Metrics.Samples.FSharp\Metrics.Samples.FSharp.fsproj", "{DAF70394-CE63-4D2F-B52B-839941827B4E}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Metrics.SampleReporter", "Samples\Metrics.SampleReporter\Metrics.SampleReporter.csproj", "{18E808CB-98F9-4754-9872-D3D00F9CE72B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Metrics.NLog", "Src\Adapters\Metrics.NLog\Metrics.NLog.csproj", "{68F25A01-AF00-4D57-9D1A-81213E4EF56F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Owin.Metrics", "Src\Adapters\Owin.Metrics\Owin.Metrics.csproj", "{025CD6D0-1A1E-4B14-A7DB-AF5DFF887210}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Owin.Sample", "Samples\Owin.Sample\Owin.Sample.csproj", "{828188F9-26C2-4C93-A156-D9EA13D7E2FA}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -77,14 +67,6 @@ Global {4E0F8CB9-6919-48B8-8212-BCE75D04E0D9}.MonoRelease|Any CPU.Build.0 = MonoRelease|Any CPU {4E0F8CB9-6919-48B8-8212-BCE75D04E0D9}.Release|Any CPU.ActiveCfg = Release|Any CPU {4E0F8CB9-6919-48B8-8212-BCE75D04E0D9}.Release|Any CPU.Build.0 = Release|Any CPU - {B7C6EF21-0797-4B53-A917-1CFF8267CD67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B7C6EF21-0797-4B53-A917-1CFF8267CD67}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B7C6EF21-0797-4B53-A917-1CFF8267CD67}.MonoDebug|Any CPU.ActiveCfg = MonoDebug|Any CPU - {B7C6EF21-0797-4B53-A917-1CFF8267CD67}.MonoDebug|Any CPU.Build.0 = MonoDebug|Any CPU - {B7C6EF21-0797-4B53-A917-1CFF8267CD67}.MonoRelease|Any CPU.ActiveCfg = MonoRelease|Any CPU - {B7C6EF21-0797-4B53-A917-1CFF8267CD67}.MonoRelease|Any CPU.Build.0 = MonoRelease|Any CPU - {B7C6EF21-0797-4B53-A917-1CFF8267CD67}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B7C6EF21-0797-4B53-A917-1CFF8267CD67}.Release|Any CPU.Build.0 = Release|Any CPU {D08A63D0-F440-477C-9565-1264AE0879D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D08A63D0-F440-477C-9565-1264AE0879D0}.Debug|Any CPU.Build.0 = Debug|Any CPU {D08A63D0-F440-477C-9565-1264AE0879D0}.MonoDebug|Any CPU.ActiveCfg = MonoDebug|Any CPU @@ -101,14 +83,6 @@ Global {7416F90D-FFD6-4E34-8638-5234C8B9EC39}.MonoRelease|Any CPU.Build.0 = MonoRelease|Any CPU {7416F90D-FFD6-4E34-8638-5234C8B9EC39}.Release|Any CPU.ActiveCfg = Release|Any CPU {7416F90D-FFD6-4E34-8638-5234C8B9EC39}.Release|Any CPU.Build.0 = Release|Any CPU - {A9074D3E-3421-483D-AF98-4AAEEED11ECA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A9074D3E-3421-483D-AF98-4AAEEED11ECA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A9074D3E-3421-483D-AF98-4AAEEED11ECA}.MonoDebug|Any CPU.ActiveCfg = MonoDebug|Any CPU - {A9074D3E-3421-483D-AF98-4AAEEED11ECA}.MonoDebug|Any CPU.Build.0 = MonoDebug|Any CPU - {A9074D3E-3421-483D-AF98-4AAEEED11ECA}.MonoRelease|Any CPU.ActiveCfg = MonoRelease|Any CPU - {A9074D3E-3421-483D-AF98-4AAEEED11ECA}.MonoRelease|Any CPU.Build.0 = MonoRelease|Any CPU - {A9074D3E-3421-483D-AF98-4AAEEED11ECA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A9074D3E-3421-483D-AF98-4AAEEED11ECA}.Release|Any CPU.Build.0 = Release|Any CPU {FBFF51D8-52F4-4EEF-8498-122A14B37D6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FBFF51D8-52F4-4EEF-8498-122A14B37D6C}.Debug|Any CPU.Build.0 = Debug|Any CPU {FBFF51D8-52F4-4EEF-8498-122A14B37D6C}.MonoDebug|Any CPU.ActiveCfg = MonoDebug|Any CPU @@ -117,14 +91,6 @@ Global {FBFF51D8-52F4-4EEF-8498-122A14B37D6C}.MonoRelease|Any CPU.Build.0 = MonoRelease|Any CPU {FBFF51D8-52F4-4EEF-8498-122A14B37D6C}.Release|Any CPU.ActiveCfg = Release|Any CPU {FBFF51D8-52F4-4EEF-8498-122A14B37D6C}.Release|Any CPU.Build.0 = Release|Any CPU - {DAF70394-CE63-4D2F-B52B-839941827B4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DAF70394-CE63-4D2F-B52B-839941827B4E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DAF70394-CE63-4D2F-B52B-839941827B4E}.MonoDebug|Any CPU.ActiveCfg = MonoDebug|Any CPU - {DAF70394-CE63-4D2F-B52B-839941827B4E}.MonoDebug|Any CPU.Build.0 = MonoDebug|Any CPU - {DAF70394-CE63-4D2F-B52B-839941827B4E}.MonoRelease|Any CPU.ActiveCfg = MonoRelease|Any CPU - {DAF70394-CE63-4D2F-B52B-839941827B4E}.MonoRelease|Any CPU.Build.0 = MonoRelease|Any CPU - {DAF70394-CE63-4D2F-B52B-839941827B4E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DAF70394-CE63-4D2F-B52B-839941827B4E}.Release|Any CPU.Build.0 = Release|Any CPU {18E808CB-98F9-4754-9872-D3D00F9CE72B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {18E808CB-98F9-4754-9872-D3D00F9CE72B}.Debug|Any CPU.Build.0 = Debug|Any CPU {18E808CB-98F9-4754-9872-D3D00F9CE72B}.MonoDebug|Any CPU.ActiveCfg = MonoDebug|Any CPU @@ -141,37 +107,16 @@ Global {68F25A01-AF00-4D57-9D1A-81213E4EF56F}.MonoRelease|Any CPU.Build.0 = MonoRelease|Any CPU {68F25A01-AF00-4D57-9D1A-81213E4EF56F}.Release|Any CPU.ActiveCfg = Release|Any CPU {68F25A01-AF00-4D57-9D1A-81213E4EF56F}.Release|Any CPU.Build.0 = Release|Any CPU - {025CD6D0-1A1E-4B14-A7DB-AF5DFF887210}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {025CD6D0-1A1E-4B14-A7DB-AF5DFF887210}.Debug|Any CPU.Build.0 = Debug|Any CPU - {025CD6D0-1A1E-4B14-A7DB-AF5DFF887210}.MonoDebug|Any CPU.ActiveCfg = MonoDebug|Any CPU - {025CD6D0-1A1E-4B14-A7DB-AF5DFF887210}.MonoDebug|Any CPU.Build.0 = MonoDebug|Any CPU - {025CD6D0-1A1E-4B14-A7DB-AF5DFF887210}.MonoRelease|Any CPU.ActiveCfg = MonoRelease|Any CPU - {025CD6D0-1A1E-4B14-A7DB-AF5DFF887210}.MonoRelease|Any CPU.Build.0 = MonoRelease|Any CPU - {025CD6D0-1A1E-4B14-A7DB-AF5DFF887210}.Release|Any CPU.ActiveCfg = Release|Any CPU - {025CD6D0-1A1E-4B14-A7DB-AF5DFF887210}.Release|Any CPU.Build.0 = Release|Any CPU - {828188F9-26C2-4C93-A156-D9EA13D7E2FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {828188F9-26C2-4C93-A156-D9EA13D7E2FA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {828188F9-26C2-4C93-A156-D9EA13D7E2FA}.MonoDebug|Any CPU.ActiveCfg = MonoDebug|Any CPU - {828188F9-26C2-4C93-A156-D9EA13D7E2FA}.MonoDebug|Any CPU.Build.0 = MonoDebug|Any CPU - {828188F9-26C2-4C93-A156-D9EA13D7E2FA}.MonoRelease|Any CPU.ActiveCfg = MonoRelease|Any CPU - {828188F9-26C2-4C93-A156-D9EA13D7E2FA}.MonoRelease|Any CPU.Build.0 = MonoRelease|Any CPU - {828188F9-26C2-4C93-A156-D9EA13D7E2FA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {828188F9-26C2-4C93-A156-D9EA13D7E2FA}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {B7C6EF21-0797-4B53-A917-1CFF8267CD67} = {30108C17-0671-4786-90D0-0564718C3F70} {D08A63D0-F440-477C-9565-1264AE0879D0} = {30108C17-0671-4786-90D0-0564718C3F70} {7416F90D-FFD6-4E34-8638-5234C8B9EC39} = {30108C17-0671-4786-90D0-0564718C3F70} - {A9074D3E-3421-483D-AF98-4AAEEED11ECA} = {30108C17-0671-4786-90D0-0564718C3F70} {FBFF51D8-52F4-4EEF-8498-122A14B37D6C} = {443860DA-6378-47D0-A4AE-4E79975C5E1C} - {DAF70394-CE63-4D2F-B52B-839941827B4E} = {30108C17-0671-4786-90D0-0564718C3F70} {18E808CB-98F9-4754-9872-D3D00F9CE72B} = {30108C17-0671-4786-90D0-0564718C3F70} {68F25A01-AF00-4D57-9D1A-81213E4EF56F} = {443860DA-6378-47D0-A4AE-4E79975C5E1C} - {025CD6D0-1A1E-4B14-A7DB-AF5DFF887210} = {443860DA-6378-47D0-A4AE-4E79975C5E1C} - {828188F9-26C2-4C93-A156-D9EA13D7E2FA} = {30108C17-0671-4786-90D0-0564718C3F70} EndGlobalSection GlobalSection(CodealikeProperties) = postSolution SolutionGuid = 169deccf-e8f8-4868-80f4-f7f0bb71cb4b diff --git a/Samples/Metrics.SampleReporter/Metrics.SampleReporter.csproj b/Samples/Metrics.SampleReporter/Metrics.SampleReporter.csproj index caeb301a..680f739a 100644 --- a/Samples/Metrics.SampleReporter/Metrics.SampleReporter.csproj +++ b/Samples/Metrics.SampleReporter/Metrics.SampleReporter.csproj @@ -9,7 +9,7 @@ Properties Metrics.SampleReporter Metrics.SampleReporter - v4.5.1 + v4.0 512 ..\..\ true diff --git a/Samples/Metrics.Samples/Metrics.Samples.csproj b/Samples/Metrics.Samples/Metrics.Samples.csproj index cfc0fee0..d192d6d4 100644 --- a/Samples/Metrics.Samples/Metrics.Samples.csproj +++ b/Samples/Metrics.Samples/Metrics.Samples.csproj @@ -15,7 +15,7 @@ true full false - v4.5.1 + v4.0 ..\..\bin\Debug\ DEBUG;TRACE prompt @@ -24,7 +24,7 @@ pdbonly true - v4.5.1 + v4.0 ..\..\bin\Release\ TRACE prompt diff --git a/Samples/Metrics.SamplesConsole/Metrics.SamplesConsole.csproj b/Samples/Metrics.SamplesConsole/Metrics.SamplesConsole.csproj index 244c4091..569fb721 100644 --- a/Samples/Metrics.SamplesConsole/Metrics.SamplesConsole.csproj +++ b/Samples/Metrics.SamplesConsole/Metrics.SamplesConsole.csproj @@ -19,7 +19,7 @@ true full false - v4.5.1 + v4.0 ..\..\bin\Debug\ DEBUG;TRACE prompt @@ -29,7 +29,7 @@ AnyCPU pdbonly true - v4.5.1 + v4.0 ..\..\bin\Release\ TRACE prompt @@ -88,10 +88,6 @@ {18e808cb-98f9-4754-9872-d3d00f9ce72b} Metrics.SampleReporter - - {daf70394-ce63-4d2f-b52b-839941827b4e} - Metrics.Samples.FSharp - {d08a63d0-f440-477c-9565-1264ae0879d0} Metrics.Samples diff --git a/Samples/Metrics.StupidBenchmarks/Metrics.StupidBenchmarks.csproj b/Samples/Metrics.StupidBenchmarks/Metrics.StupidBenchmarks.csproj index 65ba5c3f..7338a8df 100644 --- a/Samples/Metrics.StupidBenchmarks/Metrics.StupidBenchmarks.csproj +++ b/Samples/Metrics.StupidBenchmarks/Metrics.StupidBenchmarks.csproj @@ -11,27 +11,30 @@ Metrics.StupidBenchmarks 512 true + AnyCPU true full false - v4.5.1 + v4.0 ..\..\bin\Debug\ DEBUG;TRACE prompt 4 + false AnyCPU pdbonly true - v4.5.1 + v4.0 ..\..\bin\Release\ TRACE prompt 4 + false AnyCPU @@ -43,17 +46,19 @@ DEBUG;TRACE prompt 4 + true AnyCPU pdbonly true - v4.5 + v4.5.1 ..\..\bin\MonoRelease\ TRACE prompt 4 - + true + diff --git a/Samples/NancyFx.Sample/NancyFx.Sample.csproj b/Samples/NancyFx.Sample/NancyFx.Sample.csproj index d9fd50c4..3220fa2d 100644 --- a/Samples/NancyFx.Sample/NancyFx.Sample.csproj +++ b/Samples/NancyFx.Sample/NancyFx.Sample.csproj @@ -13,27 +13,30 @@ true ..\..\ true + AnyCPU true full false - v4.5.1 + v4.0 ..\..\bin\Debug\ DEBUG;TRACE prompt 4 + false AnyCPU pdbonly true - v4.5.1 + v4.0 ..\..\bin\Release\ TRACE prompt 4 + false AnyCPU @@ -45,16 +48,18 @@ DEBUG;TRACE prompt 4 + true AnyCPU pdbonly true - v4.5 + v4.5.1 ..\..\bin\MonoRelease\ TRACE prompt 4 + true diff --git a/Samples/NancyFx.Sample/packages.config b/Samples/NancyFx.Sample/packages.config index 09d3c7a9..86154aa8 100644 --- a/Samples/NancyFx.Sample/packages.config +++ b/Samples/NancyFx.Sample/packages.config @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/Samples/Owin.Sample/App.config b/Samples/Owin.Sample/App.config index 76df0226..310608e0 100644 --- a/Samples/Owin.Sample/App.config +++ b/Samples/Owin.Sample/App.config @@ -17,6 +17,10 @@ + + + + diff --git a/Samples/Owin.Sample/Owin.Sample.csproj b/Samples/Owin.Sample/Owin.Sample.csproj index 95e502d9..f03a7b48 100644 --- a/Samples/Owin.Sample/Owin.Sample.csproj +++ b/Samples/Owin.Sample/Owin.Sample.csproj @@ -9,7 +9,7 @@ Properties Owin.Sample Owin.Sample - v4.5.1 + v4.0 512 ..\..\ true @@ -112,10 +112,6 @@ - - {025cd6d0-1a1e-4b14-a7db-af5dff887210} - Owin.Metrics - {95e29d40-dbec-49e2-9cc5-26b88966dade} Metrics diff --git a/Src/Adapters/Metrics.NLog/Metrics.NLog.csproj b/Src/Adapters/Metrics.NLog/Metrics.NLog.csproj index 7d492480..0f4042e2 100644 --- a/Src/Adapters/Metrics.NLog/Metrics.NLog.csproj +++ b/Src/Adapters/Metrics.NLog/Metrics.NLog.csproj @@ -9,7 +9,7 @@ Properties Metrics.NLog Metrics.NLog - v4.5.1 + v4.0 512 ..\..\..\ true @@ -18,7 +18,7 @@ true full false - v4.5.1 + v4.0 ..\..\..\bin\Debug\ DEBUG;TRACE prompt @@ -32,7 +32,7 @@ pdbonly true - v4.5.1 + v4.0 ..\..\..\bin\Release\ TRACE prompt @@ -69,8 +69,9 @@ ..\..\..\bin\MonoRelease\Metrics.NLog.XML - - ..\..\..\packages\NLog.3.1.0.0\lib\net45\NLog.dll + + False + ..\..\..\packages\NLog.3.1.0.0\lib\net40\NLog.dll diff --git a/Src/Adapters/Metrics.NLog/packages.config b/Src/Adapters/Metrics.NLog/packages.config index aefc63ab..01dd38f8 100644 --- a/Src/Adapters/Metrics.NLog/packages.config +++ b/Src/Adapters/Metrics.NLog/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Src/Adapters/Nancy.Metrics/Nancy.Metrics.csproj b/Src/Adapters/Nancy.Metrics/Nancy.Metrics.csproj index 950a8b59..3836b36c 100644 --- a/Src/Adapters/Nancy.Metrics/Nancy.Metrics.csproj +++ b/Src/Adapters/Nancy.Metrics/Nancy.Metrics.csproj @@ -17,7 +17,7 @@ true full false - v4.5.1 + v4.0 ..\..\..\bin\Debug\ DEBUG;TRACE prompt @@ -31,7 +31,7 @@ pdbonly true - v4.5.1 + v4.0 ..\..\..\bin\Release\ TRACE prompt @@ -68,8 +68,7 @@ ..\..\..\bin\Release\Nancy.Metrics.XML - - False + ..\..\..\packages\Nancy.0.23.2\lib\net40\Nancy.dll diff --git a/Src/Adapters/Nancy.Metrics/packages.config b/Src/Adapters/Nancy.Metrics/packages.config index 893f8ca3..3c137c62 100644 --- a/Src/Adapters/Nancy.Metrics/packages.config +++ b/Src/Adapters/Nancy.Metrics/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Src/Adapters/Owin.Metrics/Owin.Metrics.csproj b/Src/Adapters/Owin.Metrics/Owin.Metrics.csproj index d827ba60..917a2611 100644 --- a/Src/Adapters/Owin.Metrics/Owin.Metrics.csproj +++ b/Src/Adapters/Owin.Metrics/Owin.Metrics.csproj @@ -9,7 +9,7 @@ Properties Owin.Metrics Owin.Metrics - v4.5.1 + v4.0 512 ..\..\..\ true @@ -25,6 +25,7 @@ 4 ..\..\..\bin\Debug\Owin.Metrics.XML 1591 + false pdbonly @@ -36,6 +37,7 @@ false ..\..\..\Release\Owin.Metrics.XML 1591 + false AnyCPU @@ -49,24 +51,28 @@ 4 ..\..\..\bin\MonoDebug\Owin.Metrics.XML 1591 + false AnyCPU pdbonly true - v4.5 + v4.5.1 ..\..\..\bin\MonoRelease\ TRACE prompt 4 ..\..\..\bin\MonoRelease\Owin.Metrics.XML 1591 + false - - ..\..\..\packages\Microsoft.Owin.2.1.0\lib\net45\Microsoft.Owin.dll + + False + ..\..\..\packages\Microsoft.Owin.2.1.0\lib\net40\Microsoft.Owin.dll - + + False ..\..\..\packages\Owin.1.0\lib\net40\Owin.dll diff --git a/Src/Adapters/Owin.Metrics/packages.config b/Src/Adapters/Owin.Metrics/packages.config index fb47f58c..298a34cf 100644 --- a/Src/Adapters/Owin.Metrics/packages.config +++ b/Src/Adapters/Owin.Metrics/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/Src/Metrics.Tests/Metrics.Tests.csproj b/Src/Metrics.Tests/Metrics.Tests.csproj index 98ca65c3..61e611cf 100644 --- a/Src/Metrics.Tests/Metrics.Tests.csproj +++ b/Src/Metrics.Tests/Metrics.Tests.csproj @@ -17,7 +17,7 @@ true full false - v4.5.1 + v4.0 ..\..\bin\Debug\Tests\ DEBUG;TRACE prompt @@ -26,7 +26,7 @@ pdbonly true - v4.5.1 + v4.0 ..\..\bin\Release\Tests\ TRACE prompt @@ -52,23 +52,19 @@ 4 - - False - ..\..\packages\CsQuery.1.3.4\lib\net40\CsQuery.dll + + ..\..\packages\CsQuery.1.3.3\lib\net40\CsQuery.dll - - False - ..\..\packages\FluentAssertions.3.0.107\lib\net45\FluentAssertions.dll + + ..\..\packages\FluentAssertions.3.1.229\lib\net40\FluentAssertions.dll - ..\..\packages\FluentAssertions.3.0.107\lib\net45\FluentAssertions.Core.dll + ..\..\packages\FluentAssertions.3.1.229\lib\net40\FluentAssertions.Core.dll - - False + ..\..\packages\Nancy.0.23.2\lib\net40\Nancy.dll - - False + ..\..\packages\Nancy.Testing.0.23.2\lib\net40\Nancy.Testing.dll @@ -125,7 +121,6 @@ - diff --git a/Src/Metrics.Tests/packages.config b/Src/Metrics.Tests/packages.config index e671977a..1ada558d 100644 --- a/Src/Metrics.Tests/packages.config +++ b/Src/Metrics.Tests/packages.config @@ -1,8 +1,8 @@  - - - - - + + + + + \ No newline at end of file diff --git a/Src/Metrics/Metrics.csproj b/Src/Metrics/Metrics.csproj index 289d8b1a..a83a3bd3 100644 --- a/Src/Metrics/Metrics.csproj +++ b/Src/Metrics/Metrics.csproj @@ -9,7 +9,7 @@ Properties Metrics Metrics - v4.5.1 + v4.0 512 diff --git a/Src/Metrics/Utils/ActionScheduler.cs b/Src/Metrics/Utils/ActionScheduler.cs index aa1367f8..7f4b9085 100644 --- a/Src/Metrics/Utils/ActionScheduler.cs +++ b/Src/Metrics/Utils/ActionScheduler.cs @@ -5,6 +5,8 @@ namespace Metrics.Utils { + using Timer = System.Timers.Timer; + /// /// Utility class to schedule an Action to be executed repeatedly according to the interval. /// @@ -14,7 +16,7 @@ namespace Metrics.Utils /// public sealed class ActionScheduler : Scheduler { - private CancellationTokenSource token = null; + private readonly Timer timer = new Timer(); public void Start(TimeSpan interval, Action action) { @@ -48,48 +50,21 @@ public void Start(TimeSpan interval, Func task) throw new ArgumentException("interval must be > 0 seconds", "interval"); } - if (this.token != null) - { - throw new InvalidOperationException("Scheduler is already started."); - } - - this.token = new CancellationTokenSource(); - - RunScheduler(interval, task, this.token); - } - - private static void RunScheduler(TimeSpan interval, Func action, CancellationTokenSource token) - { - Task.Factory.StartNew(async () => + this.timer.Elapsed += (obj, args) => { - while (!token.IsCancellationRequested) + try { - await Delay(interval, token.Token); - try - { - await action(token.Token); - } - catch (Exception x) - { - HandleException(x); - token.Cancel(); - } + task(CancellationToken.None).Wait(); + } + catch (Exception x) + { + HandleException(x); + timer.Stop(); } - }, token.Token); - } - - public static Task Delay(TimeSpan interval, CancellationToken token) - { - var tcs = new TaskCompletionSource(); - System.Timers.Timer timer = new System.Timers.Timer(); - timer.Elapsed += (obj, args) => - { - tcs.TrySetResult(true); }; + timer.Interval = interval.TotalMilliseconds; - timer.AutoReset = false; timer.Start(); - return tcs.Task; } private static Task Completed() @@ -113,38 +88,12 @@ private static void HandleException(Exception x) public void Stop() { - if (this.token != null) - { - token.Cancel(); - } - } - - private void RunAction(Action action) - { - try - { - action(this.token.Token); - } - catch (Exception x) - { - if (Metric.Config.ErrorHandler != null) - { - Metric.Config.ErrorHandler(x); - } - else - { - throw; - } - } + this.timer.Stop(); } public void Dispose() { - if (this.token != null) - { - this.token.Cancel(); - this.token.Dispose(); - } + this.timer.Dispose(); GC.SuppressFinalize(this); } } From 7adfddfaac7687d91b712a938b0f6799f70b4bee Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Mon, 4 Aug 2014 14:47:42 +0300 Subject: [PATCH 03/40] fix tests project file --- Src/Metrics.Tests/Metrics.Tests.csproj | 9 ++------- Src/Metrics.Tests/packages.config | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Src/Metrics.Tests/Metrics.Tests.csproj b/Src/Metrics.Tests/Metrics.Tests.csproj index b2cc4ee8..c290e925 100644 --- a/Src/Metrics.Tests/Metrics.Tests.csproj +++ b/Src/Metrics.Tests/Metrics.Tests.csproj @@ -55,18 +55,13 @@ ..\..\packages\CsQuery.1.3.3\lib\net40\CsQuery.dll - - ..\..\packages\FluentAssertions.3.1.229\lib\net40\FluentAssertions.dll - - - ..\..\packages\FluentAssertions.3.1.229\lib\net40\FluentAssertions.Core.dll False - ..\..\packages\FluentAssertions.3.1.229\lib\net45\FluentAssertions.dll + ..\..\packages\FluentAssertions.3.1.229\lib\net40\FluentAssertions.dll False - ..\..\packages\FluentAssertions.3.1.229\lib\net45\FluentAssertions.Core.dll + ..\..\packages\FluentAssertions.3.1.229\lib\net40\FluentAssertions.Core.dll ..\..\packages\Nancy.0.23.2\lib\net40\Nancy.dll diff --git a/Src/Metrics.Tests/packages.config b/Src/Metrics.Tests/packages.config index 3a2393f4..42384461 100644 --- a/Src/Metrics.Tests/packages.config +++ b/Src/Metrics.Tests/packages.config @@ -1,7 +1,7 @@  - + From 23b119002af898c35c5bb809887ef13b3fd2cea4 Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Sat, 16 Aug 2014 14:12:36 +0300 Subject: [PATCH 04/40] remove owin from .net 40 tests --- Src/Metrics.Tests/Metrics.Tests.csproj | 28 +----- .../OwinAdapter/OwinExpectedMetrics.cs | 28 ------ .../OwinAdapter/OwinMetricsTestData.cs | 89 ------------------- .../OwinAdapter/OwinMiddlewareTests.cs | 38 -------- Src/Metrics.Tests/packages.config | 6 +- 5 files changed, 7 insertions(+), 182 deletions(-) delete mode 100644 Src/Metrics.Tests/OwinAdapter/OwinExpectedMetrics.cs delete mode 100644 Src/Metrics.Tests/OwinAdapter/OwinMetricsTestData.cs delete mode 100644 Src/Metrics.Tests/OwinAdapter/OwinMiddlewareTests.cs diff --git a/Src/Metrics.Tests/Metrics.Tests.csproj b/Src/Metrics.Tests/Metrics.Tests.csproj index 2a76fc32..0534aa86 100644 --- a/Src/Metrics.Tests/Metrics.Tests.csproj +++ b/Src/Metrics.Tests/Metrics.Tests.csproj @@ -52,7 +52,8 @@ 4 - + + False ..\..\packages\CsQuery.1.3.3\lib\net40\CsQuery.dll @@ -63,31 +64,13 @@ False ..\..\packages\FluentAssertions.3.1.229\lib\net40\FluentAssertions.Core.dll - - - False - ..\..\packages\Microsoft.Owin.2.1.0\lib\net45\Microsoft.Owin.dll - - - ..\..\packages\Microsoft.Owin.Hosting.2.1.0\lib\net45\Microsoft.Owin.Hosting.dll - - - ..\..\packages\Microsoft.Owin.Testing.2.1.0\lib\net45\Microsoft.Owin.Testing.dll - False ..\..\packages\Nancy.0.23.2\lib\net40\Nancy.dll - - ..\..\packages\Nancy.Testing.0.23.2\lib\net40\Nancy.Testing.dll - - + False - ..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll - - - False - ..\..\packages\Owin.1.0\lib\net40\Owin.dll + ..\..\packages\Nancy.Testing.0.23.2\lib\net40\Nancy.Testing.dll @@ -128,9 +111,6 @@ - - - diff --git a/Src/Metrics.Tests/OwinAdapter/OwinExpectedMetrics.cs b/Src/Metrics.Tests/OwinAdapter/OwinExpectedMetrics.cs deleted file mode 100644 index f04f6f85..00000000 --- a/Src/Metrics.Tests/OwinAdapter/OwinExpectedMetrics.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace Metrics.Tests.OwinAdapter -{ - public class OwinExpectedMetrics - { - public int TimePerRequestMilliseconds { get; private set; } - public int ErrorCount { get; private set; } - public int RequestCount { get; private set; } - - // the test registry reuses the same timer instance - // expect (2 * actual requests) timer requests - 2 for each request, - // one for the global metric for all requests and one for the metric for each request - - public int TimerRateCount { get { return RequestCount * 2; } } - - public int HistogramCount { get { return RequestCount * 2; } } - public int TotalExecutionTime { get { return TimePerRequestMilliseconds * RequestCount; } } - public long HistogramAverageLower { get { return TotalExecutionTime / HistogramCount; } } - public long HistogramAverageUpper { get { return TimePerRequestMilliseconds * (RequestCount + 1) / HistogramCount; } } - - - public OwinExpectedMetrics(int timePerRequestMilliseconds, int numberOfRequests, int errors) - { - TimePerRequestMilliseconds = timePerRequestMilliseconds; - RequestCount = numberOfRequests; - ErrorCount = errors; - } - } -} \ No newline at end of file diff --git a/Src/Metrics.Tests/OwinAdapter/OwinMetricsTestData.cs b/Src/Metrics.Tests/OwinAdapter/OwinMetricsTestData.cs deleted file mode 100644 index 7c3d7451..00000000 --- a/Src/Metrics.Tests/OwinAdapter/OwinMetricsTestData.cs +++ /dev/null @@ -1,89 +0,0 @@ -using System.Net; -using System.Net.Http; -using FluentAssertions; -using Metrics.Core; -using Metrics.Tests.TestUtils; -using Microsoft.Owin.Testing; -using Owin; -using Owin.Metrics; - -namespace Metrics.Tests.OwinAdapter -{ - public class OwinMetricsTestData - { - public TestClock Clock { get; private set; } - public TimerMetric TimerMetric { get; private set; } - public TestCounter CounterMetric { get; private set; } - public HistogramMetric HistogramMetric { get; private set; } - public MeterMetric MeterMetric { get; private set; } - - public OwinExpectedMetrics ExpectedResults { get; private set; } - - public OwinMetricsTestData() - { - const int timePerRequest = 100; - const string json = "{ 'id': '1'} "; - - Clock = new TestClock(); - var scheduler = new TestScheduler(Clock); - TimerMetric = new TimerMetric(SamplingType.SlidingWindow, new MeterMetric(Clock, scheduler), Clock); - CounterMetric = new TestCounter(); - HistogramMetric = new HistogramMetric(); - MeterMetric = new MeterMetric(Clock, scheduler); - - var server = TestServer.Create(app => - { - var registery = new TestRegistry - { - TimerInstance = TimerMetric, - CounterInstance = CounterMetric, - HistogramInstance = HistogramMetric, - MeterInstance = MeterMetric - }; - - OwinMetricsConfig owin = new OwinMetricsConfig(middleware => app.Use(middleware), registery, Metric.Config.HealthStatus); - owin.WithRequestMetricsConfig(c => c.RegisterAllMetrics()); - - app.Run(context => - { - Clock.Advance(TimeUnit.Milliseconds, timePerRequest); - if (context.Request.Path.ToString() == "/test/action") - { - return context.Response.WriteAsync("response"); - } - - if (context.Request.Path.ToString() == "/test/error") - { - context.Response.StatusCode = 500; - return context.Response.WriteAsync("response"); - } - - if (context.Request.Path.ToString() == "/test/size") - { - return context.Response.WriteAsync("response"); - } - - if (context.Request.Path.ToString() == "/test/post") - { - return context.Response.WriteAsync("response"); - } - - context.Response.StatusCode = 404; - return context.Response.WriteAsync("not found"); - }); - - }); - - ExpectedResults = new OwinExpectedMetrics(timePerRequest, 6, 1); - - server.HttpClient.GetAsync("http://local.test/test/error").Result.StatusCode.Should().Be(HttpStatusCode.InternalServerError); - server.HttpClient.GetAsync("http://local.test/test/action").Result.StatusCode.Should().Be(HttpStatusCode.OK); - server.HttpClient.GetAsync("http://local.test/test/action").Result.StatusCode.Should().Be(HttpStatusCode.OK); - server.HttpClient.GetAsync("http://local.test/test/action").Result.StatusCode.Should().Be(HttpStatusCode.OK); - server.HttpClient.GetAsync("http://local.test/test/action").Result.StatusCode.Should().Be(HttpStatusCode.OK); - var postContent = new StringContent(json); - postContent.Headers.Add("Content-Length", json.Length.ToString()); - server.HttpClient.PostAsync("http://local.test/test/post", postContent); - } - } -} \ No newline at end of file diff --git a/Src/Metrics.Tests/OwinAdapter/OwinMiddlewareTests.cs b/Src/Metrics.Tests/OwinAdapter/OwinMiddlewareTests.cs deleted file mode 100644 index a6b6dc66..00000000 --- a/Src/Metrics.Tests/OwinAdapter/OwinMiddlewareTests.cs +++ /dev/null @@ -1,38 +0,0 @@ -using FluentAssertions; -using Xunit; - -namespace Metrics.Tests.OwinAdapter -{ - public class OwinMiddlewareTests : IUseFixture - { - private OwinMetricsTestData data; - - [Fact] - public void ShouldBeAbleToRecordErrors() - { - this.data.MeterMetric.Value.Count.Should().Be(data.ExpectedResults.ErrorCount); - } - - [Fact] - public void ShouldBeAbleToRecordActiveRequestCounts() - { - this.data.CounterMetric.Value.Should().Be(data.ExpectedResults.RequestCount); - } - - [Fact] - public void ShouldRecordHistogramMetricsForPostSizeAndTimePerRequest() - { - this.data.TimerMetric.Value.Rate.Count.Should().Be(data.ExpectedResults.TimerRateCount); - this.data.TimerMetric.Value.Histogram.Count.Should().Be(data.ExpectedResults.HistogramCount); - this.data.TimerMetric.Value.Histogram.Max.Should().BeGreaterThan(0); - this.data.TimerMetric.Value.Histogram.Min.Should().BeGreaterThan(0); - this.data.TimerMetric.Value.Histogram.Mean.Should().BeGreaterThan(0); - - } - - public void SetFixture(OwinMetricsTestData metricsTestData) - { - this.data = metricsTestData; - } - } -} diff --git a/Src/Metrics.Tests/packages.config b/Src/Metrics.Tests/packages.config index 0d0c5069..edcae874 100644 --- a/Src/Metrics.Tests/packages.config +++ b/Src/Metrics.Tests/packages.config @@ -1,8 +1,8 @@  - + - - + + \ No newline at end of file From 22aa8c4d934eec66e18dcc8d9b4b885fb65ed6ef Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Sat, 16 Aug 2014 14:13:28 +0300 Subject: [PATCH 05/40] switch xunit nuget to net4.0 --- Src/Metrics.Tests/Metrics.Tests.csproj | 3 ++- Src/Metrics.Tests/packages.config | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Src/Metrics.Tests/Metrics.Tests.csproj b/Src/Metrics.Tests/Metrics.Tests.csproj index 0534aa86..1bf9ebf2 100644 --- a/Src/Metrics.Tests/Metrics.Tests.csproj +++ b/Src/Metrics.Tests/Metrics.Tests.csproj @@ -91,7 +91,8 @@ - + + False ..\..\packages\xunit.1.9.2\lib\net20\xunit.dll diff --git a/Src/Metrics.Tests/packages.config b/Src/Metrics.Tests/packages.config index edcae874..1ada558d 100644 --- a/Src/Metrics.Tests/packages.config +++ b/Src/Metrics.Tests/packages.config @@ -4,5 +4,5 @@ - + \ No newline at end of file From 476038a1bdcca835f1613824b91d435cdf7dd8d9 Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Sat, 16 Aug 2014 14:14:31 +0300 Subject: [PATCH 06/40] retarget nuget for log4net to .net40 --- Samples/Metrics.SampleReporter/Metrics.SampleReporter.csproj | 3 ++- Samples/Metrics.SampleReporter/packages.config | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Samples/Metrics.SampleReporter/Metrics.SampleReporter.csproj b/Samples/Metrics.SampleReporter/Metrics.SampleReporter.csproj index 680f739a..6176adea 100644 --- a/Samples/Metrics.SampleReporter/Metrics.SampleReporter.csproj +++ b/Samples/Metrics.SampleReporter/Metrics.SampleReporter.csproj @@ -65,7 +65,8 @@ 1591 - + + False ..\..\packages\log4net.2.0.3\lib\net40-full\log4net.dll diff --git a/Samples/Metrics.SampleReporter/packages.config b/Samples/Metrics.SampleReporter/packages.config index 7a8bb621..e25c2bd9 100644 --- a/Samples/Metrics.SampleReporter/packages.config +++ b/Samples/Metrics.SampleReporter/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file From 8b7c513bee1a43fa090b98bd160af799065991c9 Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Sat, 16 Aug 2014 14:23:53 +0300 Subject: [PATCH 07/40] fix runtime version for sample console --- Samples/Metrics.SamplesConsole/App.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Samples/Metrics.SamplesConsole/App.config b/Samples/Metrics.SamplesConsole/App.config index 9c05822f..2d7731d9 100644 --- a/Samples/Metrics.SamplesConsole/App.config +++ b/Samples/Metrics.SamplesConsole/App.config @@ -1,6 +1,6 @@  - + \ No newline at end of file From dc6d080fba4b3301312944a3047ef0e1a67a68e7 Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Sat, 16 Aug 2014 14:24:08 +0300 Subject: [PATCH 08/40] remove owin metrics from tests on net40 --- Src/Metrics.Tests/Metrics.Tests.csproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Src/Metrics.Tests/Metrics.Tests.csproj b/Src/Metrics.Tests/Metrics.Tests.csproj index 1bf9ebf2..aacd3c24 100644 --- a/Src/Metrics.Tests/Metrics.Tests.csproj +++ b/Src/Metrics.Tests/Metrics.Tests.csproj @@ -130,10 +130,6 @@ {fbff51d8-52f4-4eef-8498-122a14b37d6c} Nancy.Metrics - - {025cd6d0-1a1e-4b14-a7db-af5dff887210} - Owin.Metrics - {95e29d40-dbec-49e2-9cc5-26b88966dade} Metrics From 0c840d8777217fa7f4fa0c3a99cbaaa41d4c5800 Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Sat, 16 Aug 2014 14:35:16 +0300 Subject: [PATCH 09/40] remove 4.5 dependencies from tests --- Src/Metrics.Tests/Metrics.Tests.csproj | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/Src/Metrics.Tests/Metrics.Tests.csproj b/Src/Metrics.Tests/Metrics.Tests.csproj index aacd3c24..3111707e 100644 --- a/Src/Metrics.Tests/Metrics.Tests.csproj +++ b/Src/Metrics.Tests/Metrics.Tests.csproj @@ -74,22 +74,8 @@ - - - False - ..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.0\lib\net45\System.Net.Http.Formatting.dll - - - False - ..\..\packages\Microsoft.AspNet.WebApi.Core.5.2.0\lib\net45\System.Web.Http.dll - - - ..\..\packages\Microsoft.AspNet.WebApi.Owin.5.2.0\lib\net45\System.Web.Http.Owin.dll - - - False From 1da2843c4c17a85b7e0f8fcfe6d2a47072a6fe96 Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Sat, 16 Aug 2014 14:35:49 +0300 Subject: [PATCH 10/40] remove samples & mono build conf --- Metrics.sln | 61 ++--------------------------------------------------- 1 file changed, 2 insertions(+), 59 deletions(-) diff --git a/Metrics.sln b/Metrics.sln index 8f72d7c9..761b7ab8 100644 --- a/Metrics.sln +++ b/Metrics.sln @@ -1,8 +1,6 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.30501.0 -MinimumVisualStudioVersion = 10.0.40219.1 +# Visual Studio 2012 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Metrics", "Src\Metrics\Metrics.csproj", "{95E29D40-DBEC-49E2-9CC5-26B88966DADE}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Metrics.Tests", "Src\Metrics.Tests\Metrics.Tests.csproj", "{4E0F8CB9-6919-48B8-8212-BCE75D04E0D9}" @@ -14,12 +12,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{FE317A .nuget\NuGet.targets = .nuget\NuGet.targets EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{30108C17-0671-4786-90D0-0564718C3F70}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Metrics.Samples", "Samples\Metrics.Samples\Metrics.Samples.csproj", "{D08A63D0-F440-477C-9565-1264AE0879D0}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Metrics.SamplesConsole", "Samples\Metrics.SamplesConsole\Metrics.SamplesConsole.csproj", "{7416F90D-FFD6-4E34-8638-5234C8B9EC39}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Adapters", "Adapters", "{443860DA-6378-47D0-A4AE-4E79975C5E1C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nancy.Metrics", "Src\Adapters\Nancy.Metrics\Nancy.Metrics.csproj", "{FBFF51D8-52F4-4EEF-8498-122A14B37D6C}" @@ -28,6 +20,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ProjectSection(SolutionItems) = preProject .travis.yml = .travis.yml build.bat = build.bat + build.net40.bat = build.net40.bat build.sh = build.sh CHANGELOG.md = CHANGELOG.md create-nuget.bat = create-nuget.bat @@ -39,72 +32,28 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution SharedAssemblyInfo.cs = SharedAssemblyInfo.cs EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Metrics.SampleReporter", "Samples\Metrics.SampleReporter\Metrics.SampleReporter.csproj", "{18E808CB-98F9-4754-9872-D3D00F9CE72B}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Metrics.NLog", "Src\Adapters\Metrics.NLog\Metrics.NLog.csproj", "{68F25A01-AF00-4D57-9D1A-81213E4EF56F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU - MonoDebug|Any CPU = MonoDebug|Any CPU - MonoRelease|Any CPU = MonoRelease|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {95E29D40-DBEC-49E2-9CC5-26B88966DADE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {95E29D40-DBEC-49E2-9CC5-26B88966DADE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {95E29D40-DBEC-49E2-9CC5-26B88966DADE}.MonoDebug|Any CPU.ActiveCfg = MonoDebug|Any CPU - {95E29D40-DBEC-49E2-9CC5-26B88966DADE}.MonoDebug|Any CPU.Build.0 = MonoDebug|Any CPU - {95E29D40-DBEC-49E2-9CC5-26B88966DADE}.MonoRelease|Any CPU.ActiveCfg = MonoRelease|Any CPU - {95E29D40-DBEC-49E2-9CC5-26B88966DADE}.MonoRelease|Any CPU.Build.0 = MonoRelease|Any CPU {95E29D40-DBEC-49E2-9CC5-26B88966DADE}.Release|Any CPU.ActiveCfg = Release|Any CPU {95E29D40-DBEC-49E2-9CC5-26B88966DADE}.Release|Any CPU.Build.0 = Release|Any CPU {4E0F8CB9-6919-48B8-8212-BCE75D04E0D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4E0F8CB9-6919-48B8-8212-BCE75D04E0D9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4E0F8CB9-6919-48B8-8212-BCE75D04E0D9}.MonoDebug|Any CPU.ActiveCfg = MonoDebug|Any CPU - {4E0F8CB9-6919-48B8-8212-BCE75D04E0D9}.MonoDebug|Any CPU.Build.0 = MonoDebug|Any CPU - {4E0F8CB9-6919-48B8-8212-BCE75D04E0D9}.MonoRelease|Any CPU.ActiveCfg = MonoRelease|Any CPU - {4E0F8CB9-6919-48B8-8212-BCE75D04E0D9}.MonoRelease|Any CPU.Build.0 = MonoRelease|Any CPU {4E0F8CB9-6919-48B8-8212-BCE75D04E0D9}.Release|Any CPU.ActiveCfg = Release|Any CPU {4E0F8CB9-6919-48B8-8212-BCE75D04E0D9}.Release|Any CPU.Build.0 = Release|Any CPU - {D08A63D0-F440-477C-9565-1264AE0879D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D08A63D0-F440-477C-9565-1264AE0879D0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D08A63D0-F440-477C-9565-1264AE0879D0}.MonoDebug|Any CPU.ActiveCfg = MonoDebug|Any CPU - {D08A63D0-F440-477C-9565-1264AE0879D0}.MonoDebug|Any CPU.Build.0 = MonoDebug|Any CPU - {D08A63D0-F440-477C-9565-1264AE0879D0}.MonoRelease|Any CPU.ActiveCfg = MonoRelease|Any CPU - {D08A63D0-F440-477C-9565-1264AE0879D0}.MonoRelease|Any CPU.Build.0 = MonoRelease|Any CPU - {D08A63D0-F440-477C-9565-1264AE0879D0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D08A63D0-F440-477C-9565-1264AE0879D0}.Release|Any CPU.Build.0 = Release|Any CPU - {7416F90D-FFD6-4E34-8638-5234C8B9EC39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7416F90D-FFD6-4E34-8638-5234C8B9EC39}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7416F90D-FFD6-4E34-8638-5234C8B9EC39}.MonoDebug|Any CPU.ActiveCfg = MonoDebug|Any CPU - {7416F90D-FFD6-4E34-8638-5234C8B9EC39}.MonoDebug|Any CPU.Build.0 = MonoDebug|Any CPU - {7416F90D-FFD6-4E34-8638-5234C8B9EC39}.MonoRelease|Any CPU.ActiveCfg = MonoRelease|Any CPU - {7416F90D-FFD6-4E34-8638-5234C8B9EC39}.MonoRelease|Any CPU.Build.0 = MonoRelease|Any CPU - {7416F90D-FFD6-4E34-8638-5234C8B9EC39}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7416F90D-FFD6-4E34-8638-5234C8B9EC39}.Release|Any CPU.Build.0 = Release|Any CPU {FBFF51D8-52F4-4EEF-8498-122A14B37D6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FBFF51D8-52F4-4EEF-8498-122A14B37D6C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FBFF51D8-52F4-4EEF-8498-122A14B37D6C}.MonoDebug|Any CPU.ActiveCfg = MonoDebug|Any CPU - {FBFF51D8-52F4-4EEF-8498-122A14B37D6C}.MonoDebug|Any CPU.Build.0 = MonoDebug|Any CPU - {FBFF51D8-52F4-4EEF-8498-122A14B37D6C}.MonoRelease|Any CPU.ActiveCfg = MonoRelease|Any CPU - {FBFF51D8-52F4-4EEF-8498-122A14B37D6C}.MonoRelease|Any CPU.Build.0 = MonoRelease|Any CPU {FBFF51D8-52F4-4EEF-8498-122A14B37D6C}.Release|Any CPU.ActiveCfg = Release|Any CPU {FBFF51D8-52F4-4EEF-8498-122A14B37D6C}.Release|Any CPU.Build.0 = Release|Any CPU - {18E808CB-98F9-4754-9872-D3D00F9CE72B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {18E808CB-98F9-4754-9872-D3D00F9CE72B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {18E808CB-98F9-4754-9872-D3D00F9CE72B}.MonoDebug|Any CPU.ActiveCfg = MonoDebug|Any CPU - {18E808CB-98F9-4754-9872-D3D00F9CE72B}.MonoDebug|Any CPU.Build.0 = MonoDebug|Any CPU - {18E808CB-98F9-4754-9872-D3D00F9CE72B}.MonoRelease|Any CPU.ActiveCfg = MonoRelease|Any CPU - {18E808CB-98F9-4754-9872-D3D00F9CE72B}.MonoRelease|Any CPU.Build.0 = MonoRelease|Any CPU - {18E808CB-98F9-4754-9872-D3D00F9CE72B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {18E808CB-98F9-4754-9872-D3D00F9CE72B}.Release|Any CPU.Build.0 = Release|Any CPU {68F25A01-AF00-4D57-9D1A-81213E4EF56F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {68F25A01-AF00-4D57-9D1A-81213E4EF56F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {68F25A01-AF00-4D57-9D1A-81213E4EF56F}.MonoDebug|Any CPU.ActiveCfg = MonoDebug|Any CPU - {68F25A01-AF00-4D57-9D1A-81213E4EF56F}.MonoDebug|Any CPU.Build.0 = MonoDebug|Any CPU - {68F25A01-AF00-4D57-9D1A-81213E4EF56F}.MonoRelease|Any CPU.ActiveCfg = MonoRelease|Any CPU - {68F25A01-AF00-4D57-9D1A-81213E4EF56F}.MonoRelease|Any CPU.Build.0 = MonoRelease|Any CPU {68F25A01-AF00-4D57-9D1A-81213E4EF56F}.Release|Any CPU.ActiveCfg = Release|Any CPU {68F25A01-AF00-4D57-9D1A-81213E4EF56F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection @@ -112,16 +61,10 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {D08A63D0-F440-477C-9565-1264AE0879D0} = {30108C17-0671-4786-90D0-0564718C3F70} - {7416F90D-FFD6-4E34-8638-5234C8B9EC39} = {30108C17-0671-4786-90D0-0564718C3F70} {FBFF51D8-52F4-4EEF-8498-122A14B37D6C} = {443860DA-6378-47D0-A4AE-4E79975C5E1C} - {18E808CB-98F9-4754-9872-D3D00F9CE72B} = {30108C17-0671-4786-90D0-0564718C3F70} {68F25A01-AF00-4D57-9D1A-81213E4EF56F} = {443860DA-6378-47D0-A4AE-4E79975C5E1C} EndGlobalSection GlobalSection(CodealikeProperties) = postSolution SolutionGuid = 169deccf-e8f8-4868-80f4-f7f0bb71cb4b EndGlobalSection - {025CD6D0-1A1E-4B14-A7DB-AF5DFF887210} = {443860DA-6378-47D0-A4AE-4E79975C5E1C} - {828188F9-26C2-4C93-A156-D9EA13D7E2FA} = {30108C17-0671-4786-90D0-0564718C3F70} - EndGlobalSection EndGlobal From db47e5b7a6c5b223632e7bd2eb3130da4f180ed5 Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Sat, 16 Aug 2014 14:35:59 +0300 Subject: [PATCH 11/40] add specific net40 build script --- build.net40.bat | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 build.net40.bat diff --git a/build.net40.bat b/build.net40.bat new file mode 100644 index 00000000..ee54258f --- /dev/null +++ b/build.net40.bat @@ -0,0 +1,16 @@ +.nuget\NuGet.exe restore Metrics.sln + +set MSBUILD="c:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe" +set XUNIT=".\packages\xunit.runners.1.9.2\tools\xunit.console.clr4.exe" + +%MSBUILD% Metrics.Sln /p:Configuration="Debug" +if %errorlevel% neq 0 exit /b %errorlevel% + +%MSBUILD% Metrics.Sln /p:Configuration="Release" +if %errorlevel% neq 0 exit /b %errorlevel% + +%XUNIT% .\bin\Debug\Tests\Metrics.Tests.dll +if %errorlevel% neq 0 exit /b %errorlevel% + +%XUNIT% .\bin\Release\Tests\Metrics.Tests.dll +if %errorlevel% neq 0 exit /b %errorlevel% \ No newline at end of file From 407b07103f5e74eb4892c2c3d2d7dd62be95cfc8 Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Sat, 16 Aug 2014 14:51:20 +0300 Subject: [PATCH 12/40] publish .net40 to nuget --- Metrics.sln | 7 ++-- Publishing/Metrics.NET.net40.nuspec | 22 ++++++++++++ Publishing/NancyFx.Metrics.net40.nuspec | 26 ++++++++++++++ Publishing/push-nuget.bat | 5 ++- SharedAssemblyInfo.cs | 8 ++--- create-nuget.bat | 45 ++++++------------------- 6 files changed, 66 insertions(+), 47 deletions(-) create mode 100644 Publishing/Metrics.NET.net40.nuspec create mode 100644 Publishing/NancyFx.Metrics.net40.nuspec diff --git a/Metrics.sln b/Metrics.sln index 761b7ab8..acf16fd5 100644 --- a/Metrics.sln +++ b/Metrics.sln @@ -19,14 +19,11 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9A42F567-91B0-4FFB-A9AD-DB0D158784EA}" ProjectSection(SolutionItems) = preProject .travis.yml = .travis.yml - build.bat = build.bat build.net40.bat = build.net40.bat - build.sh = build.sh CHANGELOG.md = CHANGELOG.md create-nuget.bat = create-nuget.bat - Publishing\Metrics.NET.nuspec = Publishing\Metrics.NET.nuspec - Publishing\NancyFx.Metrics.nuspec = Publishing\NancyFx.Metrics.nuspec - Publishing\Owin.Metrics.nuspec = Publishing\Owin.Metrics.nuspec + Publishing\Metrics.NET.net40.nuspec = Publishing\Metrics.NET.net40.nuspec + Publishing\NancyFx.Metrics.net40.nuspec = Publishing\NancyFx.Metrics.net40.nuspec Publishing\push-nuget.bat = Publishing\push-nuget.bat README.md = README.md SharedAssemblyInfo.cs = SharedAssemblyInfo.cs diff --git a/Publishing/Metrics.NET.net40.nuspec b/Publishing/Metrics.NET.net40.nuspec new file mode 100644 index 00000000..c4cffa74 --- /dev/null +++ b/Publishing/Metrics.NET.net40.nuspec @@ -0,0 +1,22 @@ + + + + Metrics.NET-net40 + 0.0.1 + Metrics.NET-net40 + iulian.margarintescu + Iulian Margarintescu + https://github.com/etishor/Metrics.NET/blob/master/LICENSE + https://github.com/etishor/Metrics.NET + false + (Legacy .NET 4.0 Version) The library provides support for capturing: Gauges, Counters, Meters, Histograms and Timers + (Legacy .NET 4.0 Version) .NET Port of the Java Metrics Library, a library for collecting metrics. Library also provides Health Checks. + Iulian Margarintescu + metrics, measurements, charts, timer, histogram, duration, graphite, health checks + + + + + + + \ No newline at end of file diff --git a/Publishing/NancyFx.Metrics.net40.nuspec b/Publishing/NancyFx.Metrics.net40.nuspec new file mode 100644 index 00000000..dae728e5 --- /dev/null +++ b/Publishing/NancyFx.Metrics.net40.nuspec @@ -0,0 +1,26 @@ + + + + NancyFx.Metrics-net40 + 0.0.1 + NancyFx.Metrics-net40 + iulian.margarintescu + Iulian Margarintescu + false + (Legacy .NET 4.0 Version) The library provides support for integrating NancyFx with the Metrics.NET Library + (Legacy .NET 4.0 Version) NancyFx adapter for Metrics.NET + Iulian Margarintescu + https://github.com/etishor/Metrics.NET + https://github.com/etishor/Metrics.NET/blob/master/LICENSE + nancy, nancyfx, metrics, measurements, charts, timer, histogram, duration, graphite, health checks + + + + + + + + + + + \ No newline at end of file diff --git a/Publishing/push-nuget.bat b/Publishing/push-nuget.bat index 41738868..7a49cf67 100644 --- a/Publishing/push-nuget.bat +++ b/Publishing/push-nuget.bat @@ -1,3 +1,2 @@ -..\.nuget\NuGet.exe push Metrics.NET.0.1.10.nupkg -..\.nuget\NuGet.exe push NancyFx.Metrics.0.1.10.nupkg -rem ..\.nuget\NuGet.exe push Owin.Metrics.0.1.0.nupkg +..\.nuget\NuGet.exe push Metrics.NET-net40.0.0.1.nupkg +..\.nuget\NuGet.exe push NancyFx.Metrics-net40.0.0.1.nupkg diff --git a/SharedAssemblyInfo.cs b/SharedAssemblyInfo.cs index 96124fca..634c9879 100644 --- a/SharedAssemblyInfo.cs +++ b/SharedAssemblyInfo.cs @@ -3,9 +3,9 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Iulian Margarintescu @ Erata.NET")] -[assembly: AssemblyProduct("Metrics.NET")] +[assembly: AssemblyProduct("Metrics.NET net40")] [assembly: AssemblyCopyright("Copyright Iulian Margarintescu © 2014")] [assembly: ComVisible(false)] -[assembly: AssemblyVersion("0.1.9")] -[assembly: AssemblyFileVersion("0.1.9")] -[assembly: AssemblyInformationalVersion("0.1.9")] \ No newline at end of file +[assembly: AssemblyVersion("0.0.1")] +[assembly: AssemblyFileVersion("0.0.1")] +[assembly: AssemblyInformationalVersion("0.0.1")] \ No newline at end of file diff --git a/create-nuget.bat b/create-nuget.bat index afd619e4..79d5269c 100644 --- a/create-nuget.bat +++ b/create-nuget.bat @@ -1,46 +1,21 @@ rd /S /Q .\Publishing\lib -call build.bat +call build.net40.bat if %errorlevel% neq 0 exit /b %errorlevel% md .\Publishing\lib -md .\Publishing\lib\net451 -md .\Publishing\lib\net45 +md .\Publishing\lib\net40 -copy .\bin\release\metrics.dll .\Publishing\lib\net451\ -copy .\bin\release\metrics.xml .\Publishing\lib\net451\ -copy .\bin\release\metrics.pdb .\Publishing\lib\net451\ +copy .\bin\release\metrics.dll .\Publishing\lib\net40\ +copy .\bin\release\metrics.xml .\Publishing\lib\net40\ +copy .\bin\release\metrics.pdb .\Publishing\lib\net40\ -copy .\bin\MonoRelease\metrics.dll .\Publishing\lib\net45\ -copy .\bin\MonoRelease\metrics.xml .\Publishing\lib\net45\ -copy .\bin\MonoRelease\metrics.pdb .\Publishing\lib\net45\ +copy .\bin\release\nancy.metrics.dll .\Publishing\lib\net40\ +copy .\bin\release\nancy.metrics.xml .\Publishing\lib\net40\ +copy .\bin\release\nancy.metrics.pdb .\Publishing\lib\net40\ -copy .\bin\Net4.0Release\metrics.dll .\Publishing\lib\net40\ -copy .\bin\Net4.0Release\metrics.xml .\Publishing\lib\net40\ -copy .\bin\Net4.0Release\metrics.pdb .\Publishing\lib\net40\ - -copy .\bin\release\nancy.metrics.dll .\Publishing\lib\net451\ -copy .\bin\release\nancy.metrics.xml .\Publishing\lib\net451\ -copy .\bin\release\nancy.metrics.pdb .\Publishing\lib\net451\ - -copy .\bin\MonoRelease\nancy.metrics.dll .\Publishing\lib\net45\ -copy .\bin\MonoRelease\nancy.metrics.xml .\Publishing\lib\net45\ -copy .\bin\MonoRelease\nancy.metrics.pdb .\Publishing\lib\net45\ - -copy .\bin\release\owin.metrics.dll .\Publishing\lib\net451\ -copy .\bin\release\owin.metrics.xml .\Publishing\lib\net451\ -copy .\bin\release\owin.metrics.pdb .\Publishing\lib\net451\ - -copy .\bin\MonoRelease\owin.metrics.dll .\Publishing\lib\net45\ -copy .\bin\MonoRelease\owin.metrics.xml .\Publishing\lib\net45\ -copy .\bin\MonoRelease\owin.metrics.pdb .\Publishing\lib\net45\ - - -.\.nuget\NuGet.exe pack .\Publishing\Metrics.Net.nuspec -OutputDirectory .\Publishing -if %errorlevel% neq 0 exit /b %errorlevel% - -.\.nuget\NuGet.exe pack .\Publishing\NancyFx.Metrics.nuspec -OutputDirectory .\Publishing +.\.nuget\NuGet.exe pack .\Publishing\Metrics.Net.net40.nuspec -OutputDirectory .\Publishing if %errorlevel% neq 0 exit /b %errorlevel% -.\.nuget\NuGet.exe pack .\Publishing\Owin.Metrics.nuspec -OutputDirectory .\Publishing +.\.nuget\NuGet.exe pack .\Publishing\NancyFx.Metrics.net40.nuspec -OutputDirectory .\Publishing if %errorlevel% neq 0 exit /b %errorlevel% \ No newline at end of file From 169ea97bdbc5a15b9fc166592c864d77a21a6ccb Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Thu, 18 Sep 2014 10:49:21 +0300 Subject: [PATCH 13/40] use same version as 4.5 version --- Publishing/Metrics.NET.net40.nuspec | 2 +- Publishing/NancyFx.Metrics.net40.nuspec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Publishing/Metrics.NET.net40.nuspec b/Publishing/Metrics.NET.net40.nuspec index c4cffa74..38f4785c 100644 --- a/Publishing/Metrics.NET.net40.nuspec +++ b/Publishing/Metrics.NET.net40.nuspec @@ -2,7 +2,7 @@ Metrics.NET-net40 - 0.0.1 + 0.2.0-pre Metrics.NET-net40 iulian.margarintescu Iulian Margarintescu diff --git a/Publishing/NancyFx.Metrics.net40.nuspec b/Publishing/NancyFx.Metrics.net40.nuspec index dae728e5..6167e40f 100644 --- a/Publishing/NancyFx.Metrics.net40.nuspec +++ b/Publishing/NancyFx.Metrics.net40.nuspec @@ -2,7 +2,7 @@ NancyFx.Metrics-net40 - 0.0.1 + 0.2.0-pre NancyFx.Metrics-net40 iulian.margarintescu Iulian Margarintescu @@ -14,7 +14,7 @@ https://github.com/etishor/Metrics.NET/blob/master/LICENSE nancy, nancyfx, metrics, measurements, charts, timer, histogram, duration, graphite, health checks - + From acfdf4acc1cc28e7cb79d96809f03b059bee1699 Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Sat, 20 Sep 2014 14:58:16 +0300 Subject: [PATCH 14/40] fix net40 tests --- Src/Metrics.Tests/Metrics.Tests.csproj | 31 +++----------------------- Src/Metrics.Tests/packages.config | 1 + 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/Src/Metrics.Tests/Metrics.Tests.csproj b/Src/Metrics.Tests/Metrics.Tests.csproj index 3bdf2bfc..c90c62b3 100644 --- a/Src/Metrics.Tests/Metrics.Tests.csproj +++ b/Src/Metrics.Tests/Metrics.Tests.csproj @@ -64,18 +64,6 @@ False ..\..\packages\FluentAssertions.3.2.1\lib\net40\FluentAssertions.Core.dll - - False - ..\..\packages\Microsoft.Owin.3.0.0\lib\net45\Microsoft.Owin.dll - - - False - ..\..\packages\Microsoft.Owin.Hosting.3.0.0\lib\net45\Microsoft.Owin.Hosting.dll - - - False - ..\..\packages\Microsoft.Owin.Testing.3.0.0\lib\net45\Microsoft.Owin.Testing.dll - False ..\..\packages\Nancy.0.23.2\lib\net40\Nancy.dll @@ -84,31 +72,18 @@ False ..\..\packages\Nancy.Testing.0.23.2\lib\net40\Nancy.Testing.dll - - False - ..\..\packages\Newtonsoft.Json.6.0.5\lib\net45\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.6.0.5\lib\net40\Newtonsoft.Json.dll + + False ..\..\packages\Owin.1.0\lib\net40\Owin.dll - - - False - ..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.2\lib\net45\System.Net.Http.Formatting.dll - - - False - ..\..\packages\Microsoft.AspNet.WebApi.Core.5.2.2\lib\net45\System.Web.Http.dll - - - False - ..\..\packages\Microsoft.AspNet.WebApi.Owin.5.2.2\lib\net45\System.Web.Http.Owin.dll - diff --git a/Src/Metrics.Tests/packages.config b/Src/Metrics.Tests/packages.config index 593a0559..08baea96 100644 --- a/Src/Metrics.Tests/packages.config +++ b/Src/Metrics.Tests/packages.config @@ -4,5 +4,6 @@ + \ No newline at end of file From f62317e7700305f806593b0d1c04e22dbd3d0cb3 Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Sat, 20 Sep 2014 15:01:08 +0300 Subject: [PATCH 15/40] bump version, push to nuget --- Publishing/Metrics.NET.net40.nuspec | 2 +- Publishing/NancyFx.Metrics.net40.nuspec | 4 ++-- Publishing/push-nuget.bat | 4 ++-- SharedAssemblyInfo.cs | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Publishing/Metrics.NET.net40.nuspec b/Publishing/Metrics.NET.net40.nuspec index 38f4785c..eae7aba2 100644 --- a/Publishing/Metrics.NET.net40.nuspec +++ b/Publishing/Metrics.NET.net40.nuspec @@ -2,7 +2,7 @@ Metrics.NET-net40 - 0.2.0-pre + 0.2.0 Metrics.NET-net40 iulian.margarintescu Iulian Margarintescu diff --git a/Publishing/NancyFx.Metrics.net40.nuspec b/Publishing/NancyFx.Metrics.net40.nuspec index 6167e40f..ca0a69c9 100644 --- a/Publishing/NancyFx.Metrics.net40.nuspec +++ b/Publishing/NancyFx.Metrics.net40.nuspec @@ -2,7 +2,7 @@ NancyFx.Metrics-net40 - 0.2.0-pre + 0.2.0 NancyFx.Metrics-net40 iulian.margarintescu Iulian Margarintescu @@ -14,7 +14,7 @@ https://github.com/etishor/Metrics.NET/blob/master/LICENSE nancy, nancyfx, metrics, measurements, charts, timer, histogram, duration, graphite, health checks - + diff --git a/Publishing/push-nuget.bat b/Publishing/push-nuget.bat index 18419828..452f4d0b 100644 --- a/Publishing/push-nuget.bat +++ b/Publishing/push-nuget.bat @@ -1,2 +1,2 @@ -..\.nuget\NuGet.exe push Metrics.NET-net40.0.2.1-pre.nupkg -..\.nuget\NuGet.exe push NancyFx.Metrics-net40.0.2.1-pre.nupkg \ No newline at end of file +..\.nuget\NuGet.exe push Metrics.NET-net40.0.2.0.nupkg +..\.nuget\NuGet.exe push NancyFx.Metrics-net40.0.2.0.nupkg \ No newline at end of file diff --git a/SharedAssemblyInfo.cs b/SharedAssemblyInfo.cs index 2dc16703..7debc660 100644 --- a/SharedAssemblyInfo.cs +++ b/SharedAssemblyInfo.cs @@ -6,6 +6,6 @@ [assembly: AssemblyProduct("Metrics.NET net40")] [assembly: AssemblyCopyright("Copyright Iulian Margarintescu © 2014")] [assembly: ComVisible(false)] -[assembly: AssemblyVersion("0.1.11")] -[assembly: AssemblyFileVersion("0.1.11")] -[assembly: AssemblyInformationalVersion("0.1.11")] +[assembly: AssemblyVersion("0.2.0")] +[assembly: AssemblyFileVersion("0.2.0")] +[assembly: AssemblyInformationalVersion("0.2.0")] From 902386d61a77bdd27d625d96a158c0be23c8a2ac Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Thu, 25 Sep 2014 00:47:52 +0300 Subject: [PATCH 16/40] bump version, push to nuget --- Publishing/Metrics.NET.net40.nuspec | 2 +- Publishing/NancyFx.Metrics.net40.nuspec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Publishing/Metrics.NET.net40.nuspec b/Publishing/Metrics.NET.net40.nuspec index eae7aba2..db38b879 100644 --- a/Publishing/Metrics.NET.net40.nuspec +++ b/Publishing/Metrics.NET.net40.nuspec @@ -2,7 +2,7 @@ Metrics.NET-net40 - 0.2.0 + 0.2.1 Metrics.NET-net40 iulian.margarintescu Iulian Margarintescu diff --git a/Publishing/NancyFx.Metrics.net40.nuspec b/Publishing/NancyFx.Metrics.net40.nuspec index ca0a69c9..99994f23 100644 --- a/Publishing/NancyFx.Metrics.net40.nuspec +++ b/Publishing/NancyFx.Metrics.net40.nuspec @@ -2,7 +2,7 @@ NancyFx.Metrics-net40 - 0.2.0 + 0.2.1 NancyFx.Metrics-net40 iulian.margarintescu Iulian Margarintescu @@ -14,7 +14,7 @@ https://github.com/etishor/Metrics.NET/blob/master/LICENSE nancy, nancyfx, metrics, measurements, charts, timer, histogram, duration, graphite, health checks - + From 7f160a3c1c848efccf9fb52fbe34f7306f1be8b8 Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Sat, 27 Sep 2014 15:03:54 +0300 Subject: [PATCH 17/40] fix tests csproj --- Src/Metrics.Tests/Metrics.Tests.csproj | 2 -- 1 file changed, 2 deletions(-) diff --git a/Src/Metrics.Tests/Metrics.Tests.csproj b/Src/Metrics.Tests/Metrics.Tests.csproj index 3aa5ca19..ba14b1f6 100644 --- a/Src/Metrics.Tests/Metrics.Tests.csproj +++ b/Src/Metrics.Tests/Metrics.Tests.csproj @@ -109,9 +109,7 @@ - - From bf786c126bb8df80e950c820c1e86e7c8cf039ad Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Sat, 27 Sep 2014 15:06:06 +0300 Subject: [PATCH 18/40] bump version, push to nuget --- Publishing/Metrics.NET.net40.nuspec | 2 +- Publishing/NancyFx.Metrics.net40.nuspec | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Publishing/Metrics.NET.net40.nuspec b/Publishing/Metrics.NET.net40.nuspec index db38b879..41fd3f94 100644 --- a/Publishing/Metrics.NET.net40.nuspec +++ b/Publishing/Metrics.NET.net40.nuspec @@ -2,7 +2,7 @@ Metrics.NET-net40 - 0.2.1 + 0.2.2 Metrics.NET-net40 iulian.margarintescu Iulian Margarintescu diff --git a/Publishing/NancyFx.Metrics.net40.nuspec b/Publishing/NancyFx.Metrics.net40.nuspec index 99994f23..d0e523e3 100644 --- a/Publishing/NancyFx.Metrics.net40.nuspec +++ b/Publishing/NancyFx.Metrics.net40.nuspec @@ -2,8 +2,8 @@ NancyFx.Metrics-net40 - 0.2.1 - NancyFx.Metrics-net40 + 0.2.2 + Nancy.Metrics-net40 iulian.margarintescu Iulian Margarintescu false @@ -14,7 +14,7 @@ https://github.com/etishor/Metrics.NET/blob/master/LICENSE nancy, nancyfx, metrics, measurements, charts, timer, histogram, duration, graphite, health checks - + From fb7653573d2a39ea7506704f5df4d2e5317d9040 Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Mon, 29 Sep 2014 18:17:17 +0300 Subject: [PATCH 19/40] added icon to nuget packages --- Publishing/Metrics.NET.net40.nuspec | 1 + Publishing/NancyFx.Metrics.net40.nuspec | 1 + 2 files changed, 2 insertions(+) diff --git a/Publishing/Metrics.NET.net40.nuspec b/Publishing/Metrics.NET.net40.nuspec index 41fd3f94..3f191534 100644 --- a/Publishing/Metrics.NET.net40.nuspec +++ b/Publishing/Metrics.NET.net40.nuspec @@ -8,6 +8,7 @@ Iulian Margarintescu https://github.com/etishor/Metrics.NET/blob/master/LICENSE https://github.com/etishor/Metrics.NET + http://www.erata.net/Metrics.NET/metrics_32.png false (Legacy .NET 4.0 Version) The library provides support for capturing: Gauges, Counters, Meters, Histograms and Timers (Legacy .NET 4.0 Version) .NET Port of the Java Metrics Library, a library for collecting metrics. Library also provides Health Checks. diff --git a/Publishing/NancyFx.Metrics.net40.nuspec b/Publishing/NancyFx.Metrics.net40.nuspec index d0e523e3..5b8bca2e 100644 --- a/Publishing/NancyFx.Metrics.net40.nuspec +++ b/Publishing/NancyFx.Metrics.net40.nuspec @@ -12,6 +12,7 @@ Iulian Margarintescu https://github.com/etishor/Metrics.NET https://github.com/etishor/Metrics.NET/blob/master/LICENSE + http://www.erata.net/Metrics.NET/metrics_32.png nancy, nancyfx, metrics, measurements, charts, timer, histogram, duration, graphite, health checks From a7a711607031e65a9820a3a062e187d497bf193c Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Wed, 1 Oct 2014 21:06:42 +0300 Subject: [PATCH 20/40] update version, push to nuget --- Publishing/Metrics.NET.net40.nuspec | 2 +- Publishing/NancyFx.Metrics.net40.nuspec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Publishing/Metrics.NET.net40.nuspec b/Publishing/Metrics.NET.net40.nuspec index 3f191534..b73a38fd 100644 --- a/Publishing/Metrics.NET.net40.nuspec +++ b/Publishing/Metrics.NET.net40.nuspec @@ -2,7 +2,7 @@ Metrics.NET-net40 - 0.2.2 + 0.2.3 Metrics.NET-net40 iulian.margarintescu Iulian Margarintescu diff --git a/Publishing/NancyFx.Metrics.net40.nuspec b/Publishing/NancyFx.Metrics.net40.nuspec index 5b8bca2e..ecebf32c 100644 --- a/Publishing/NancyFx.Metrics.net40.nuspec +++ b/Publishing/NancyFx.Metrics.net40.nuspec @@ -2,7 +2,7 @@ NancyFx.Metrics-net40 - 0.2.2 + 0.2.3 Nancy.Metrics-net40 iulian.margarintescu Iulian Margarintescu @@ -15,7 +15,7 @@ http://www.erata.net/Metrics.NET/metrics_32.png nancy, nancyfx, metrics, measurements, charts, timer, histogram, duration, graphite, health checks - + From 668ffe183daaa195d484ef027a7eac9ee11b407b Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Wed, 1 Oct 2014 21:06:58 +0300 Subject: [PATCH 21/40] remove owin sample --- Samples/Owin.Sample/App.config | 34 ---- .../Controllers/SampleController.cs | 21 --- .../Controllers/SampleIgnoreController.cs | 15 -- Samples/Owin.Sample/Owin.Sample.csproj | 149 ------------------ Samples/Owin.Sample/Program.cs | 32 ---- .../Owin.Sample/Properties/AssemblyInfo.cs | 36 ----- .../SetOwinRouteTemplateMessageHandler.cs | 43 ----- Samples/Owin.Sample/Startup.cs | 49 ------ Samples/Owin.Sample/packages.config | 15 -- 9 files changed, 394 deletions(-) delete mode 100644 Samples/Owin.Sample/App.config delete mode 100644 Samples/Owin.Sample/Controllers/SampleController.cs delete mode 100644 Samples/Owin.Sample/Controllers/SampleIgnoreController.cs delete mode 100644 Samples/Owin.Sample/Owin.Sample.csproj delete mode 100644 Samples/Owin.Sample/Program.cs delete mode 100644 Samples/Owin.Sample/Properties/AssemblyInfo.cs delete mode 100644 Samples/Owin.Sample/SetOwinRouteTemplateMessageHandler.cs delete mode 100644 Samples/Owin.Sample/Startup.cs delete mode 100644 Samples/Owin.Sample/packages.config diff --git a/Samples/Owin.Sample/App.config b/Samples/Owin.Sample/App.config deleted file mode 100644 index c9f62492..00000000 --- a/Samples/Owin.Sample/App.config +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Samples/Owin.Sample/Controllers/SampleController.cs b/Samples/Owin.Sample/Controllers/SampleController.cs deleted file mode 100644 index 7bc7a0cc..00000000 --- a/Samples/Owin.Sample/Controllers/SampleController.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Collections.Generic; -using System.Web.Http; - -namespace Owin.Sample.Controllers -{ - [RoutePrefix("sample")] - public class SampleController : ApiController - { - [Route("")] - public IEnumerable Get() - { - return new[] { "value1", "value2" }; - } - - [Route("withparams/{x}/{y}")] - public IEnumerable Get(int x, string y) - { - return new[] { "value1", "value2" }; - } - } -} diff --git a/Samples/Owin.Sample/Controllers/SampleIgnoreController.cs b/Samples/Owin.Sample/Controllers/SampleIgnoreController.cs deleted file mode 100644 index 882d5766..00000000 --- a/Samples/Owin.Sample/Controllers/SampleIgnoreController.cs +++ /dev/null @@ -1,15 +0,0 @@ - -namespace Owin.Sample.Controllers -{ - using System.Web.Http; - - [RoutePrefix("sampleignore")] - public class SampleIgnoreController : ApiController - { - [Route("")] - public string Get() - { - return "get"; - } - } -} diff --git a/Samples/Owin.Sample/Owin.Sample.csproj b/Samples/Owin.Sample/Owin.Sample.csproj deleted file mode 100644 index 8df9faae..00000000 --- a/Samples/Owin.Sample/Owin.Sample.csproj +++ /dev/null @@ -1,149 +0,0 @@ - - - - - Debug - AnyCPU - {828188F9-26C2-4C93-A156-D9EA13D7E2FA} - Exe - Properties - Owin.Sample - Owin.Sample - v4.0 - 512 - ..\..\ - true - - - - AnyCPU - true - full - false - ..\..\bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - ..\..\bin\Release\ - TRACE - prompt - 4 - - - AnyCPU - true - full - false - v4.5 - ..\..\bin\MonoDebug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - v4.5 - ..\..\bin\MonoRelease\ - TRACE - prompt - 4 - - - - False - ..\..\packages\Microsoft.Owin.3.0.0\lib\net45\Microsoft.Owin.dll - - - False - ..\..\packages\Microsoft.Owin.Cors.3.0.0\lib\net45\Microsoft.Owin.Cors.dll - - - False - ..\..\packages\Microsoft.Owin.Host.HttpListener.3.0.0\lib\net45\Microsoft.Owin.Host.HttpListener.dll - - - False - ..\..\packages\Microsoft.Owin.Hosting.3.0.0\lib\net45\Microsoft.Owin.Hosting.dll - - - False - ..\..\packages\Newtonsoft.Json.6.0.5\lib\net45\Newtonsoft.Json.dll - - - ..\..\packages\Owin.1.0\lib\net40\Owin.dll - - - - - - False - ..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.2\lib\net45\System.Net.Http.Formatting.dll - - - - False - ..\..\packages\Microsoft.AspNet.Cors.5.2.2\lib\net45\System.Web.Cors.dll - - - False - ..\..\packages\Microsoft.AspNet.WebApi.Core.5.2.2\lib\net45\System.Web.Http.dll - - - False - ..\..\packages\Microsoft.AspNet.WebApi.Owin.5.2.2\lib\net45\System.Web.Http.Owin.dll - - - False - ..\..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.2\lib\net45\System.Web.Http.WebHost.dll - - - - - - - - - - - - - - - - - - - - - - {95e29d40-dbec-49e2-9cc5-26b88966dade} - Metrics - - - {d08a63d0-f440-477c-9565-1264ae0879d0} - Metrics.Samples - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - \ No newline at end of file diff --git a/Samples/Owin.Sample/Program.cs b/Samples/Owin.Sample/Program.cs deleted file mode 100644 index 1fdadb89..00000000 --- a/Samples/Owin.Sample/Program.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Metrics.Samples; -using Metrics.Utils; -using Microsoft.Owin.Hosting; -using System; -using System.Diagnostics; - -namespace Owin.Sample -{ - public class Program - { - static void Main(string[] args) - { - const string url = "http://localhost:1234/"; - - using (var scheduler = new ActionScheduler()) - { - using (WebApp.Start(url)) - { - Console.WriteLine("Owin Running at {0}", url); - Console.WriteLine("Press any key to exit"); - Process.Start(string.Format("{0}metrics", url)); - - SampleMetrics.RunSomeRequests(); - - scheduler.Start(TimeSpan.FromMilliseconds(500), () => SampleMetrics.RunSomeRequests()); - - Console.ReadKey(); - } - } - } - } -} diff --git a/Samples/Owin.Sample/Properties/AssemblyInfo.cs b/Samples/Owin.Sample/Properties/AssemblyInfo.cs deleted file mode 100644 index b793163c..00000000 --- a/Samples/Owin.Sample/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -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("WebApi.Sample")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("WebApi.Sample")] -[assembly: AssemblyCopyright("Copyright © 2014")] -[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("4118530f-7ae9-4639-b9ce-6e64c404ea8f")] - -// 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/Samples/Owin.Sample/SetOwinRouteTemplateMessageHandler.cs b/Samples/Owin.Sample/SetOwinRouteTemplateMessageHandler.cs deleted file mode 100644 index 09677313..00000000 --- a/Samples/Owin.Sample/SetOwinRouteTemplateMessageHandler.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using System.Web.Http.Routing; - -namespace Owin.Sample -{ - public class SetOwinRouteTemplateMessageHandler : DelegatingHandler - { - /// - /// Sends an HTTP request to the inner handler to send to the server as an asynchronous operation. - /// - /// The HTTP request message to send to the server. - /// A cancellation token to cancel operation. - /// - /// Returns . The task object representing the asynchronous operation. - /// - protected override Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) - { - var owinContext = request.GetOwinContext(); - - if (owinContext == null) return base.SendAsync(request, cancellationToken); - - var routes = request.GetConfiguration().Routes; - - if (routes == null) return base.SendAsync(request, cancellationToken); - - var routeData = routes.GetRouteData(request); - - if (routeData == null) return base.SendAsync(request, cancellationToken); - - var subRoutes = routeData.Values["MS_SubRoutes"] as IHttpRouteData[]; - - if (subRoutes == null) return base.SendAsync(request, cancellationToken); - - var routeTemplate = subRoutes[0].Route.RouteTemplate; - - owinContext.Environment.Add("metrics-net.routetemplate", routeTemplate); - - return base.SendAsync(request, cancellationToken); - } - } -} diff --git a/Samples/Owin.Sample/Startup.cs b/Samples/Owin.Sample/Startup.cs deleted file mode 100644 index abef397e..00000000 --- a/Samples/Owin.Sample/Startup.cs +++ /dev/null @@ -1,49 +0,0 @@ -using Metrics; -using System; -using System.Text.RegularExpressions; -using System.Web.Http; -using Microsoft.Owin.Cors; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; -using Owin.Metrics; - -namespace Owin.Sample -{ - public class Startup - { - - public void Configuration(IAppBuilder app) - { - JsonConvert.DefaultSettings = () => new JsonSerializerSettings - { - Formatting = Formatting.Indented, - ContractResolver = new CamelCasePropertyNamesContractResolver() - }; - - app.UseCors(CorsOptions.AllowAll); - - var httpconfig = new HttpConfiguration(); - httpconfig.MapHttpAttributeRoutes(); - - // Sets the route template for the current request in the OWIN context - httpconfig.MessageHandlers.Add(new SetOwinRouteTemplateMessageHandler()); - - Metric.Config - .WithAllCounters() - .WithReporting(r => r.WithConsoleReport(TimeSpan.FromSeconds(30))) - .WithOwin(middleware => app.Use(middleware), config => config - .WithRequestMetricsConfig(c => c.WithAllOwinMetrics(), new[] - { - new Regex("(?i)^sampleignore"), - new Regex("(?i)^metrics"), - new Regex("(?i)^health"), - new Regex("(?i)^json") - }) - .WithMetricsEndpoint() - ); - - app.UseWebApi(httpconfig); - } - - } -} diff --git a/Samples/Owin.Sample/packages.config b/Samples/Owin.Sample/packages.config deleted file mode 100644 index 8b5b189a..00000000 --- a/Samples/Owin.Sample/packages.config +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file From f241c4eec848c71e53eacdb0aae59db76f67a9d3 Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Wed, 8 Oct 2014 18:45:31 +0300 Subject: [PATCH 22/40] bump nuget version --- Publishing/Metrics.NET.net40.nuspec | 2 +- Publishing/NancyFx.Metrics.net40.nuspec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Publishing/Metrics.NET.net40.nuspec b/Publishing/Metrics.NET.net40.nuspec index b73a38fd..e56eec51 100644 --- a/Publishing/Metrics.NET.net40.nuspec +++ b/Publishing/Metrics.NET.net40.nuspec @@ -2,7 +2,7 @@ Metrics.NET-net40 - 0.2.3 + 0.2.4 Metrics.NET-net40 iulian.margarintescu Iulian Margarintescu diff --git a/Publishing/NancyFx.Metrics.net40.nuspec b/Publishing/NancyFx.Metrics.net40.nuspec index ecebf32c..81e4ca65 100644 --- a/Publishing/NancyFx.Metrics.net40.nuspec +++ b/Publishing/NancyFx.Metrics.net40.nuspec @@ -2,7 +2,7 @@ NancyFx.Metrics-net40 - 0.2.3 + 0.2.4 Nancy.Metrics-net40 iulian.margarintescu Iulian Margarintescu @@ -15,7 +15,7 @@ http://www.erata.net/Metrics.NET/metrics_32.png nancy, nancyfx, metrics, measurements, charts, timer, histogram, duration, graphite, health checks - + From ebc919871b34cd29d45b6efe7e474aa5c3ad760f Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Wed, 8 Oct 2014 18:53:11 +0300 Subject: [PATCH 23/40] remove async code --- Src/Metrics/Visualization/FlotWebApp.cs | 11 +- .../Visualization/MetricsHttpListener.cs | 104 ++++++++++-------- 2 files changed, 64 insertions(+), 51 deletions(-) diff --git a/Src/Metrics/Visualization/FlotWebApp.cs b/Src/Metrics/Visualization/FlotWebApp.cs index 83379fd7..9a62e1e7 100644 --- a/Src/Metrics/Visualization/FlotWebApp.cs +++ b/Src/Metrics/Visualization/FlotWebApp.cs @@ -2,7 +2,6 @@ using System.IO; using System.IO.Compression; using System.Reflection; -using System.Threading.Tasks; namespace Metrics.Visualization { @@ -27,11 +26,11 @@ public static string GetFlotApp() public const string FavIconMimeType = "image/png"; - public static async Task WriteFavIcon(Stream output) + public static void WriteFavIcon(Stream output) { using (var stream = Assembly.GetAssembly(typeof(FlotWebApp)).GetManifestResourceStream("Metrics.Visualization.metrics_32.png")) { - await stream.CopyToAsync(output); + stream.CopyTo(output); } } @@ -47,13 +46,13 @@ public static Stream GetAppStream(bool decompress = false) } } - public static async Task WriteFlotAppAsync(Stream output, bool decompress = false) + public static void WriteFlotAppAsync(Stream output, bool decompress = false) { if (!decompress) { using (var stream = Assembly.GetAssembly(typeof(FlotWebApp)).GetManifestResourceStream("Metrics.Visualization.index.full.html.gz")) { - await stream.CopyToAsync(output).ConfigureAwait(false); + stream.CopyTo(output); } } else @@ -61,7 +60,7 @@ public static async Task WriteFlotAppAsync(Stream output, bool decompress = fals using (var stream = Assembly.GetAssembly(typeof(FlotWebApp)).GetManifestResourceStream("Metrics.Visualization.index.full.html.gz")) using (var gzip = new GZipStream(stream, CompressionMode.Decompress)) { - await gzip.CopyToAsync(output).ConfigureAwait(false); + gzip.CopyTo(output); } } } diff --git a/Src/Metrics/Visualization/MetricsHttpListener.cs b/Src/Metrics/Visualization/MetricsHttpListener.cs index 67806ea2..2da01f9b 100644 --- a/Src/Metrics/Visualization/MetricsHttpListener.cs +++ b/Src/Metrics/Visualization/MetricsHttpListener.cs @@ -32,10 +32,10 @@ public MetricsHttpListener(string listenerUriPrefix, MetricsDataProvider metrics public void Start() { this.httpListener.Start(); - Task.Factory.StartNew(async () => await ProcessRequests(), TaskCreationOptions.LongRunning); + Task.Factory.StartNew(ProcessRequests, TaskCreationOptions.LongRunning); } - private async Task ProcessRequests() + private void ProcessRequests() { while (!this.cts.IsCancellationRequested) { @@ -43,10 +43,10 @@ private async Task ProcessRequests() { using (timer.NewContext()) { - var context = await this.httpListener.GetContextAsync(); + var context = this.httpListener.GetContext(); try { - await ProcessRequest(context).ConfigureAwait(false); + ProcessRequest(context); context.Response.Close(); } catch (Exception ex) @@ -71,7 +71,7 @@ private async Task ProcessRequests() } } - private Task ProcessRequest(HttpListenerContext context) + private void ProcessRequest(HttpListenerContext context) { switch (context.Request.RawUrl) { @@ -80,89 +80,100 @@ private Task ProcessRequest(HttpListenerContext context) { context.Response.Redirect(context.Request.Url.ToString() + "/"); context.Response.Close(); - return Task.FromResult(0); } else { - return WriteFlotApp(context); + WriteFlotApp(context); } + break; case "/favicon.ico": - return WriteFavIcon(context); + WriteFavIcon(context); + break; case "/json": - return WriteJsonMetrics(context, this.metricsDataProvider); + WriteJsonMetrics(context, this.metricsDataProvider); + break; case "/v1/json": - return WriteJsonMetricsV1(context, this.metricsDataProvider); + WriteJsonMetricsV1(context, this.metricsDataProvider); + break; case "/v2/json": - return WriteJsonMetricsV2(context, this.metricsDataProvider); - + WriteJsonMetricsV2(context, this.metricsDataProvider); + break; case "/health": - return WriteHealthStatus(context, this.healthStatus); + WriteHealthStatus(context, this.healthStatus); + break; case "/v1/health": - return WriteHealthStatus(context, this.healthStatus); - + WriteHealthStatus(context, this.healthStatus); + break; case "/text": - return WriteTextMetrics(context, this.metricsDataProvider, this.healthStatus); + WriteTextMetrics(context, this.metricsDataProvider, this.healthStatus); + break; case "/ping": - return WritePong(context); + WritePong(context); + break; + default: + WriteNotFound(context); + break; + } - return WriteNotFound(context); } - private static async Task WriteHealthStatus(HttpListenerContext context, Func healthStatus) + private static void WriteHealthStatus(HttpListenerContext context, Func healthStatus) { var status = healthStatus(); var json = JsonHealthChecks.BuildJson(status); - await WriteString(context, json, JsonHealthChecks.HealthChecksMimeType); + WriteString(context, json, JsonHealthChecks.HealthChecksMimeType); context.Response.StatusCode = status.IsHealty ? 200 : 500; context.Response.StatusDescription = status.IsHealty ? "OK" : "Internal Server Error"; } - private static Task WritePong(HttpListenerContext context) + private static void WritePong(HttpListenerContext context) { - return WriteString(context, "pong", "text/plain"); + WriteString(context, "pong", "text/plain"); } - private static async Task WriteNotFound(HttpListenerContext context) + private static void WriteNotFound(HttpListenerContext context) { - await WriteString(context, NotFoundResponse, "text/plain").ConfigureAwait(false); + WriteString(context, NotFoundResponse, "text/plain"); context.Response.StatusCode = 404; context.Response.StatusDescription = "NOT FOUND"; } - private static Task WriteTextMetrics(HttpListenerContext context, MetricsDataProvider metricsDataProvider, Func healthStatus) + private void WriteTextMetrics(HttpListenerContext context, MetricsDataProvider metricsDataProvider, Func healthStatus) { var text = StringReporter.RenderMetrics(metricsDataProvider.CurrentMetricsData, healthStatus); - return WriteString(context, text, "text/plain"); + WriteString(context, text, "text/plain"); } - private static Task WriteJsonMetrics(HttpListenerContext context, MetricsDataProvider metricsDataProvider) + private static void WriteJsonMetrics(HttpListenerContext context, MetricsDataProvider metricsDataProvider) { var acceptHeader = context.Request.Headers["Accept"]; if (acceptHeader.Contains(JsonBuilderV2.MetricsMimeType)) { - return WriteJsonMetricsV2(context, metricsDataProvider); + WriteJsonMetricsV2(context, metricsDataProvider); + } + else + { + WriteJsonMetricsV1(context, metricsDataProvider); } - - return WriteJsonMetricsV1(context, metricsDataProvider); } - private static Task WriteJsonMetricsV1(HttpListenerContext context, MetricsDataProvider metricsDataProvider) + private static void WriteJsonMetricsV1(HttpListenerContext context, MetricsDataProvider metricsDataProvider) { var json = JsonBuilderV1.BuildJson(metricsDataProvider.CurrentMetricsData); jsonSize.Update(json.Length / 1024); - return WriteString(context, json, JsonBuilderV1.MetricsMimeType); + WriteString(context, json, JsonBuilderV1.MetricsMimeType); } - private static Task WriteJsonMetricsV2(HttpListenerContext context, MetricsDataProvider metricsDataProvider) + private static void WriteJsonMetricsV2(HttpListenerContext context, MetricsDataProvider metricsDataProvider) { var json = JsonBuilderV2.BuildJson(metricsDataProvider.CurrentMetricsData); jsonSize.Update(json.Length / 1024); - return WriteString(context, json, JsonBuilderV2.MetricsMimeType); + WriteString(context, json, JsonBuilderV2.MetricsMimeType); } - private static async Task WriteString(HttpListenerContext context, string data, string contentType) + private static void WriteString(HttpListenerContext context, string data, string contentType) { AddCORSHeaders(context.Response); AddNoCacheHeaders(context.Response); @@ -176,28 +187,31 @@ private static async Task WriteString(HttpListenerContext context, string data, { using (var writer = new StreamWriter(context.Response.OutputStream)) { - await writer.WriteAsync(data).ConfigureAwait(false); + writer.Write(data); } } - - context.Response.AddHeader("Content-Encoding", "gzip"); - using (GZipStream gzip = new GZipStream(context.Response.OutputStream, CompressionMode.Compress)) - using (var writer = new StreamWriter(gzip)) + else { - await writer.WriteAsync(data).ConfigureAwait(false); + context.Response.AddHeader("Content-Encoding", "gzip"); + using (GZipStream gzip = new GZipStream(context.Response.OutputStream, CompressionMode.Compress)) + using (var writer = new StreamWriter(gzip)) + { + writer.Write(data); + } } } - private Task WriteFavIcon(HttpListenerContext context) + + private void WriteFavIcon(HttpListenerContext context) { context.Response.ContentType = FlotWebApp.FavIconMimeType; context.Response.StatusCode = 200; context.Response.StatusDescription = "OK"; - return FlotWebApp.WriteFavIcon(context.Response.OutputStream); + FlotWebApp.WriteFavIcon(context.Response.OutputStream); } - private static Task WriteFlotApp(HttpListenerContext context) + private static void WriteFlotApp(HttpListenerContext context) { context.Response.ContentType = "text/html"; context.Response.StatusCode = 200; @@ -210,7 +224,7 @@ private static Task WriteFlotApp(HttpListenerContext context) context.Response.AddHeader("Content-Encoding", "gzip"); } - return FlotWebApp.WriteFlotAppAsync(context.Response.OutputStream, !acceptsGzip); + FlotWebApp.WriteFlotAppAsync(context.Response.OutputStream, !acceptsGzip); } private static bool AcceptsGzip(HttpListenerRequest request) From 08c443c6f23cf3b3eea331e9c6df078da901074f Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Fri, 17 Oct 2014 16:14:54 +0300 Subject: [PATCH 24/40] bump version, push to nuget --- Publishing/Metrics.NET.net40.nuspec | 2 +- Publishing/NancyFx.Metrics.net40.nuspec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Publishing/Metrics.NET.net40.nuspec b/Publishing/Metrics.NET.net40.nuspec index e56eec51..857b6663 100644 --- a/Publishing/Metrics.NET.net40.nuspec +++ b/Publishing/Metrics.NET.net40.nuspec @@ -2,7 +2,7 @@ Metrics.NET-net40 - 0.2.4 + 0.2.6 Metrics.NET-net40 iulian.margarintescu Iulian Margarintescu diff --git a/Publishing/NancyFx.Metrics.net40.nuspec b/Publishing/NancyFx.Metrics.net40.nuspec index 81e4ca65..0c313b40 100644 --- a/Publishing/NancyFx.Metrics.net40.nuspec +++ b/Publishing/NancyFx.Metrics.net40.nuspec @@ -2,7 +2,7 @@ NancyFx.Metrics-net40 - 0.2.4 + 0.2.6 Nancy.Metrics-net40 iulian.margarintescu Iulian Margarintescu @@ -15,7 +15,7 @@ http://www.erata.net/Metrics.NET/metrics_32.png nancy, nancyfx, metrics, measurements, charts, timer, histogram, duration, graphite, health checks - + From fec00398791702196adb0d67750fd6625349df5a Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Tue, 28 Oct 2014 19:24:48 +0200 Subject: [PATCH 25/40] .net 40 fixes --- Metrics.sln | 30 +++---------------- .../Visualization/MetricsHttpListener.cs | 3 +- 2 files changed, 6 insertions(+), 27 deletions(-) diff --git a/Metrics.sln b/Metrics.sln index 0cccdda5..1ee62543 100644 --- a/Metrics.sln +++ b/Metrics.sln @@ -1,6 +1,8 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30723.0 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Metrics", "Src\Metrics\Metrics.csproj", "{95E29D40-DBEC-49E2-9CC5-26B88966DADE}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Metrics.Tests", "Src\Metrics.Tests\Metrics.Tests.csproj", "{4E0F8CB9-6919-48B8-8212-BCE75D04E0D9}" @@ -23,9 +25,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution CHANGELOG.md = CHANGELOG.md create-nuget.bat = create-nuget.bat Publishing\Metrics.NET.net40.nuspec = Publishing\Metrics.NET.net40.nuspec - Publishing\NancyFx.Metrics.net40.nuspec = Publishing\NancyFx.Metrics.net40.nuspec Publishing\Metrics.NET.nuspec = Publishing\Metrics.NET.nuspec Publishing\Nancy.Metrics.nuspec = Publishing\Nancy.Metrics.nuspec + Publishing\NancyFx.Metrics.net40.nuspec = Publishing\NancyFx.Metrics.net40.nuspec Publishing\Owin.Metrics.nuspec = Publishing\Owin.Metrics.nuspec Publishing\push-nuget.bat = Publishing\push-nuget.bat README.md = README.md @@ -34,10 +36,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Metrics.NLog", "Src\Adapters\Metrics.NLog\Metrics.NLog.csproj", "{68F25A01-AF00-4D57-9D1A-81213E4EF56F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Owin.Metrics", "Src\Adapters\Owin.Metrics\Owin.Metrics.csproj", "{025CD6D0-1A1E-4B14-A7DB-AF5DFF887210}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Owin.Sample", "Samples\Owin.Sample\Owin.Sample.csproj", "{828188F9-26C2-4C93-A156-D9EA13D7E2FA}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Metrics.Central", "Src\Metrics.Central\Metrics.Central.csproj", "{450184A4-9916-4AE5-87F8-A8067105CE40}" EndProject Global @@ -62,28 +60,8 @@ Global {68F25A01-AF00-4D57-9D1A-81213E4EF56F}.Debug|Any CPU.Build.0 = Debug|Any CPU {68F25A01-AF00-4D57-9D1A-81213E4EF56F}.Release|Any CPU.ActiveCfg = Release|Any CPU {68F25A01-AF00-4D57-9D1A-81213E4EF56F}.Release|Any CPU.Build.0 = Release|Any CPU - {025CD6D0-1A1E-4B14-A7DB-AF5DFF887210}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {025CD6D0-1A1E-4B14-A7DB-AF5DFF887210}.Debug|Any CPU.Build.0 = Debug|Any CPU - {025CD6D0-1A1E-4B14-A7DB-AF5DFF887210}.MonoDebug|Any CPU.ActiveCfg = MonoDebug|Any CPU - {025CD6D0-1A1E-4B14-A7DB-AF5DFF887210}.MonoDebug|Any CPU.Build.0 = MonoDebug|Any CPU - {025CD6D0-1A1E-4B14-A7DB-AF5DFF887210}.MonoRelease|Any CPU.ActiveCfg = MonoRelease|Any CPU - {025CD6D0-1A1E-4B14-A7DB-AF5DFF887210}.MonoRelease|Any CPU.Build.0 = MonoRelease|Any CPU - {025CD6D0-1A1E-4B14-A7DB-AF5DFF887210}.Release|Any CPU.ActiveCfg = Release|Any CPU - {025CD6D0-1A1E-4B14-A7DB-AF5DFF887210}.Release|Any CPU.Build.0 = Release|Any CPU - {828188F9-26C2-4C93-A156-D9EA13D7E2FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {828188F9-26C2-4C93-A156-D9EA13D7E2FA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {828188F9-26C2-4C93-A156-D9EA13D7E2FA}.MonoDebug|Any CPU.ActiveCfg = MonoDebug|Any CPU - {828188F9-26C2-4C93-A156-D9EA13D7E2FA}.MonoDebug|Any CPU.Build.0 = MonoDebug|Any CPU - {828188F9-26C2-4C93-A156-D9EA13D7E2FA}.MonoRelease|Any CPU.ActiveCfg = MonoRelease|Any CPU - {828188F9-26C2-4C93-A156-D9EA13D7E2FA}.MonoRelease|Any CPU.Build.0 = MonoRelease|Any CPU - {828188F9-26C2-4C93-A156-D9EA13D7E2FA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {828188F9-26C2-4C93-A156-D9EA13D7E2FA}.Release|Any CPU.Build.0 = Release|Any CPU {450184A4-9916-4AE5-87F8-A8067105CE40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {450184A4-9916-4AE5-87F8-A8067105CE40}.Debug|Any CPU.Build.0 = Debug|Any CPU - {450184A4-9916-4AE5-87F8-A8067105CE40}.MonoDebug|Any CPU.ActiveCfg = Debug|Any CPU - {450184A4-9916-4AE5-87F8-A8067105CE40}.MonoDebug|Any CPU.Build.0 = Debug|Any CPU - {450184A4-9916-4AE5-87F8-A8067105CE40}.MonoRelease|Any CPU.ActiveCfg = Release|Any CPU - {450184A4-9916-4AE5-87F8-A8067105CE40}.MonoRelease|Any CPU.Build.0 = Release|Any CPU {450184A4-9916-4AE5-87F8-A8067105CE40}.Release|Any CPU.ActiveCfg = Release|Any CPU {450184A4-9916-4AE5-87F8-A8067105CE40}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection diff --git a/Src/Metrics/Visualization/MetricsHttpListener.cs b/Src/Metrics/Visualization/MetricsHttpListener.cs index c2ada48f..cebfb38f 100644 --- a/Src/Metrics/Visualization/MetricsHttpListener.cs +++ b/Src/Metrics/Visualization/MetricsHttpListener.cs @@ -93,7 +93,8 @@ private void ProcessRequest(HttpListenerContext context) { if (context.Request.HttpMethod.ToUpperInvariant() != "GET") { - return WriteNotFound(context); + WriteNotFound(context); + return; } var urlPath = context.Request.RawUrl.Substring(this.prefixPath.Length) From 6f6457dcc83362e418119ee8e1bbf4fd5de03746 Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Tue, 28 Oct 2014 19:28:16 +0200 Subject: [PATCH 26/40] push nuget --- Publishing/Metrics.NET.net40.nuspec | 2 +- Publishing/NancyFx.Metrics.net40.nuspec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Publishing/Metrics.NET.net40.nuspec b/Publishing/Metrics.NET.net40.nuspec index 857b6663..f0bfd078 100644 --- a/Publishing/Metrics.NET.net40.nuspec +++ b/Publishing/Metrics.NET.net40.nuspec @@ -2,7 +2,7 @@ Metrics.NET-net40 - 0.2.6 + 0.2.7 Metrics.NET-net40 iulian.margarintescu Iulian Margarintescu diff --git a/Publishing/NancyFx.Metrics.net40.nuspec b/Publishing/NancyFx.Metrics.net40.nuspec index 0c313b40..abfe215d 100644 --- a/Publishing/NancyFx.Metrics.net40.nuspec +++ b/Publishing/NancyFx.Metrics.net40.nuspec @@ -2,7 +2,7 @@ NancyFx.Metrics-net40 - 0.2.6 + 0.2.7 Nancy.Metrics-net40 iulian.margarintescu Iulian Margarintescu @@ -15,7 +15,7 @@ http://www.erata.net/Metrics.NET/metrics_32.png nancy, nancyfx, metrics, measurements, charts, timer, histogram, duration, graphite, health checks - + From 371cc923f1f2791e4e62645bb98ef4832b984141 Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Wed, 29 Oct 2014 15:57:38 +0200 Subject: [PATCH 27/40] bump version, push to nuget --- Publishing/Metrics.NET.net40.nuspec | 2 +- Publishing/NancyFx.Metrics.net40.nuspec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Publishing/Metrics.NET.net40.nuspec b/Publishing/Metrics.NET.net40.nuspec index f0bfd078..d0eae1ed 100644 --- a/Publishing/Metrics.NET.net40.nuspec +++ b/Publishing/Metrics.NET.net40.nuspec @@ -2,7 +2,7 @@ Metrics.NET-net40 - 0.2.7 + 0.2.8 Metrics.NET-net40 iulian.margarintescu Iulian Margarintescu diff --git a/Publishing/NancyFx.Metrics.net40.nuspec b/Publishing/NancyFx.Metrics.net40.nuspec index abfe215d..ad910a29 100644 --- a/Publishing/NancyFx.Metrics.net40.nuspec +++ b/Publishing/NancyFx.Metrics.net40.nuspec @@ -2,7 +2,7 @@ NancyFx.Metrics-net40 - 0.2.7 + 0.2.8 Nancy.Metrics-net40 iulian.margarintescu Iulian Margarintescu @@ -15,7 +15,7 @@ http://www.erata.net/Metrics.NET/metrics_32.png nancy, nancyfx, metrics, measurements, charts, timer, histogram, duration, graphite, health checks - + From 1e45918c7160eea3c46912818af97ff939529afe Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Wed, 5 Nov 2014 20:09:16 +0200 Subject: [PATCH 28/40] bump version, push nuget --- Publishing/Metrics.NET.net40.nuspec | 2 +- Publishing/NancyFx.Metrics.net40.nuspec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Publishing/Metrics.NET.net40.nuspec b/Publishing/Metrics.NET.net40.nuspec index d0eae1ed..00442960 100644 --- a/Publishing/Metrics.NET.net40.nuspec +++ b/Publishing/Metrics.NET.net40.nuspec @@ -2,7 +2,7 @@ Metrics.NET-net40 - 0.2.8 + 0.2.9 Metrics.NET-net40 iulian.margarintescu Iulian Margarintescu diff --git a/Publishing/NancyFx.Metrics.net40.nuspec b/Publishing/NancyFx.Metrics.net40.nuspec index ad910a29..69d9f9b2 100644 --- a/Publishing/NancyFx.Metrics.net40.nuspec +++ b/Publishing/NancyFx.Metrics.net40.nuspec @@ -2,7 +2,7 @@ NancyFx.Metrics-net40 - 0.2.8 + 0.2.9 Nancy.Metrics-net40 iulian.margarintescu Iulian Margarintescu @@ -15,7 +15,7 @@ http://www.erata.net/Metrics.NET/metrics_32.png nancy, nancyfx, metrics, measurements, charts, timer, histogram, duration, graphite, health checks - + From 28a8e69475acfd4d21a5eb072b226a71747e930d Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Thu, 6 Nov 2014 11:19:54 +0200 Subject: [PATCH 29/40] bump version --- Publishing/Metrics.NET.net40.nuspec | 2 +- Publishing/NancyFx.Metrics.net40.nuspec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Publishing/Metrics.NET.net40.nuspec b/Publishing/Metrics.NET.net40.nuspec index 00442960..5eef15b1 100644 --- a/Publishing/Metrics.NET.net40.nuspec +++ b/Publishing/Metrics.NET.net40.nuspec @@ -2,7 +2,7 @@ Metrics.NET-net40 - 0.2.9 + 0.2.10 Metrics.NET-net40 iulian.margarintescu Iulian Margarintescu diff --git a/Publishing/NancyFx.Metrics.net40.nuspec b/Publishing/NancyFx.Metrics.net40.nuspec index 69d9f9b2..fb2a2cc8 100644 --- a/Publishing/NancyFx.Metrics.net40.nuspec +++ b/Publishing/NancyFx.Metrics.net40.nuspec @@ -2,7 +2,7 @@ NancyFx.Metrics-net40 - 0.2.9 + 0.2.10 Nancy.Metrics-net40 iulian.margarintescu Iulian Margarintescu @@ -15,7 +15,7 @@ http://www.erata.net/Metrics.NET/metrics_32.png nancy, nancyfx, metrics, measurements, charts, timer, histogram, duration, graphite, health checks - + From ad43c68650c949d7dfb065ebc0d2a8acb50cc721 Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Sun, 16 Nov 2014 18:07:21 +0200 Subject: [PATCH 30/40] bump version, push nuget --- Metrics.sln | 39 ------------------- Publishing/Metrics.NET.net40.nuspec | 2 +- Publishing/NancyFx.Metrics.net40.nuspec | 4 +- Publishing/push-nuget.bat | 4 +- Src/Adapters/Metrics.NLog/Metrics.NLog.csproj | 5 ++- Src/Adapters/Metrics.NLog/packages.config | 2 +- .../Nancy.Metrics/Nancy.Metrics.csproj | 2 +- Src/Metrics.Tests/Metrics.Tests.csproj | 5 +-- Src/Metrics.Tests/app.config | 2 +- Src/Metrics.Tests/packages.config | 2 +- Src/Metrics/Metrics.csproj | 1 - build.net40.bat | 4 +- 12 files changed, 16 insertions(+), 56 deletions(-) diff --git a/Metrics.sln b/Metrics.sln index 1235fa1b..c7bc9a6f 100644 --- a/Metrics.sln +++ b/Metrics.sln @@ -1,7 +1,6 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.30723.0 VisualStudioVersion = 12.0.31101.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Metrics", "Src\Metrics\Metrics.csproj", "{95E29D40-DBEC-49E2-9CC5-26B88966DADE}" @@ -37,8 +36,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Metrics.NLog", "Src\Adapters\Metrics.NLog\Metrics.NLog.csproj", "{68F25A01-AF00-4D57-9D1A-81213E4EF56F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Metrics.Central", "Src\Metrics.Central\Metrics.Central.csproj", "{450184A4-9916-4AE5-87F8-A8067105CE40}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -53,50 +50,14 @@ Global {4E0F8CB9-6919-48B8-8212-BCE75D04E0D9}.Debug|Any CPU.Build.0 = Debug|Any CPU {4E0F8CB9-6919-48B8-8212-BCE75D04E0D9}.Release|Any CPU.ActiveCfg = Release|Any CPU {4E0F8CB9-6919-48B8-8212-BCE75D04E0D9}.Release|Any CPU.Build.0 = Release|Any CPU - {B7C6EF21-0797-4B53-A917-1CFF8267CD67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B7C6EF21-0797-4B53-A917-1CFF8267CD67}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B7C6EF21-0797-4B53-A917-1CFF8267CD67}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B7C6EF21-0797-4B53-A917-1CFF8267CD67}.Release|Any CPU.Build.0 = Release|Any CPU - {D08A63D0-F440-477C-9565-1264AE0879D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D08A63D0-F440-477C-9565-1264AE0879D0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D08A63D0-F440-477C-9565-1264AE0879D0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D08A63D0-F440-477C-9565-1264AE0879D0}.Release|Any CPU.Build.0 = Release|Any CPU - {7416F90D-FFD6-4E34-8638-5234C8B9EC39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7416F90D-FFD6-4E34-8638-5234C8B9EC39}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7416F90D-FFD6-4E34-8638-5234C8B9EC39}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7416F90D-FFD6-4E34-8638-5234C8B9EC39}.Release|Any CPU.Build.0 = Release|Any CPU - {A9074D3E-3421-483D-AF98-4AAEEED11ECA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A9074D3E-3421-483D-AF98-4AAEEED11ECA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A9074D3E-3421-483D-AF98-4AAEEED11ECA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A9074D3E-3421-483D-AF98-4AAEEED11ECA}.Release|Any CPU.Build.0 = Release|Any CPU {FBFF51D8-52F4-4EEF-8498-122A14B37D6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FBFF51D8-52F4-4EEF-8498-122A14B37D6C}.Debug|Any CPU.Build.0 = Debug|Any CPU {FBFF51D8-52F4-4EEF-8498-122A14B37D6C}.Release|Any CPU.ActiveCfg = Release|Any CPU {FBFF51D8-52F4-4EEF-8498-122A14B37D6C}.Release|Any CPU.Build.0 = Release|Any CPU - {DAF70394-CE63-4D2F-B52B-839941827B4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DAF70394-CE63-4D2F-B52B-839941827B4E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DAF70394-CE63-4D2F-B52B-839941827B4E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DAF70394-CE63-4D2F-B52B-839941827B4E}.Release|Any CPU.Build.0 = Release|Any CPU - {18E808CB-98F9-4754-9872-D3D00F9CE72B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {18E808CB-98F9-4754-9872-D3D00F9CE72B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {18E808CB-98F9-4754-9872-D3D00F9CE72B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {18E808CB-98F9-4754-9872-D3D00F9CE72B}.Release|Any CPU.Build.0 = Release|Any CPU {68F25A01-AF00-4D57-9D1A-81213E4EF56F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {68F25A01-AF00-4D57-9D1A-81213E4EF56F}.Debug|Any CPU.Build.0 = Debug|Any CPU {68F25A01-AF00-4D57-9D1A-81213E4EF56F}.Release|Any CPU.ActiveCfg = Release|Any CPU {68F25A01-AF00-4D57-9D1A-81213E4EF56F}.Release|Any CPU.Build.0 = Release|Any CPU - {025CD6D0-1A1E-4B14-A7DB-AF5DFF887210}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {025CD6D0-1A1E-4B14-A7DB-AF5DFF887210}.Debug|Any CPU.Build.0 = Debug|Any CPU - {025CD6D0-1A1E-4B14-A7DB-AF5DFF887210}.Release|Any CPU.ActiveCfg = Release|Any CPU - {025CD6D0-1A1E-4B14-A7DB-AF5DFF887210}.Release|Any CPU.Build.0 = Release|Any CPU - {828188F9-26C2-4C93-A156-D9EA13D7E2FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {828188F9-26C2-4C93-A156-D9EA13D7E2FA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {828188F9-26C2-4C93-A156-D9EA13D7E2FA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {828188F9-26C2-4C93-A156-D9EA13D7E2FA}.Release|Any CPU.Build.0 = Release|Any CPU - {450184A4-9916-4AE5-87F8-A8067105CE40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {450184A4-9916-4AE5-87F8-A8067105CE40}.Debug|Any CPU.Build.0 = Debug|Any CPU - {450184A4-9916-4AE5-87F8-A8067105CE40}.Release|Any CPU.ActiveCfg = Release|Any CPU - {450184A4-9916-4AE5-87F8-A8067105CE40}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Publishing/Metrics.NET.net40.nuspec b/Publishing/Metrics.NET.net40.nuspec index 5eef15b1..60ba662e 100644 --- a/Publishing/Metrics.NET.net40.nuspec +++ b/Publishing/Metrics.NET.net40.nuspec @@ -2,7 +2,7 @@ Metrics.NET-net40 - 0.2.10 + 0.2.11 Metrics.NET-net40 iulian.margarintescu Iulian Margarintescu diff --git a/Publishing/NancyFx.Metrics.net40.nuspec b/Publishing/NancyFx.Metrics.net40.nuspec index fb2a2cc8..33c1c782 100644 --- a/Publishing/NancyFx.Metrics.net40.nuspec +++ b/Publishing/NancyFx.Metrics.net40.nuspec @@ -2,7 +2,7 @@ NancyFx.Metrics-net40 - 0.2.10 + 0.2.11 Nancy.Metrics-net40 iulian.margarintescu Iulian Margarintescu @@ -15,7 +15,7 @@ http://www.erata.net/Metrics.NET/metrics_32.png nancy, nancyfx, metrics, measurements, charts, timer, histogram, duration, graphite, health checks - + diff --git a/Publishing/push-nuget.bat b/Publishing/push-nuget.bat index 1d9019b7..0b6cdba5 100644 --- a/Publishing/push-nuget.bat +++ b/Publishing/push-nuget.bat @@ -1,2 +1,2 @@ -..\.nuget\NuGet.exe push Metrics.NET-net40.0.2.10.nupkg -..\.nuget\NuGet.exe push NancyFx.Metrics-net40.0.2.10.nupkg +..\.nuget\NuGet.exe push Metrics.NET-net40.0.2.11.nupkg +..\.nuget\NuGet.exe push NancyFx.Metrics-net40.0.2.11.nupkg diff --git a/Src/Adapters/Metrics.NLog/Metrics.NLog.csproj b/Src/Adapters/Metrics.NLog/Metrics.NLog.csproj index b2e5f376..ecd145b2 100644 --- a/Src/Adapters/Metrics.NLog/Metrics.NLog.csproj +++ b/Src/Adapters/Metrics.NLog/Metrics.NLog.csproj @@ -9,10 +9,11 @@ Properties Metrics.NLog Metrics.NLog - v4.5 + v4.0 512 ..\..\..\ true + true @@ -38,7 +39,7 @@ true 1591 ..\..\..\bin\Release\Metrics.NLog.XML - + False diff --git a/Src/Adapters/Metrics.NLog/packages.config b/Src/Adapters/Metrics.NLog/packages.config index 91befb65..d2356a7f 100644 --- a/Src/Adapters/Metrics.NLog/packages.config +++ b/Src/Adapters/Metrics.NLog/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Src/Adapters/Nancy.Metrics/Nancy.Metrics.csproj b/Src/Adapters/Nancy.Metrics/Nancy.Metrics.csproj index 7bd2b62e..e08ea87b 100644 --- a/Src/Adapters/Nancy.Metrics/Nancy.Metrics.csproj +++ b/Src/Adapters/Nancy.Metrics/Nancy.Metrics.csproj @@ -10,7 +10,7 @@ Nancy.Metrics Nancy.Metrics 512 - v4.5 + v4.0 ..\..\..\ true diff --git a/Src/Metrics.Tests/Metrics.Tests.csproj b/Src/Metrics.Tests/Metrics.Tests.csproj index ad544c78..9d5ed7b2 100644 --- a/Src/Metrics.Tests/Metrics.Tests.csproj +++ b/Src/Metrics.Tests/Metrics.Tests.csproj @@ -9,7 +9,7 @@ Properties Metrics.Tests Metrics.Tests - v4.5.1 + v4.0 512 ..\..\ true @@ -58,8 +58,7 @@ False - ..\..\packages\Newtonsoft.Json.6.0.5\lib\net40\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.6.0.6\lib\net45\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.6.0.6\lib\net40\Newtonsoft.Json.dll diff --git a/Src/Metrics.Tests/app.config b/Src/Metrics.Tests/app.config index 51278a45..fcd0c937 100644 --- a/Src/Metrics.Tests/app.config +++ b/Src/Metrics.Tests/app.config @@ -1,3 +1,3 @@ - + diff --git a/Src/Metrics.Tests/packages.config b/Src/Metrics.Tests/packages.config index 08baea96..397ac0b4 100644 --- a/Src/Metrics.Tests/packages.config +++ b/Src/Metrics.Tests/packages.config @@ -4,6 +4,6 @@ - + \ No newline at end of file diff --git a/Src/Metrics/Metrics.csproj b/Src/Metrics/Metrics.csproj index 5d57503d..0bc0712f 100644 --- a/Src/Metrics/Metrics.csproj +++ b/Src/Metrics/Metrics.csproj @@ -10,7 +10,6 @@ Metrics Metrics v4.0 - v4.5 512 ..\..\ true diff --git a/build.net40.bat b/build.net40.bat index 39b08383..ee54258f 100644 --- a/build.net40.bat +++ b/build.net40.bat @@ -3,10 +3,10 @@ set MSBUILD="c:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe" set XUNIT=".\packages\xunit.runners.1.9.2\tools\xunit.console.clr4.exe" -%MSBUILD% Metrics.Sln /p:Configuration="Debug" /p:TargetFrameworkVersion=v4.0 +%MSBUILD% Metrics.Sln /p:Configuration="Debug" if %errorlevel% neq 0 exit /b %errorlevel% -%MSBUILD% Metrics.Sln /p:Configuration="Release" /p:TargetFrameworkVersion=v4.0 +%MSBUILD% Metrics.Sln /p:Configuration="Release" if %errorlevel% neq 0 exit /b %errorlevel% %XUNIT% .\bin\Debug\Tests\Metrics.Tests.dll From 0cc7c98dbcd50b06795c121f2f1df799ac9380be Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Wed, 26 Nov 2014 18:52:31 +0200 Subject: [PATCH 31/40] bump version, push nuget --- Publishing/Metrics.NET.net40.nuspec | 2 +- Publishing/NancyFx.Metrics.net40.nuspec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Publishing/Metrics.NET.net40.nuspec b/Publishing/Metrics.NET.net40.nuspec index 60ba662e..20e9ad57 100644 --- a/Publishing/Metrics.NET.net40.nuspec +++ b/Publishing/Metrics.NET.net40.nuspec @@ -2,7 +2,7 @@ Metrics.NET-net40 - 0.2.11 + 0.2.12 Metrics.NET-net40 iulian.margarintescu Iulian Margarintescu diff --git a/Publishing/NancyFx.Metrics.net40.nuspec b/Publishing/NancyFx.Metrics.net40.nuspec index 33c1c782..948d8465 100644 --- a/Publishing/NancyFx.Metrics.net40.nuspec +++ b/Publishing/NancyFx.Metrics.net40.nuspec @@ -2,7 +2,7 @@ NancyFx.Metrics-net40 - 0.2.11 + 0.2.12 Nancy.Metrics-net40 iulian.margarintescu Iulian Margarintescu @@ -15,7 +15,7 @@ http://www.erata.net/Metrics.NET/metrics_32.png nancy, nancyfx, metrics, measurements, charts, timer, histogram, duration, graphite, health checks - + From c93740e1a30bb8e13e86517ef67120fb108ec002 Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Sun, 14 Dec 2014 14:24:31 +0200 Subject: [PATCH 32/40] bump version, push nuget --- Publishing/Metrics.NET.net40.nuspec | 2 +- Publishing/NancyFx.Metrics.net40.nuspec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Publishing/Metrics.NET.net40.nuspec b/Publishing/Metrics.NET.net40.nuspec index 20e9ad57..bfbed658 100644 --- a/Publishing/Metrics.NET.net40.nuspec +++ b/Publishing/Metrics.NET.net40.nuspec @@ -2,7 +2,7 @@ Metrics.NET-net40 - 0.2.12 + 0.2.13 Metrics.NET-net40 iulian.margarintescu Iulian Margarintescu diff --git a/Publishing/NancyFx.Metrics.net40.nuspec b/Publishing/NancyFx.Metrics.net40.nuspec index 948d8465..e08af9e9 100644 --- a/Publishing/NancyFx.Metrics.net40.nuspec +++ b/Publishing/NancyFx.Metrics.net40.nuspec @@ -2,7 +2,7 @@ NancyFx.Metrics-net40 - 0.2.12 + 0.2.13 Nancy.Metrics-net40 iulian.margarintescu Iulian Margarintescu @@ -15,7 +15,7 @@ http://www.erata.net/Metrics.NET/metrics_32.png nancy, nancyfx, metrics, measurements, charts, timer, histogram, duration, graphite, health checks - + From 0064c0da0e17aa4bd7a82408f36bd70b88b02e4d Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Mon, 15 Dec 2014 12:52:11 +0200 Subject: [PATCH 33/40] bump version, push nuget --- Publishing/Metrics.NET.net40.nuspec | 2 +- Publishing/NancyFx.Metrics.net40.nuspec | 4 ++-- build.net40.bat | 7 ++++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Publishing/Metrics.NET.net40.nuspec b/Publishing/Metrics.NET.net40.nuspec index bfbed658..790059ea 100644 --- a/Publishing/Metrics.NET.net40.nuspec +++ b/Publishing/Metrics.NET.net40.nuspec @@ -2,7 +2,7 @@ Metrics.NET-net40 - 0.2.13 + 0.2.14 Metrics.NET-net40 iulian.margarintescu Iulian Margarintescu diff --git a/Publishing/NancyFx.Metrics.net40.nuspec b/Publishing/NancyFx.Metrics.net40.nuspec index e08af9e9..9101fed1 100644 --- a/Publishing/NancyFx.Metrics.net40.nuspec +++ b/Publishing/NancyFx.Metrics.net40.nuspec @@ -2,7 +2,7 @@ NancyFx.Metrics-net40 - 0.2.13 + 0.2.14 Nancy.Metrics-net40 iulian.margarintescu Iulian Margarintescu @@ -15,7 +15,7 @@ http://www.erata.net/Metrics.NET/metrics_32.png nancy, nancyfx, metrics, measurements, charts, timer, histogram, duration, graphite, health checks - + diff --git a/build.net40.bat b/build.net40.bat index ee54258f..4830ffe3 100644 --- a/build.net40.bat +++ b/build.net40.bat @@ -1,7 +1,8 @@ .nuget\NuGet.exe restore Metrics.sln set MSBUILD="c:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe" -set XUNIT=".\packages\xunit.runners.1.9.2\tools\xunit.console.clr4.exe" +set XUNIT=".\packages\xunit.runners.2.0.0-beta5-build2785\tools\xunit.console.exe" + %MSBUILD% Metrics.Sln /p:Configuration="Debug" if %errorlevel% neq 0 exit /b %errorlevel% @@ -9,8 +10,8 @@ if %errorlevel% neq 0 exit /b %errorlevel% %MSBUILD% Metrics.Sln /p:Configuration="Release" if %errorlevel% neq 0 exit /b %errorlevel% -%XUNIT% .\bin\Debug\Tests\Metrics.Tests.dll +%XUNIT% .\bin\Debug\Tests\Metrics.Tests.dll -parallel none if %errorlevel% neq 0 exit /b %errorlevel% -%XUNIT% .\bin\Release\Tests\Metrics.Tests.dll +%XUNIT% .\bin\Release\Tests\Metrics.Tests.dll -parallel none if %errorlevel% neq 0 exit /b %errorlevel% \ No newline at end of file From d3f259c029db0283f02706c5666cb21ce13737ba Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Wed, 17 Dec 2014 16:46:46 +0200 Subject: [PATCH 34/40] fix build script --- build.net40.bat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.net40.bat b/build.net40.bat index 4830ffe3..e3992872 100644 --- a/build.net40.bat +++ b/build.net40.bat @@ -1,7 +1,7 @@ .nuget\NuGet.exe restore Metrics.sln set MSBUILD="c:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe" -set XUNIT=".\packages\xunit.runners.2.0.0-beta5-build2785\tools\xunit.console.exe" +set XUNIT=".\packages\xunit.runners.1.9.2\\tools\xunit.console.clr4.exe" %MSBUILD% Metrics.Sln /p:Configuration="Debug" @@ -10,8 +10,8 @@ if %errorlevel% neq 0 exit /b %errorlevel% %MSBUILD% Metrics.Sln /p:Configuration="Release" if %errorlevel% neq 0 exit /b %errorlevel% -%XUNIT% .\bin\Debug\Tests\Metrics.Tests.dll -parallel none +%XUNIT% .\bin\Debug\Tests\Metrics.Tests.dll if %errorlevel% neq 0 exit /b %errorlevel% -%XUNIT% .\bin\Release\Tests\Metrics.Tests.dll -parallel none +%XUNIT% .\bin\Release\Tests\Metrics.Tests.dll if %errorlevel% neq 0 exit /b %errorlevel% \ No newline at end of file From 6d8bacfbbc2ed093de8ff1d603ba8f73e8c9db20 Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Wed, 17 Dec 2014 19:19:30 +0200 Subject: [PATCH 35/40] fix build for net40 --- Src/Metrics.Tests/Metrics.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Metrics.Tests/Metrics.Tests.csproj b/Src/Metrics.Tests/Metrics.Tests.csproj index b05d8339..669ca64f 100644 --- a/Src/Metrics.Tests/Metrics.Tests.csproj +++ b/Src/Metrics.Tests/Metrics.Tests.csproj @@ -70,7 +70,7 @@ - ..\..\packages\xunit.1.9.2\lib\net40\xunit.dll + ..\..\packages\xunit.1.9.2\lib\net20\xunit.dll ..\..\packages\xunit.runner.utility.2.0.0-beta5-build2785\lib\net35\xunit.runner.utility.dll From 17b69179fde2e9895ac406fa390e8d8b8a6a1505 Mon Sep 17 00:00:00 2001 From: Iulian Margarintescu Date: Mon, 2 Mar 2015 13:20:53 +0200 Subject: [PATCH 36/40] bump package versions --- Publishing/Metrics.NET.net40.nuspec | 2 +- Publishing/NancyFx.Metrics.net40.nuspec | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Publishing/Metrics.NET.net40.nuspec b/Publishing/Metrics.NET.net40.nuspec index 790059ea..2a941577 100644 --- a/Publishing/Metrics.NET.net40.nuspec +++ b/Publishing/Metrics.NET.net40.nuspec @@ -2,7 +2,7 @@ Metrics.NET-net40 - 0.2.14 + 0.2.15 Metrics.NET-net40 iulian.margarintescu Iulian Margarintescu diff --git a/Publishing/NancyFx.Metrics.net40.nuspec b/Publishing/NancyFx.Metrics.net40.nuspec index 9101fed1..b618372d 100644 --- a/Publishing/NancyFx.Metrics.net40.nuspec +++ b/Publishing/NancyFx.Metrics.net40.nuspec @@ -2,7 +2,7 @@ NancyFx.Metrics-net40 - 0.2.14 + 0.2.15 Nancy.Metrics-net40 iulian.margarintescu Iulian Margarintescu @@ -15,8 +15,8 @@ http://www.erata.net/Metrics.NET/metrics_32.png nancy, nancyfx, metrics, measurements, charts, timer, histogram, duration, graphite, health checks - - + + From 25c2acebd883a6ed9ab20942735e84a477d5909e Mon Sep 17 00:00:00 2001 From: shamork Date: Sat, 7 Jan 2017 21:32:41 +0800 Subject: [PATCH 37/40] update all code in Metrics.Net Project to 0.4.7 --- .../ElasticSearch/ElasticSearchReport.cs | 4 +- Src/Metrics/Graphite/GraphiteReport.cs | 9 +- Src/Metrics/Metric.cs | 2 +- Src/Metrics/Metrics.csproj | 31 ++++++ Src/Metrics/MetricsConfig.cs | 16 +-- .../RemoteMetrics/HttpRemoteMetrics.cs | 6 +- .../RemoteMetrics/RemoteMetricsContext.cs | 10 +- Src/Metrics/Utils/ActionScheduler.cs | 64 ++++++----- Src/Metrics/Visualization/FlotWebApp.cs | 11 +- .../Visualization/MetricsHttpListener.cs | 105 ++++++++---------- Src/Metrics/app.config | 15 +++ Src/Metrics/packages.config | 3 + Src/Metrics/pingme.txt | 0 13 files changed, 168 insertions(+), 108 deletions(-) create mode 100644 Src/Metrics/app.config create mode 100644 Src/Metrics/pingme.txt diff --git a/Src/Metrics/ElasticSearch/ElasticSearchReport.cs b/Src/Metrics/ElasticSearch/ElasticSearchReport.cs index ac90ad8c..e3a28891 100644 --- a/Src/Metrics/ElasticSearch/ElasticSearchReport.cs +++ b/Src/Metrics/ElasticSearch/ElasticSearchReport.cs @@ -22,7 +22,7 @@ private class ESDocument public string ToJsonString() { var meta = string.Format("{{ \"index\" : {{ \"_index\" : \"{0}\", \"_type\" : \"{1}\"}} }}", this.Index, this.Type); - return meta + Environment.NewLine + this.Object.AsJson(false); + return meta + Environment.NewLine + this.Object.AsJson(false) + Environment.NewLine; } } @@ -46,7 +46,7 @@ protected override void EndReport(string contextName) base.EndReport(contextName); using (var client = new WebClient()) { - var json = string.Join(Environment.NewLine, this.data.Select(d => d.ToJsonString())); + var json = string.Join(string.Empty, this.data.Select(d => d.ToJsonString())); client.UploadString(this.elasticSearchUri, json); } } diff --git a/Src/Metrics/Graphite/GraphiteReport.cs b/Src/Metrics/Graphite/GraphiteReport.cs index 2f4e22fc..f680dc1d 100644 --- a/Src/Metrics/Graphite/GraphiteReport.cs +++ b/Src/Metrics/Graphite/GraphiteReport.cs @@ -12,6 +12,7 @@ namespace Metrics.Graphite public class GraphiteReport : BaseReport, IDisposable { private static readonly Regex invalid = new Regex(@"[^a-zA-Z0-9\-%&]+", RegexOptions.CultureInvariant | RegexOptions.Compiled); + private static readonly Regex invalidAllowDots = new Regex(@"[^a-zA-Z0-9\-%&.]+", RegexOptions.CultureInvariant | RegexOptions.Compiled); private static readonly Regex slash = new Regex(@"\s*/\s*", RegexOptions.CultureInvariant | RegexOptions.Compiled); private readonly GraphiteSender sender; @@ -133,7 +134,7 @@ protected virtual void Send(string name, string value) protected override string FormatContextName(IEnumerable contextStack, string contextName) { var parts = contextStack.Concat(new[] { contextName }) - .Select(GraphiteName); + .Select(_ => GraphiteName(_, true)); return string.Join(".", parts); } @@ -196,10 +197,12 @@ protected virtual string FormatUnit(string unit, string name) return string.Concat("-", clean); } - protected virtual string GraphiteName(string name) + protected virtual string GraphiteName(string name, bool allowDots = false) { var noSlash = slash.Replace(name, "-per-"); - return invalid.Replace(noSlash, "_").Trim('_'); + return allowDots ? + invalidAllowDots.Replace(noSlash, "_").Trim('_') : + invalid.Replace(noSlash, "_").Trim('_'); } public void Dispose() diff --git a/Src/Metrics/Metric.cs b/Src/Metrics/Metric.cs index 8f524472..51cde2e8 100644 --- a/Src/Metrics/Metric.cs +++ b/Src/Metrics/Metric.cs @@ -187,7 +187,7 @@ private static string GetGlobalContextName() try { var configName = ConfigurationManager.AppSettings["Metrics.GlobalContextName"]; - var name = string.IsNullOrEmpty(configName) ? Process.GetCurrentProcess().ProcessName : configName; + var name = string.IsNullOrEmpty(configName) ? Process.GetCurrentProcess().ProcessName.Replace('.', '_') : configName; log.Debug(() => "Metrics: GlobalContext Name set to " + name); return name; } diff --git a/Src/Metrics/Metrics.csproj b/Src/Metrics/Metrics.csproj index 25b58d9a..018e16ed 100644 --- a/Src/Metrics/Metrics.csproj +++ b/Src/Metrics/Metrics.csproj @@ -40,9 +40,34 @@ + + ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + True + + + ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + True + + + ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + True + + + ..\..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.IO.dll + True + + + + ..\..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Runtime.dll + True + + + ..\..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Threading.Tasks.dll + True + @@ -168,6 +193,7 @@ + @@ -178,6 +204,11 @@ + + + + +