Click here to Skip to main content
14,040,392 members
Click here to Skip to main content
Articles » Languages » VB.NET » Utilities » Downloads


50 bookmarked
Posted 26 Jul 2006
Licenced CPOL

Application dashboard for tracking .NET application performance

, 26 Jul 2006
Provides graphical feedback on the performance (memory usage, garbage collection, threads, exceptions, loaded classes) of a .NET application.
Imports System.Windows.Forms
Imports System.Diagnostics

Public Class SettingsForm

    Public Sub New()

        ' This call is required by the Windows Form Designer.

        ' Add all the running instances of .NET apps to the drop down list
        If PerformanceCounterCategory.CounterExists("# GC Handles", Form_Dashboard.COUNTER_CATEGORY_MEMORY) Then
            Dim pcInst As New PerformanceCounterCategory(Form_Dashboard.COUNTER_CATEGORY_MEMORY)
            With pcInst
                Dim Items() As String = .GetInstanceNames
                For Each f As String In Items
            End With
        End If

            If My.Settings.MonitoredInstanceName <> "" Then
                Me.ComboBox_ApplicationInstances.SelectedItem = My.Settings.MonitoredInstanceName
            End If
        Catch ex As Exception
        End Try

        With My.Settings
            Me.TextBox_Max_Classes.Text = .DialClassesMaximum.ToString
            Me.TextBox_Max_Exceptions.Text = .DialExceptionsMaximum.ToString
            Me.TextBox_Max_Garbage.Text = .DialGarbageMaximum.ToString
            Me.TextBox_Max_Memory.Text = .DialMemoryMaximum.ToString
            Me.TextBox_Max_Threads.Text = .DialThreadsMaximum.ToString
            Me.TextBox_Min_Classes.Text = .DialClassesMinimum.ToString
            Me.TextBox_Min_Exceptions.Text = .DialExceptionsMinimum.ToString
            Me.TextBox_Min_Garbage.Text = .DialGarbageMinimum.ToString
            Me.TextBox_Min_Memory.Text = .DialMemoryMinimum.ToString
            Me.TextBox_Min_Threads.Text = .DialThreadsMinimum.ToString
        End With

    End Sub

    Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.OK
    End Sub

    Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
    End Sub

    Public ReadOnly Property SelectedInstanceName() As String
            Return Me.ComboBox_ApplicationInstances.Text
        End Get
    End Property

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Duncan Edwards Jones
Software Developer (Senior)
Ireland Ireland
C# / SQL Server developer
Microsoft MVP (Azure) 2017
Microsoft MVP (Visual Basic) 2006, 2007

You may also be interested in...

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web06 | 2.8.190425.1 | Last Updated 27 Jul 2006
Article Copyright 2006 by Duncan Edwards Jones
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid