System.Diagnostics.PerformanceCounter.Increment C# (CSharp) Method

Increment() public method

public Increment ( ) : long
return long
        public long Increment() { throw null; }
        public long IncrementBy(long value) { throw null; }

Usage Example

Esempio n. 1
0
        static void Main(string[] args)
        {
            if (CreatePerformanecCounters())
            {
                Console.WriteLine("Created performance counters");
                Console.WriteLine("Please restart the application");
                Console.ReadKey();

                return;
            }

            var totalOperationsCounter = new PerformanceCounter(
                "MyCategory",
                "# operations executed",
                "",
                false);
            var operationsPerSecondCounter = new PerformanceCounter(
                "MyCategory",
                "# operations sec",
                "",
                false);

            totalOperationsCounter.Increment();
            operationsPerSecondCounter.Increment();
        }
All Usage Examples Of System.Diagnostics.PerformanceCounter::Increment