Added Info message when netstandard app use perf counter in non azure web app environment
This commit is contained in:
Родитель
1599917a86
Коммит
0e62b95316
|
@ -12,11 +12,19 @@
|
|||
/// </summary>
|
||||
public IEnumerable<PerformanceCounterData> PerformanceCounters { get; } = new PerformanceCounterData[0];
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StandardPerformanceCollector"/> class.
|
||||
/// </summary>
|
||||
public StandardPerformanceCollector()
|
||||
{
|
||||
PerformanceCollectorEventSource.Log.PerfCounterNetCoreOnlyOnAzureWebApp();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs collection for all registered counters.
|
||||
/// </summary>
|
||||
/// <param name="onReadingFailure">Invoked when an individual counter fails to be read.</param>
|
||||
public IEnumerable<Tuple<PerformanceCounterData, double>> Collect(Action<string, Exception> onReadingFailure = null)
|
||||
public IEnumerable<Tuple<PerformanceCounterData, double>> Collect(Action<string, Exception> onReadingFailure = null)
|
||||
{
|
||||
return StandardPerformanceCollector.emptyCollectResult;
|
||||
}
|
||||
|
|
|
@ -183,7 +183,13 @@
|
|||
this.WriteEvent(20, count, this.ApplicationName);
|
||||
}
|
||||
|
||||
#endregion
|
||||
[Event(21, Level = EventLevel.Informational, Message = @"PerfCounter collection is supported for Apps targetting .NET Core only when they are deployed as Azure Web Apps")]
|
||||
public void PerfCounterNetCoreOnlyOnAzureWebApp(string applicationName = "dummy")
|
||||
{
|
||||
this.WriteEvent(21, this.ApplicationName);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
[NonEvent]
|
||||
private string GetApplicationName()
|
||||
|
|
|
@ -6,10 +6,10 @@ CALL buildReleaseFull.cmd
|
|||
set BuildRoot=%~dp0..\bin\Release\
|
||||
set VSTestPath=%PROGRAMFILES(x86)%\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe
|
||||
|
||||
CALL "%VSTestPath%" /UseVsixExtensions:true "%BuildRoot%Test\E2ETests\E2ETests\DependencyCollectionTests.dll" /TestCaseFilter:"TestCategory=Core20" /logger:trx
|
||||
CALL "%VSTestPath%" "%BuildRoot%Test\E2ETests\E2ETests\DependencyCollectionTests.dll" /TestCaseFilter:"TestCategory=Core20" /logger:trx
|
||||
|
||||
CALL "%VSTestPath%" /UseVsixExtensions:true "%BuildRoot%Test\E2ETests\E2ETests\DependencyCollectionTests.dll" /TestCaseFilter:"TestCategory=Net452OnNet462" /logger:trx
|
||||
CALL "%VSTestPath%" "%BuildRoot%Test\E2ETests\E2ETests\DependencyCollectionTests.dll" /TestCaseFilter:"TestCategory=Net452OnNet462" /logger:trx
|
||||
|
||||
CALL "%VSTestPath%" /UseVsixExtensions:true "%BuildRoot%Test\E2ETests\E2ETests\DependencyCollectionTests.dll" /TestCaseFilter:"TestCategory=Net452OnNet462SM" /logger:trx
|
||||
CALL "%VSTestPath%" "%BuildRoot%Test\E2ETests\E2ETests\DependencyCollectionTests.dll" /TestCaseFilter:"TestCategory=Net452OnNet462SM" /logger:trx
|
||||
|
||||
PAUSE
|
||||
|
|
|
@ -6,6 +6,6 @@ CALL buildReleaseFull.cmd
|
|||
set BuildRoot=%~dp0..\bin\Release\
|
||||
set VSTestPath=%PROGRAMFILES(x86)%\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe
|
||||
|
||||
CALL "%VSTestPath%" /UseVsixExtensions:true "%BuildRoot%Test\Web\FunctionalTests\FunctionalTests\Functional.dll" /logger:trx
|
||||
CALL "%VSTestPath%" "%BuildRoot%Test\Web\FunctionalTests\FunctionalTests\Functional.dll" /logger:trx
|
||||
|
||||
PAUSE
|
||||
|
|
Загрузка…
Ссылка в новой задаче