ASP 클래스를 처음 작성하고 기능을 구현할 때 : 세그먼트 통계 프로그램 실행 시간, 출력 통계 테이블 등.
코드 사본은 다음과 같습니다.
classccclsprocesstimerecorder
'프로그램 저자 : Mingyuexingguang
'저자의 홈페이지 : http://www.5iya.com/blog
'http://www.kuozhanming.com
'ASP 프로그램 코드 실행 시간 통계 클래스
privateccinti, ccintnoncetime, ccintdecimal
privateccintstarttime, ccintendtime, ccintnow, ccintnonce
privateccstrinterval, ccstrevent, ccstrtime, ccstrstatisticlog, ccstrformatinterval
privateccarrevent, ccarrtime
privatesubclass_initialize
ccstrinterval = "|" '기본 구분 기호
ccintdecimal = 소수점 후 4 분의 숫자
ccstrevent = ""
ccstrtime = ""
ccstrformatinterval = "<br/>"& vbcrlf
CCINTSTARTTIME = 타이머
ccintnow = ccintstartTime
ccintnonce = ccintstartTime
Endsub
publicubrecord (ccstreventName)
ccstrevent = ccstrevent & ccstrinterval & replace (ccstreventName, ccstrinterval, "")
CCSTRTIME = CCSTRTIME & CCSTRINTERVAL & FARMATNUMBER (TIMER-CCINTNOW, CCINTDECIMAL, TRUE, FALSE, TRUE)
ccintnow = 타이머
Endsub
PublicPropertyletformat (ccstrformattype)
iflcase (trim (ccstrformattype)) = "html"
ccstrformatinterval = "<br/>"& vbcrlf
또 다른
ccstrformatinterval = vbcrlf
endif
엔드 프로페티
PublicFunctionStatistic
ifinstr (ccstrevent, ccstrinterval)> 0then
ccintendtime = 타이머
ccarrevent = split (ccstrevent, ccstrinterval)
ccarrtime = split (ccstrtime, ccstrinterval)
CCStrStatisticLog = CCStrStatisticLog & "ProcessTimerEcord"& CCStrformatInterval
ccstrstatisticLog = ccstrStatisticLog & "------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- KOOOOOOOOOOOOOOOOOOOOOOOOOOO언 ((((