zoukankan      html  css  js  c++  java
  • 性能分析一:查看程序占用系统的内存 .

    服务器端内存增长的很快,不好跟踪调试。

    于是写了一个winform小程序,查看程序占用系统多少内存,然后调用一下服务器端的接口,加载后然后再看一下现在内存是多少。

    是个笨办法,但快速定位了让iis内存飞速增长的代码段。

    using System.Diagnostics;
    
    
    
     // 获得为该进程(程序)分配的内存. 做一个计时器,就可以时时查看程序占用系统资源
    
     public double GetProcessUsedMemory()
    
        {
    
            double usedMemory = 0;
    
            usedMemory = Process.GetCurrentProcess().WorkingSet64 / 1024.0 / 1024.0;
    
            return usedMemory;
    
        }
    

      

  • 相关阅读:
    javascript基础
    html基础
    css基础
    django-session和cookie
    rest架构
    django-models
    django-templates
    Alignment
    ural 1225.Flags
    ural 1009. K-based Numbers
  • 原文地址:https://www.cnblogs.com/liyongjian/p/3056344.html
Copyright © 2011-2022 走看看