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

Added ETW events #322

Merged
merged 2 commits into from
Aug 17, 2019
Merged

Added ETW events #322

merged 2 commits into from
Aug 17, 2019

Conversation

Shyam-Gupta
Copy link
Member

@Shyam-Gupta Shyam-Gupta commented Aug 15, 2019

A sample PerfView log:

image

Call stacks getting captured with the events:

image

@codecov-io
Copy link

codecov-io commented Aug 15, 2019

Codecov Report

Merging #322 into v2.1 will decrease coverage by 2.2%.
The diff coverage is 46.53%.

Impacted file tree graph

@@            Coverage Diff             @@
##             v2.1     #322      +/-   ##
==========================================
- Coverage   89.64%   87.43%   -2.21%     
==========================================
  Files          31       32       +1     
  Lines        1951     2046      +95     
  Branches      369      390      +21     
==========================================
+ Hits         1749     1789      +40     
- Misses        156      209      +53     
- Partials       46       48       +2
Impacted Files Coverage Δ
src/StreamJsonRpc/JsonRpcEventSource.cs 7.31% <7.31%> (ø)
src/StreamJsonRpc/JsonRpc.cs 91.72% <73.33%> (-1.64%) ⬇️
src/StreamJsonRpc/MessageHandlerBase.cs 95.23% <0%> (-2.39%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f5f1af...a0ba0d7. Read the comment docs.


if (JsonRpcEventSource.Instance.IsEnabled())
{
JsonRpcEventSource.Instance.SendRequestStop($"ResponseDetails: {responseDetails}; RequestDetails: Id: \"{request.Id}\", Method: \"{request.Method}\", Arguments: \"{JsonRpcEventSource.GetArgumentsString(request.Arguments)}\"");
Copy link
Member Author

Choose a reason for hiding this comment

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

For some reason, Duration_Msec is not getting captured for most of the SendRequestStop events. For such events, no ActivityId shows up in PerfView.
In case of WinForms designer, we spawn a .NetCore process from devenv. Not sure if framework mismatch is the issue.

Copy link
Member

Choose a reason for hiding this comment

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

That's probably because of missing attribute properties. See #322 (comment)

Copy link
Member Author

Choose a reason for hiding this comment

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

Tried but it didn't help.

Copy link
Member

@AArnott AArnott left a comment

Choose a reason for hiding this comment

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

Looking much better.

@Shyam-Gupta
Copy link
Member Author

/azp run vs-streamjsonrpc

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 322 in repo microsoft/vs-streamjsonrpc

@Shyam-Gupta Shyam-Gupta reopened this Aug 17, 2019
@AArnott AArnott force-pushed the dev/shgu/etwEvents branch from 47a39ad to 959bdc7 Compare August 17, 2019 01:49
@AArnott AArnott changed the base branch from master to v2.1 August 17, 2019 01:49
@AArnott
Copy link
Member

AArnott commented Aug 17, 2019

I took the liberty of squashing and rebasing your commits from master to v2.1 so that we can check this in for 16.3.

@AArnott
Copy link
Member

AArnott commented Aug 17, 2019

I've revised the ETW events somewhat to provide more data-friendly events. Here's how the perfview grid looks now. Note the columns dedicated for methods, args. We provide this string data only on the start event so the stop event can be leaner.

image

@AArnott AArnott force-pushed the dev/shgu/etwEvents branch from 0a6751b to bd10c27 Compare August 17, 2019 05:25
By providing method names and args as separate parameters instead of a pre-formatted string, ETW recognizes it as distinct data, allowing us to filter and sort on it, etc.
@AArnott AArnott force-pushed the dev/shgu/etwEvents branch from bd10c27 to a0ba0d7 Compare August 17, 2019 05:30
@AArnott AArnott added this to the v2.1 milestone Aug 17, 2019
@AArnott AArnott self-assigned this Aug 17, 2019
@AArnott AArnott merged commit 8cc34f1 into microsoft:v2.1 Aug 17, 2019
@Shyam-Gupta
Copy link
Member Author

Thanks Andrew for making the changes. Looks very good now.

AArnott added a commit that referenced this pull request Jan 14, 2025
Update .NET SDK and xunit.runner.visualstudio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants