Skip to content

Backport System.Diagnostics.Process timing XML docs from runtime PR 130794#12887

Open
adamsitnik with Copilot wants to merge 12 commits into
mainfrom
copilot/backport-xml-doc-updates
Open

Backport System.Diagnostics.Process timing XML docs from runtime PR 130794#12887
adamsitnik with Copilot wants to merge 12 commits into
mainfrom
copilot/backport-xml-doc-updates

Conversation

Copilot AI commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

This PR backports the Process timing-property documentation updates from dotnet/runtime#130794 into dotnet-api-docs. It aligns API reference behavior notes for post-exit access across Windows and Unix.

  • StartTime

    • Replaced placeholder remarks with platform-specific behavior:
      • Windows: readable after exit if a process handle is available.
      • Unix: value is cached on first access; uncached post-exit access can fail.
    • Updated InvalidOperationException text to describe uncached/unavailable Unix and no-handle Windows cases.
  • ExitTime

    • Added explicit InvalidOperationException documentation for access before process exit, missing association, and Windows no-handle scenarios.
  • Processor timing properties (PrivilegedProcessorTime, TotalProcessorTime, UserProcessorTime)

    • Added platform behavior remarks for post-exit access (Windows available with handle, Unix unavailable).
    • Added InvalidOperationException and Win32Exception entries consistent with runtime behavior.
    • Updated summaries to match runtime wording intent for kernel/user/total CPU time semantics.
  • Doc consistency and cleanup

    • Removed placeholder text and normalized remarks formatting in affected member docs.
    • Kept changes scoped to /xml/System.Diagnostics/Process.xml.
<exception cref="T:System.InvalidOperationException">
No process is associated with this object; on Windows, there is no process handle available; or on Unix, the value was not cached and is unavailable after the process exited.
</exception>

@adamsitnik
adamsitnik marked this pull request as ready for review July 20, 2026 11:06
@adamsitnik
adamsitnik requested a review from a team as a code owner July 20, 2026 11:06
Copilot AI review requested due to automatic review settings July 20, 2026 11:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR backports documentation updates for System.Diagnostics.Process timing-related members to better describe platform-specific behavior (Windows vs Unix), especially for post-exit property access and associated exceptions.

Changes:

  • Updated StartTime remarks and exceptions to describe Windows handle-based access and Unix caching/unavailability behavior.
  • Added/updated exception documentation and platform behavior remarks for ExitTime and processor timing properties (PrivilegedProcessorTime, TotalProcessorTime, UserProcessorTime).
  • Cleaned up placeholder content in affected member docs.

Comment thread xml/System.Diagnostics/Process.xml Outdated
Comment thread xml/System.Diagnostics/Process.xml Outdated

@adamsitnik adamsitnik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot address the feedback

Comment thread xml/System.Diagnostics/Process.xml Outdated
Comment thread xml/System.Diagnostics/Process.xml Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.

Comment thread xml/System.Diagnostics/Process.xml Outdated
Comment thread xml/System.Diagnostics/Process.xml Outdated
Comment thread xml/System.Diagnostics/Process.xml
Comment thread xml/System.Diagnostics/Process.xml
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-system-diagnostics-process

</ReturnValue>
<Docs>
<summary>Gets the total processor time for this process.</summary>
<summary>Gets the amount of time the associated process has spent utilizing the CPU. This value is the sum of the <see cref="P:System.Diagnostics.Process.UserProcessorTime" /> and the <see cref="P:System.Diagnostics.Process.PrivilegedProcessorTime" />.</summary>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<summary>Gets the amount of time the associated process has spent utilizing the CPU. This value is the sum of the <see cref="P:System.Diagnostics.Process.UserProcessorTime" /> and the <see cref="P:System.Diagnostics.Process.PrivilegedProcessorTime" />.</summary>
<summary>Gets the amount of time the associated process has spent utilizing the CPU. This value is the sum of <see cref="P:System.Diagnostics.Process.UserProcessorTime" /> and <see cref="P:System.Diagnostics.Process.PrivilegedProcessorTime" />.</summary>


]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">Attempting to access this property before the process has exited, when no process is associated with this object, or (on Windows) when there is no process handle available.</exception>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<exception cref="T:System.InvalidOperationException">Attempting to access this property before the process has exited, when no process is associated with this object, or (on Windows) when there is no process handle available.</exception>
<exception cref="T:System.InvalidOperationException">You're attempting to access this property before the process has exited, when no process is associated with this object, or (on Windows) when there is no process handle available.</exception>

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.

4 participants