/
IPerformanceCounterFactory.cs
41 lines (39 loc) · 1.93 KB
/
IPerformanceCounterFactory.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
namespace JetBlack.Diagnostics.Monitoring
{
/// <summary>
/// An interface defining the methods required to create performance counters.
/// </summary>
public interface IPerformanceCounterFactory
{
/// <summary>
/// Create a single instance performance counter.
/// </summary>
/// <param name="categoryName">The category name.</param>
/// <param name="counterName">The counter name.</param>
/// <param name="readOnly">If true the counter is read only, otherwise it is writable.</param>
/// <returns>A performance counter.</returns>
IPerformanceCounter Create(string categoryName, string counterName, bool readOnly);
/// <summary>
/// Create an multi instance performance counter.
/// </summary>
/// <param name="categoryName">The category name.</param>
/// <param name="counterName">The counter name.</param>
/// <param name="instanceName">The instance name.</param>
/// <param name="readOnly">If true the counter is read only, otherwise it is writable.</param>
/// <returns>A performance counter.</returns>
IPerformanceCounter Create(string categoryName, string counterName, string instanceName, bool readOnly);
/// <summary>
/// Create a performance counter on a remote machine.
///
/// For a single instance counter pass an empty string to the instance name.
///
/// You cannot write to a remote performance counter.
/// </summary>
/// <param name="categoryName">The category name.</param>
/// <param name="counterName">The counter name.</param>
/// <param name="instanceName">The instance name.</param>
/// <param name="machineName">The machine name.</param>
/// <returns></returns>
IPerformanceCounter Create(string categoryName, string counterName, string instanceName, string machineName);
}
}