Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log callbacks to delegates better #3283

Merged
merged 10 commits into from
Feb 2, 2022
Merged

Conversation

nohwnd
Copy link
Member

@nohwnd nohwnd commented Jan 27, 2022

Description

Log what is being called when event is invoked.

Example of the log: TpTrace Verbose: 0 : 20708, 3, 2022/01/27, 13:26:24.691, 2456941827563, vstest.console.exe, MulticastDelegateUtilities.SafeInvoke: InternalTestLoggerEvents.SendTestRunStart: Invoking callback 1/1 for Microsoft.VisualStudio.TestPlatform.CommandLine.Internal.ConsoleLogger.TestRunStartHandler, took 0 ms.


TpTrace Verbose: 0 : 84508, 7, 2022/01/27, 13:33:05.983, 2460954751207, vstest.console.exe, MulticastDelegateUtilities.SafeInvoke: TestRun.TestRunComplete: Invoking callback 2/2 for Microsoft.VisualStudio.TestPlatform.CommandLine.TestRunResultAggregator.TestRunCompletionHandler, took 0 ms.

TpTrace Verbose: 0 : 84508, 7, 2022/01/27, 13:33:05.983, 2460954753814, vstest.console.exe, MulticastDelegateUtilities.SafeInvoke: TestRun.TestRunComplete: Invoking callback 2/2 for Microsoft.VisualStudio.TestPlatform.CommandLine.Processors.RunTestsArgumentExecutor+TestRunRequestEventsRegistrar.TestRunRequest_OnRunCompletion, took 0 ms.


TpTrace Verbose: 0 : 62012, 5, 2022/01/27, 13:46:07.014, 2468765066033, vstest.console.exe, TcpClientExtensions.MessageLoopAsync: Polling on remoteEndPoint: 127.0.0.1:1055 localEndPoint: 127.0.0.1:1054
TpTrace Verbose: 0 : 62012, 5, 2022/01/27, 13:46:07.014, 2468765066212, vstest.console.exe, TcpClientExtensions.MessageLoopAsync: NotifyDataAvailable remoteEndPoint: 127.0.0.1:1055 localEndPoint: 127.0.0.1:1054
TpTrace Verbose: 0 : 62012, 5, 2022/01/27, 13:46:07.014, 2468765066380, vstest.console.exe, LengthPrefixCommunicationChannel.NotifyDataAvailable: New data are waiting to be received, but there is no subscriber to be notified. Not reading them from the stream.

@@ -63,6 +63,13 @@ public Task Send(string data)
/// <inheritdoc />
public Task NotifyDataAvailable()
{
// TODO: Review the comment below, because it says something different than what is
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a todo for you before the PR gets merged or a later change that needs to be done? If the 2nd, could we create a ticket and link it to the todo?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please do it 😏

@MarcoRossignoli
Copy link
Contributor

I think it's a good addition thx @nohwnd, it should help a lot during the investigations.

nohwnd and others added 3 commits January 28, 2022 02:30
Co-authored-by: Amaury Levé <amaury.leve@gmail.com>
@nohwnd nohwnd enabled auto-merge (squash) January 28, 2022 14:07
Copy link
Member

@Evangelink Evangelink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor comments, otherwise LGTM.

Co-authored-by: Amaury Levé <amaury.leve@gmail.com>
auto-merge was automatically disabled January 28, 2022 14:26

Pull Request is not mergeable

@nohwnd nohwnd enabled auto-merge (squash) January 31, 2022 20:19
@nohwnd nohwnd merged commit bcb43c5 into microsoft:main Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants