您目前的位置 : 首页 >> 剑灵体验服激活码 >> 正文

yy资深站长ASP缓存类先锋缓存类Ver2004杜海涛沈梦辰同居

日期:2016-7-15(原创文章,禁止转载)

2008-02-19 10:29

来源:页教学

编辑:阿小【纠错】人评论

A-A+

怎样开淘宝店 站优化方法 创业如何取得投资

小米note顶配版评测

最新LOL活动

第一次写ASP类阳江癫痫病可以治愈吗,实现功能:分段统计程序执行时间,输出统计表等。

程序代码:

以下为援用的内容:

Class ccClsProcessTimeRecorder'ASP程序代码执行时间统计类

Private ccInticcIntNonceTimeccIntDecimalPrivate ccIntStartTimeccIntEndTimeccIntNowccIntNoncePrivate ccStrIntervalccStrEventccStrTimeccStrStatisticLogccStrFormatIntervalPrivate ccArrEventccArrTime

Private Sub Class_Initialize ccStrInterval =

'默许分隔符 ccIntDecimal = 4 '小数点后位数 ccStrEvent =

ccStrTime =

ccStrFormatInterval = br /

vbCrLf ccIntStartTime = Timer ccIntNow = ccIntStartTime ccIntNonce = ccIntStartTimeEnd Sub

Public Sub Record(ccStrEventName) ccStrEvent = ccStrEvent

ccStrInterval

Replace(ccStrEventNameccStrInterval) ccStrTime = ccStrTime

ccStrInterval

FormatNumber(Timer-ccIntNowccIntDecimalTrueFalseTrue) ccIntNow = TimerEnd Sub

Public Property Let Format(ccStrFormatType) If LCase(Trim(ccStrFormatType)) = html Then ccStrFormatInterval = br /

vbCrLf Else ccStrFormatInterval = vbCrLf End IfEnd Property

Public Function Statistic If InStr(ccStrEventccStrInterval)

0 Then ccIntEndTime = Timer ccArrEvent = Split(ccStrEventccStrInterval) ccArrTime = Split(ccStrTimeccStrInterval) ccStrStatisticLog = ccStrStatisticLog

Process Time Record

ccStrFormatInterval ccStrStatisticLog = ccStrStatisticLog

--------------------------------------

ccStrFormatInterval For ccInti = 1 To UBound(ccArrEvent) ccStrStatisticLog = ccStrStatisticLog

ccArrEvent(ccInti)

:

ccArrTime(ccInti)

s

ccStrFormatInterval Next ccStrStatisticLog = ccStrStatisticLog

--------------------------------------

ccStrFormatInterval ccStrStatisticLog = ccStrStatisticLog

Total :

FormatNumber(ccIntEndTime-ccIntStartTimeccIntDecimalTrueFalseTrue)

s Statistic = ccStrStatisticLog Else Statistic = No Record End IfEnd Function

Public Function Nonce ccIntNonceTime = FormatNumber(Timer-ccIntNonceccIntDecimalTrueFalseTrue) ccIntNonce = Timer Nonce = ccIntNonceTimeEnd Function

Public Function Total Total = FormatNumber(Timer-ccIntStartTimeccIntDecimalTrueFalseTrue)End Function

End Class

类属性:

1、Format

输出时是不是带HTML换行标签

-html:输出HTML换行标签和文本换行符(默许)

-text:仅输出文本换行符

类方法:

1、Record(Code Name)

统计自上一次调用Record方法至现在的时间(第一次调用时统计声明类时至调用时时间)湖北治癫痫病的医院,最后在Statistic中输出类函数:(即时返回信息)

1、Nonce

输出自上一次调用nonce函数至现在的时间(第一次调用时统计声明类时至调用时时间)

2、Total

输出声明类到现在总时间

3、Statistic

输出所有Record统计信息和总程序时间

实例代码:

以下为援用的内容:

Dim objRecordikjx

Set objRecord = New rmat = html

For i = 1 To 100000x = 2 + 2Next

Call cord(加法)For j = 1 To 100000x = 2 * 2Next

Call cord(乘法)

For k = 1 To 100000x = 2 ^ 2Next

Call cord(开方)

ite atistic

输出:

Process Time Record--------------------------------------

加法 : 0.0625 s

乘法 : 0.0469 s

开方 : 0秦皇岛癫痫病哪里治疗最好.1094 s

查看更多类似文章

友情链接:

不约而同网 | 关公灵签解签 | 常州人才网招聘网 | 心脏病会死吗 | 牛舍平面图 | 高层阳台护栏 | 摘草莓一日游