From 6be933f64977fc6e264526f378b48ecac90290cd Mon Sep 17 00:00:00 2001 From: Justin Anderson Date: Tue, 15 Jun 2021 09:27:46 -0700 Subject: [PATCH 1/5] Copy endpoint info, runtime info, commmand parsing, and tests from dotnet/diagnostics. --- eng/Versions.props | 1 + .../CommandLineHelper.cs | 69 ++++ .../EndpointInfo/ClientEndpointInfoSource.cs | 54 ++++ .../EndpointInfo/EndpointInfo.cs | 99 ++++++ .../EndpointInfo/IEndpointInfoSource.cs | 36 +++ .../EndpointInfo/ServerEndpointInfoSource.cs | 272 ++++++++++++++++ .../SchemaGenerationTests.cs | 1 + .../OpenApiGeneratorTests.cs | 1 + .../CommonTestTimeouts.cs | 26 ++ .../DiagnosticPortHelper.cs | 2 +- ...t.Diagnostics.Monitoring.TestCommon.csproj | 10 + .../Runners/AppRunner.cs | 24 +- .../Runners/AppRunnerExtensions.cs | 28 +- .../Runners/ConsoleLogEvent.cs | 2 +- .../{ => Runners}/DotNetRunner.cs | 3 +- .../{ => Runners}/LoggingRunnerAdapter.cs | 3 +- .../DumpTests.cs | 3 +- .../ProcessTests.cs | 5 +- .../Runners/MonitorRunnerExtensions.cs | 2 +- .../Runners/ScenarioRunner.cs | 3 +- .../TestTimeouts.cs | 15 - .../CommandLineHelperTests.cs | 43 +++ .../EndpointInfoSourceTests.cs | 299 ++++++++++++++++++ ...ft.Diagnostics.Monitoring.UnitTests.csproj | 6 +- .../DiagnosticPortConnectionMode.cs | 19 ++ .../dotnet-monitor/DiagnosticPortOptions.cs | 9 - .../DiagnosticPortOptionsDefaults.cs | 4 - .../DiagnosticsMonitorCommandHandler.cs | 5 +- .../Egress/AzureBlobEgressFactory.cs | 1 - .../Egress/ConfiguredEgressProvider.cs | 1 - .../dotnet-monitor/Egress/EgressService.cs | 1 - .../Egress/FileSystemEgressFactory.cs | 1 - .../FilteredEndpointInfoSource.cs | 2 +- ...FilteredEndpointInfoSourceHostedService.cs | 2 +- src/Tools/dotnet-monitor/Program.cs | 1 - src/Tools/dotnet-monitor/RuntimeInfo.cs | 46 +++ 36 files changed, 1025 insertions(+), 74 deletions(-) create mode 100644 src/Microsoft.Diagnostics.Monitoring.WebApi/CommandLineHelper.cs create mode 100644 src/Microsoft.Diagnostics.Monitoring.WebApi/EndpointInfo/ClientEndpointInfoSource.cs create mode 100644 src/Microsoft.Diagnostics.Monitoring.WebApi/EndpointInfo/EndpointInfo.cs create mode 100644 src/Microsoft.Diagnostics.Monitoring.WebApi/EndpointInfo/IEndpointInfoSource.cs create mode 100644 src/Microsoft.Diagnostics.Monitoring.WebApi/EndpointInfo/ServerEndpointInfoSource.cs create mode 100644 src/Tests/Microsoft.Diagnostics.Monitoring.TestCommon/CommonTestTimeouts.cs rename src/Tests/{Microsoft.Diagnostics.Monitoring.Tool.UnitTests => Microsoft.Diagnostics.Monitoring.TestCommon}/DiagnosticPortHelper.cs (96%) rename src/Tests/{Microsoft.Diagnostics.Monitoring.Tool.UnitTests => Microsoft.Diagnostics.Monitoring.TestCommon}/Runners/AppRunner.cs (90%) rename src/Tests/{Microsoft.Diagnostics.Monitoring.Tool.UnitTests => Microsoft.Diagnostics.Monitoring.TestCommon}/Runners/AppRunnerExtensions.cs (79%) rename src/Tests/{Microsoft.Diagnostics.Monitoring.Tool.UnitTests => Microsoft.Diagnostics.Monitoring.TestCommon}/Runners/ConsoleLogEvent.cs (93%) rename src/Tests/Microsoft.Diagnostics.Monitoring.TestCommon/{ => Runners}/DotNetRunner.cs (98%) rename src/Tests/Microsoft.Diagnostics.Monitoring.TestCommon/{ => Runners}/LoggingRunnerAdapter.cs (98%) create mode 100644 src/Tests/Microsoft.Diagnostics.Monitoring.UnitTests/CommandLineHelperTests.cs create mode 100644 src/Tests/Microsoft.Diagnostics.Monitoring.UnitTests/EndpointInfoSourceTests.cs create mode 100644 src/Tools/dotnet-monitor/DiagnosticPortConnectionMode.cs create mode 100644 src/Tools/dotnet-monitor/RuntimeInfo.cs diff --git a/eng/Versions.props b/eng/Versions.props index 297f06ae4b9..5ddd7bc9614 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -64,6 +64,7 @@ 10.3.11 5.6.3 + 2.4.1