Skip to content

Commit c840650

Browse files
committed
API.Performance Class fixed when the Web.config key API_PERFORMANCE_ENABLED is FALSE
1 parent 53347cb commit c840650

File tree

9 files changed

+10
-10
lines changed

9 files changed

+10
-10
lines changed

rls/API.Library.dll

0 Bytes
Binary file not shown.

rls/API.Library.pdb

0 Bytes
Binary file not shown.

src/API.Library/Entities/Performance.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ internal static class Performance
1414
/// </summary>
1515
internal static bool API_PERFORMANCE_ENABLED = Convert.ToBoolean(ConfigurationManager.AppSettings["API_PERFORMANCE_ENABLED"]);
1616

17-
internal static PerformanceCounter ProcessorPercentage = new PerformanceCounter("Processor", "% Processor Time", "_Total");
18-
internal static PerformanceCounter MemoryAvailableMBytes = new PerformanceCounter("Memory", "Available MBytes");
19-
internal static PerformanceCounter RequestPerSec = new PerformanceCounter("ASP.NET Applications", "Requests/Sec", "__Total__");
20-
internal static PerformanceCounter RequestsQueued = new PerformanceCounter("ASP.NET", "Requests Queued");
17+
internal static PerformanceCounter ProcessorPercentage = API_PERFORMANCE_ENABLED ? new PerformanceCounter("Processor", "% Processor Time", "_Total") : null;
18+
internal static PerformanceCounter MemoryAvailableMBytes = API_PERFORMANCE_ENABLED ? new PerformanceCounter("Memory", "Available MBytes") : null;
19+
internal static PerformanceCounter RequestPerSec = API_PERFORMANCE_ENABLED ? new PerformanceCounter("ASP.NET Applications", "Requests/Sec", "__Total__") : null;
20+
internal static PerformanceCounter RequestsQueued = API_PERFORMANCE_ENABLED ? new PerformanceCounter("ASP.NET", "Requests Queued") : null;
2121

2222
// Extension method to trim to whole minute
2323
internal static DateTime TrimToMinute(this DateTime date, long ticks)

src/API.Library/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
// You can specify all the values or you can default the Build and Revision Numbers
3232
// by using the '*' as shown below:
3333
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("4.3.1")]
35-
[assembly: AssemblyFileVersion("4.3.1")]
34+
[assembly: AssemblyVersion("4.3.2")]
35+
[assembly: AssemblyFileVersion("4.3.2")]
3636

3737
// Configure log4net using the Web.config file by default
3838
[assembly: log4net.Config.XmlConfigurator(Watch = true)]

test/API.Test/API.Test.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@
7272
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
7373
</PropertyGroup>
7474
<ItemGroup>
75-
<Reference Include="API.Library, Version=4.3.1, Culture=neutral, processorArchitecture=MSIL">
75+
<Reference Include="API.Library, Version=4.3.2, Culture=neutral, processorArchitecture=MSIL">
7676
<SpecificVersion>False</SpecificVersion>
77-
<HintPath>..\packages\API.Library.4.3.1\API.Library.dll</HintPath>
77+
<HintPath>..\packages\API.Library.4.3.2\API.Library.dll</HintPath>
7878
</Reference>
7979
<Reference Include="Enyim.Caching, Version=2.16.0.0, Culture=neutral, PublicKeyToken=cec98615db04012e, processorArchitecture=MSIL">
8080
<HintPath>..\packages\EnyimMemcached.2.16.0\lib\net35\Enyim.Caching.dll</HintPath>

test/API.Test/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@
3030
//
3131
// You can specify all the values or you can default the Revision and Build Numbers
3232
// by using the '*' as shown below:
33-
[assembly: AssemblyVersion("4.3.1")]
34-
[assembly: AssemblyFileVersion("4.3.1")]
33+
[assembly: AssemblyVersion("4.3.2")]
34+
[assembly: AssemblyFileVersion("4.3.2")]

0 commit comments

Comments
 (0)