How to do Performance test in vb 6.0 ?

Prati
10-04-2005, 01:13 AM
One way to do the Performance test is as given below. However if this code is place in a std module or a class it giving problem in the product (like some forms are getting loaded & not unloaded)

Current code that is used -
Private Declare Function GetTickCount Lib "kernel32" () As Long
Public lStartTime As Long
Dim m_objAT As New CAuditTrail
lStartTime = 0
lStartTime = GetTickCount
If GetTickCount - lStartTime > 0 Then
m_objAT.WriteEntryViewermetrics Me.Name & ", InitSubmissionSequencesFromFolder, " & GetTickCount - lStartTime & "," & Now()
End If

Procedure in the class module-
Public Sub WriteEntryViewermetrics(ByVal strStmt As String, Optional fUseTimeStamp = True)

Dim m_objFSO As New FileSystemObject

On Error GoTo WE_Err:
Dim objTS As TextStream
Set objTS = m_objFSO.OpenTextFile(theAppManager.GetDSSPath() & "\Logs\" & "Viewermetrics.Log", ForAppending, True)

objTS.WriteLine strStmt
objTS.Close
Exit Sub

WE_Err:
Err.Raise Err.Number & Err.Source, Err.Description
Exit Sub

Can one suggest me any other method to it.
Thanks,
Prati

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum