В первый раз, когда я пишу класс ASP, реализуйте функции: сегментированная статистическая программа время выполнения, таблица статистики вывода и т. Д.
Кода -копия выглядит следующим образом:
ClassCccclsprocessTimereCorder
Автор программы: Mingyuexingguang
«Домашняя страница автора: http://www.5iya.com/blog
'http://www.kuozhanming.com
'Класс статистики времени выполнения программы программы ASP
Privateccinti, ccintnoncetime, ccintdecimal
PrivateCcintStarttime, Ccintendtime, Ccintnow, Ccintnonce
PrivateCcstrinterval, CCStrevent, CCStrtime, CCStrstatitisticlog, CCStrformatInterval
PrivateCcarrevent, Ccarrtime
Privatesubclass_initialize
ccstrinterval = "|" '' Разделитель по умолчанию
ccintdecimal = 4' -number цифр после десятичной точки
ccstrevent = ""
ccstrime = ""
CCStrformatInterval = "<br/>" & vbcrlf
ccintstarttime = таймер
ccintnow = ccintstarttime
ccintnonce = ccintstarttime
Заканчивая
Publicsubrecord (ccstreventname)
ccstrevent = ccstrevent & ccstrinterval & reply (ccstreventname, ccstrinterval, "")
ccstrime = ccstrtime & ccstrinterval & formatnumber (timer-ccintnow, ccintdecimal, true, false, true)
ccintnow = таймер
Заканчивая
PublicPropertyletformat (ccstrformattype)
Iflcase (trim (ccstrformattype)) = "html" then
CCStrformatInterval = "<br/>" & vbcrlf
Еще
CCStrformatInterval = VBCRLF
Эндиф
EndProperty
PublicfunctionStatistic
Ifinstr (ccstrevent, ccstrinterval)> 0then
ccintendtime = таймер
ccarrevent = split (ccstrevent, ccstrinterval)
ccarrtime = split (ccstrtime, ccstrinterval)
ccstrstatisticlog = ccstrstatisticlog & "processtimeRecord" & ccstrformatinterval
ccstrstatisticlog = ccstrstatisticlog & "----------------------------------" & ccstrformatinterval