Skip to content

[continuous-profiler] inaccurate sampling interval on Windows #4508

@lachmatt

Description

@lachmatt

Bug Report

Symptom

Describe the bug
Default timer resolution on Windows is 15.625ms.
Due to that, thread samples are collected less frequently than requested (e.g. every 31.25ms instead of 20ms requested by the plugin).

Additional context

One of the options to increase timer resolution is to set it using timeBeginPeriod. This seems to be used by e.g. runtime's own sampling profiler.
There are some downsides to increasing timer resolution, as described in runtime's repository and in this blog post, but I think they are acceptable for this project.

Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions