using System; using System.Threading; class Class1 { [System.Runtime.InteropServices.DllImport("Kernel32.dll")] static extern bool QueryPerformanceCounter( ref long count); ...[ 查看全文 ]
MySQL 的 SQL 語法調整主要都是使用 EXPLAIN , 但是這個並沒辦法知道詳細的 Ram(Memory)/CPU 等使用量. 於 MySQL 5.0.37 以上開始支援 MySQL Query Profiler, 可以查詢到此 SQL 會執行多少時間, 並看出 CPU/Memory 使用量, 執行過程中 System lock, Table lock 花多少時間等等. MySQL Query Profile 詳細介紹可見: Using the New MySQL Query Profiler (2007.04.05 發表) 效能分析主要分下述三種(轉載...[ 查看全文 ]
<% Dim varInitial_Time varInitial_Time = Timer Response.Write "Initial_Time =[" & varInitial_Time & "]<br" % <% 'Start ASP Script Tag For I = 1 to 10 Response.write "Hello World Take " & I & "<br" Next 'End ASP Script Tag % <!-- Start: HTML--<brYou looped <%=(I - 1) % times.<br<!-- En...[ 查看全文 ]
2.影响ASP的要素 (1).尽量把对象变量转换成本地变量,因为读本地变量比读对象变量要快许多。 比较慢的例子: if Myobj.Value = 0 then Do something elseif Myobj.Value > 0 then Do something elseif Myobj.Value < 0 then Do something end if 比较快的例子: MyVar = Myobj.Value if MyVar = 0 then Do something elseif MyVar > 0 then Do something elseif MyV...[ 查看全文 ]
Using the global.asa to schedule ASP code execution. Have you ever had some asp code that needed to execute every once in a while but, you just didn't know how to do it. There is a solution that doesn't involve running any scheduling or scripting software on the server and is actually very easy to get working. You see... there is thing called the "glob...[ 查看全文 ]
可以用waitfor组件. 下面是国外的一名ASP作者的语句: Developer's often need to have their apps wait a specified number of seconds, detect if a file exists within a particular timeout or wait for exclusive file access within a specified timeout. This component is designed to allow developers to do that from ASP. To install a) Move the component into the subdirectory you ...[ 查看全文 ]
代码如下: % if SaveFile("/htm/list.htm","http://www.xxx.com/asp/list.asp") then Response.write "已生成" else Response.write "没有生成" end if function SaveFile(LocalFileName,RemoteFileUrl) Dim Ads, Retrieval, GetRemoteData On Error Resume Next Set Retrieval = Server.CreateObject("Microso"&nbs...[ 查看全文 ]
ASP Source Code: ---------------------------------------------------------------------- <% If Request.QueryString("time") = "" Then % You haven't clicked on the link below yet.<BR <% Else % You spent <%= DateDiff("s", Request.QueryString("time"), Now()) % seconds looking at the previous page.<BR <% End If % &l...[ 查看全文 ]