Skip to content

Commit 6b2e062

Browse files
carlossanlopRon Petrusha
authored andcommitted
coreclr: Automatic port of triple slash from System.Diagnostics.Tracing (#2717)
* coreclr: Automatic port of triple slash from System.Diagnostics.Tracing * Various suggestions Co-Authored-By: Noah Falk <[email protected]> * Update DiagnosticCounter.xml * Update IncrementingEventCounter.xml * Update IncrementingPollingCounter.xml * Update PollingCounter.xml * Update IncrementingPollingCounter.xml
1 parent ef6a96c commit 6b2e062

File tree

4 files changed

+73
-31
lines changed

4 files changed

+73
-31
lines changed

xml/System.Diagnostics.Tracing/DiagnosticCounter.xml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</Interface>
1919
</Interfaces>
2020
<Docs>
21-
<summary>To be added.</summary>
21+
<summary><see cref="T:System.Diagnostics.Tracing.DiagnosticCounter" /> is an abstract class that serves as the parent class for various Counter* classes, namely <see cref="T:System.Diagnostics.Tracing.EventCounter" />, <see cref="T:System.Diagnostics.Tracing.PollingCounter" />, <see cref="T:System.Diagnostics.Tracing.IncrementingEventCounter" />, and <see cref="T:System.Diagnostics.Tracing.IncrementingPollingCounter" />.</summary>
2222
<remarks>To be added.</remarks>
2323
</Docs>
2424
<Members>
@@ -42,9 +42,9 @@
4242
<Parameter Name="value" Type="System.String" />
4343
</Parameters>
4444
<Docs>
45-
<param name="key">To be added.</param>
46-
<param name="value">To be added.</param>
47-
<summary>To be added.</summary>
45+
<param name="key">The metadata key.</param>
46+
<param name="value">The metadata value.</param>
47+
<summary>Adds key-value metadata to the counter that will be included as a part of the payload</summary>
4848
<remarks>To be added.</remarks>
4949
</Docs>
5050
</Member>
@@ -89,8 +89,14 @@
8989
</ReturnValue>
9090
<Parameters />
9191
<Docs>
92-
<summary>To be added.</summary>
93-
<remarks>To be added.</remarks>
92+
<summary>Removes the counter from the set that the <see cref="T:System.Diagnostics.Tracing.EventSource" /> will report on.</summary>
93+
<remarks>
94+
<format type="text/markdown"><![CDATA[
95+
96+
After being disposed, this counter will do nothing, and its resources will be reclaimed when all references to it are removed. If an <see cref="T:System.Diagnostics.Tracing.EventCounter" /> is not explicitly disposed, it will be cleaned up automatically when the <see cref="T:System.Diagnostics.Tracing.EventSource" /> it is attached to dies.
97+
98+
]]></format>
99+
</remarks>
94100
</Docs>
95101
</Member>
96102
<Member MemberName="EventSource">
@@ -136,4 +142,4 @@
136142
</Docs>
137143
</Member>
138144
</Members>
139-
</Type>
145+
</Type>

xml/System.Diagnostics.Tracing/IncrementingEventCounter.xml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,14 @@
1414
</Base>
1515
<Interfaces />
1616
<Docs>
17-
<summary>To be added.</summary>
18-
<remarks>To be added.</remarks>
17+
<summary>Provides a variant of <see cref="T:System.Diagnostics.Tracing.EventCounter" /> for variables that are ever-increasing, such as the number of exceptions in the runtime.</summary>
18+
<remarks>
19+
<format type="text/markdown"><![CDATA[
20+
21+
`IncrementingEventCounter` does not calculate statistics like mean or standard deviation because it only accumulates the counter value.
22+
23+
]]></format>
24+
</remarks>
1925
</Docs>
2026
<Members>
2127
<Member MemberName=".ctor">
@@ -34,10 +40,16 @@
3440
<Parameter Name="eventSource" Type="System.Diagnostics.Tracing.EventSource" />
3541
</Parameters>
3642
<Docs>
37-
<param name="name">To be added.</param>
38-
<param name="eventSource">To be added.</param>
39-
<summary>To be added.</summary>
40-
<remarks>To be added.</remarks>
43+
<param name="name">The name for this <see cref="T:System.Diagnostics.Tracing.IncrementingEventCounter" /> instance.</param>
44+
<param name="eventSource">The event source.</param>
45+
<summary>Initializes a new instance of the <see cref="T:System.Diagnostics.Tracing.IncrementingEventCounter" /> class.</summary>
46+
<remarks>
47+
<format type="text/markdown"><![CDATA[
48+
49+
Incrementing event counters live as long as the <see cref="T:System.Diagnostics.Tracing.EventSource" /> that they are attached to unless they are explicitly disposed.
50+
51+
]]></format>
52+
</remarks>
4153
</Docs>
4254
</Member>
4355
<Member MemberName="DisplayRateTimeScale">
@@ -79,10 +91,10 @@
7991
<Parameter Name="increment" Type="System.Double" />
8092
</Parameters>
8193
<Docs>
82-
<param name="increment">To be added.</param>
83-
<summary>To be added.</summary>
94+
<param name="increment">The value to increment the running total by.</param>
95+
<summary>Adds a value to a running total that will be published by the counter at the next timer interval.</summary>
8496
<remarks>To be added.</remarks>
8597
</Docs>
8698
</Member>
8799
</Members>
88-
</Type>
100+
</Type>

xml/System.Diagnostics.Tracing/IncrementingPollingCounter.xml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,14 @@
1414
</Base>
1515
<Interfaces />
1616
<Docs>
17-
<summary>To be added.</summary>
18-
<remarks>To be added.</remarks>
17+
<summary>Provides a variant of <see cref="T:System.Diagnostics.Tracing.EventCounter" /> for variables that are ever-increasing, such as the number of exceptions in the runtime.</summary>
18+
<remarks>
19+
<format type="text/markdown"><![CDATA[
20+
21+
`IncrementingPollingCounter` does not calculate statistics like mean and standard deviation because it only accumulates the counter value. Unlike <see cref="T:System.Diagnostics.Tracing.IncrementingEventCounter" />, this takes in a polling callback that it can call to update its own metric periodically.
22+
23+
]]></format>
24+
</remarks>
1925
</Docs>
2026
<Members>
2127
<Member MemberName=".ctor">
@@ -35,11 +41,17 @@
3541
<Parameter Name="totalValueProvider" Type="System.Func&lt;System.Double&gt;" />
3642
</Parameters>
3743
<Docs>
38-
<param name="name">To be added.</param>
39-
<param name="eventSource">To be added.</param>
44+
<param name="name">The name for this <see cref="T:System.Diagnostics.Tracing.IncrementingPollingCounter" /> instance.</param>
45+
<param name="eventSource">The event source.</param>
4046
<param name="totalValueProvider">To be added.</param>
41-
<summary>To be added.</summary>
42-
<remarks>To be added.</remarks>
47+
<summary>Initializes a new instance of the <see cref="T:System.Diagnostics.Tracing.IncrementingPollingCounter" /> class.</summary>
48+
<remarks>
49+
<format type="text/markdown"><![CDATA[
50+
51+
<xref:System.Diagnostics.Tracing.IncrementingPollingCounter> objects live as long as the <xref:System.Diagnostics.Tracing.EventSource> that they are attached to unless they are explicitly disposed.
52+
53+
]]></format>
54+
</remarks>
4355
</Docs>
4456
</Member>
4557
<Member MemberName="DisplayRateTimeScale">
@@ -64,4 +76,4 @@
6476
</Docs>
6577
</Member>
6678
</Members>
67-
</Type>
79+
</Type>

xml/System.Diagnostics.Tracing/PollingCounter.xml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,15 @@
1414
</Base>
1515
<Interfaces />
1616
<Docs>
17-
<summary>To be added.</summary>
18-
<remarks>To be added.</remarks>
19-
</Docs>
17+
<summary>Provides a variant of <see cref="T:System.Diagnostics.Tracing.EventCounter" /> that collects and calculates similar statistics as <see cref="T:System.Diagnostics.Tracing.EventCounter" />.</summary>
18+
<remarks>
19+
<format type="text/markdown"><![CDATA[
20+
21+
`PollingCounter` differs from <see cref="T:System.Diagnostics.Tracing.EventCounter" /> in that it takes a callback function to collect metrics on its own rather than requiring the user to call <see cref="M:System.Diagnostics.Tracing.EventCounter.WriteMetric(System.Double)" /> every time.
22+
23+
]]></format>
24+
</remarks>
25+
</Docs>
2026
<Members>
2127
<Member MemberName=".ctor">
2228
<MemberSignature Language="C#" Value="public PollingCounter (string name, System.Diagnostics.Tracing.EventSource eventSource, Func&lt;double&gt; metricProvider);" />
@@ -35,12 +41,18 @@
3541
<Parameter Name="metricProvider" Type="System.Func&lt;System.Double&gt;" />
3642
</Parameters>
3743
<Docs>
38-
<param name="name">To be added.</param>
39-
<param name="eventSource">To be added.</param>
44+
<param name="name">The name for this <see cref="T:System.Diagnostics.Tracing.PollingCounter" /> instance.</param>
45+
<param name="eventSource">The event source.</param>
4046
<param name="metricProvider">To be added.</param>
41-
<summary>To be added.</summary>
42-
<remarks>To be added.</remarks>
47+
<summary>Initializes a new instance of the <see cref="T:System.Diagnostics.Tracing.PollingCounter" /> class.</summary>
48+
<remarks>
49+
<format type="text/markdown"><![CDATA[
50+
51+
Polling counters live as long as the <see cref="T:System.Diagnostics.Tracing.EventSource" /> that they are attached to unless they are explicitly disposed.
52+
53+
]]></format>
54+
</remarks>
4355
</Docs>
4456
</Member>
4557
</Members>
46-
</Type>
58+
</Type>

0 commit comments

Comments
 (0)