dotnet / dotnet/diagnostics

Dotnet-trace data collection more granular?

Open
#1,744 2 comments 0 reactions 0 assignees View on GitHub
documentation enhancement
Dominant language
C++
Stars
1.3k
Forks
404
Avg merge
2d 5h
Merged PRs (30d)
35

Description

Using a test application that creates a lot of objects and saves it in a heap, I took a trace using this command:
`dotnet-trace collect --process-id --providers Microsoft-Windows-DotNETRuntime:41D8800B:5,Microsoft-DotNETCore-SampleProfiler --duration 00:00:00:10 `
and
`dotnet-trace collect --process-id --providers Microsoft-Windows-DotNETRuntime:41D8800B:5,Microsoft-DotNETCore-SampleProfiler --buffersize 1024 --duration 00:00:00:10`
The file sizes were ~256Mb and ~1Gb respectively. This is expected because of the different buffersizes that are defined. When there are a lot of objects in the heap, the trace file grows to the 1Gb buffersize in about 5 seconds. Raising or lowering the buffersize in our situation does not fix the problem. My assumption is that when lowering the buffersize, the application could be loosing valuable trace information randomly and uncontrollably. Perfview has an options like CPUSampleMSec and DotNetAllocSampled that limit the amount of information that is gathered when collecting a trace, which then in turn lowers the trace file size.

In dotnet-trace, is there a similar command as to that in Perfview that would allow you to get a more granular trace without exceeding/hitting the limit of the buffersize that is defined?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.