Powered by:HDLabBBS V4.0.3 Access Shared 简体中文版
Copyright ©2005 - 2008 CodePlus.Net
页面执行时间:0.015625秒 ,查询数据库2次。
系统共占用内存3,537 KB。

解决方案 »

  1.   

    好像是执行 sqlserver的一个系统存储过程 中有 ,它的数据好像可以得到 当前数据库所使用的资源
      

  2.   

    Dim strSystem As String = Environment.OSVersion.ToString()
     '获取映射到进程上下文的物理内存量
      

  3.   

    //web.config=========<httpModules>
    <add name="ProcessingTime" type="XXX.ProcessingTime, XXX"/>
    </httpModules>
    //Class=========
    public class ProcessingTime : IHttpModule
    {
    private DateTime dtStartTime; public ProcessingTime()
    {
    } public void Init(HttpApplication app)
    {
    app.BeginRequest += new EventHandler(app_BeginRequest);
    app.EndRequest += new EventHandler(app_EndRequest);
    } public void Dispose()
    {
    } private void app_BeginRequest(object sender, EventArgs e)
    {
    dtStartTime = DateTime.Now;
    } private void app_EndRequest(object sender, EventArgs e)
    {
    HttpApplication app = (HttpApplication)sender; string strExpendTime = (DateTime.Now - dtStartTime).TotalMilliseconds.ToString();
    strExpendTime = strExpendTime.Substring(0,strExpendTime.IndexOf(".") + 2); GC.Collect();
    if (app.Context.Request.RawUrl.ToLower().IndexOf(".aspx") != -1)
    {
    app.Response.Write("<div align=\"center\">processing time:" + strExpendTime + " ms | using memory:" + GC.GetTotalMemory(true).ToString("###,###") + "</div>");
    }
    }
    }
      

  4.   

    type="XXX.ProcessingTime, XXX"
    请问 xxx 应该是什么啊?
    我是新手:(
      

  5.   

    <add name="ProcessingTime" type="XXX.ProcessingTime, XXX"/>
    XXX是你的命名空间???