Skip to content

add dotnet-collect command that uses EventPipe #35

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

Merged
merged 2 commits into from
Oct 17, 2018

Conversation

analogrelay
Copy link
Contributor

Collects Event Traces from .NET processes

Usage: dotnet-collect [options]

Options:
  -c|--config-path <CONFIG_PATH>  The path of the EventPipe config file to write, must be named [AppName].eventpipeconfig and be in the base directory for a managed app.
  -p|--process-id <PROCESS_ID>    Filter to only the process with the specified process ID.
  -o|--output <OUTPUT_DIRECTORY>  The directory to write the trace to. Defaults to the current working directory.
  --buffer <BUFFER_SIZE_IN_MB>    The size of the in-memory circular buffer in megabytes.
  --provider <PROVIDER_SPEC>      An EventPipe provider to enable. A string in the form '<provider name>:<keywords>:<level>'. Can be specified multiple times to enable multiple providers.
  -?|-h|--help                    Show help information

The -c|--config-path is the only required option (though no providers will be enabled ;)). As an example, to collect all events from the .NET Runtime event source:

dotnet collect -c ./path/to/AppName.eventpipeconfig --provider Microsoft-Windows-DotNETRuntime

Files will be written to the output directory (-o|--output, defaults to current working directory) in the form [appname].[processId].netperf and can be viewed in PerfView.

Fixes #32

@analogrelay
Copy link
Contributor Author

FYI https://github.com/dotnet/coreclr/issues/20454 is tracking an issue where the eventpipeconfig file has to be next to dotnet.exe rather than next to the managed entry point dll.

Copy link
Member

@davidfowl davidfowl left a comment

Choose a reason for hiding this comment

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

The only thing wrong with this is your formatting

@analogrelay
Copy link
Contributor Author

I'llformatyou

@analogrelay analogrelay merged commit 990d88a into master Oct 17, 2018
@analogrelay analogrelay deleted the anurse/dotnet-collect-eventpipe branch October 17, 2018 15:18
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.

2 participants