教学网站开发背景,外贸出口新三样,猫代理,温州网站推广排名软件的性能问题是个绕不开的问题#xff0c;最近看了这方面的一本书#xff0c;把主要的内容笔记一下 Performance, load, and stress testing 性能测试 负载测试 压力测试 http://www.51testing.com/?uid-61747-action-viewspace-itemid-3036 性能测试的目的不是去找bugs,而… 软件的性能问题是个绕不开的问题最近看了这方面的一本书把主要的内容笔记一下 Performance, load, and stress testing 性能测试 负载测试 压力测试 http://www.51testing.com/?uid-61747-action-viewspace-itemid-3036 性能测试的目的不是去找bugs,而是排除系统的瓶颈以及为以后的回归测试建立一个基准。而性能测试的操作实际上就是一个非常小心受控的测量分析过程。 负载测试的目的找到一些在测试流程中前面的阶段所进行的粗略测试中没有被找出的bugs,例如内存管理bugs,内存泄露缓冲器溢出等等。保证应用程序达到性能测试中确定的性能基线。这个可以在运行回归试验时通过加载特定的最大限度的负载来实现。 尽管性能测试和负载测试似乎很像但他们的目的还是有差异的。一方面性能测试使用负载测试的技术工具以及用不同的负载程度来测度和基准化系统。在另一方面来讲负载测试是在一些已经定义好的负载程度上进行测试的通常对系统加上最大负载之后系统应该仍然可以提供全部功能。这里需要明确一点负载测试并不是要对系统加载上过度的负载而使系统不能工作而是要使系统像一个上满了油的机器嗡嗡叫. 压力测试是指通过对系统加载过度的资源或者例系统没有应该具有的令系统可以正常运作的资源来使系统崩溃在某些情况的时候它又可以叫做负面测试。 Profiling .net程序有两种profiling的过程: performance-based / memory-based Ø performance-based profiling n 性能Performance profiling measures how long a method or function may take to run Ø memory-based profiling n 内存 memory profiling measures how much memory certain aspects of the application (or even individual objects) use 测试度量基本工具和查看指标 Performance and Load Test Metrics 性能监视器工具PerfMon tool (perfmon.exe)【Windows环境内置的一个工具】如下是些参考资料这个基本工具可以用于初步的侦测 MSDN http://technet.microsoft.com/zh-cn/library/cc749249(WS.10).aspx 使用“性能监视器”监视系统性能/运行情况 http://www.cnblogs.com/MaoBisheng/archive/2010/07/18/1780024.html 性能监视器使用http://wenku.baidu.com/view/255287f9941ea76e58fa04a9.html 使用性能监视器找出硬件瓶颈http://www.ygbk.info/archives/39.html http://wenku.baidu.com/view/e3ee86a3b0717fd5360cdc16.html Visual Studio Team Test 开发工具进行测试 Chapter 15 — Measuring .NET Application Performance http://msdn.microsoft.com/en-us/library/ms998579.aspx 基本度量Basic metrics CPU利用率和内存使用率 Web程序度量Web application basic metrics response time / requests per second Time to First Byte (TTFB) 其他的度量项 一些主要的度量项 基本类别 Category: Processor • % Processor Time Category: Process • % Processor Time • Working Set Category: Memory • Available Mbytes • Pages/Sec • Page Faults/Sec Category: .NET CLR Memory • Gen 0 heap size, Gen 1 heap size, Gen 2 heap size • #Gen 0 Collections, #Gen 1 Collections, #Gen 2 Collections Category: .NET CLR Exceptions • # of Exceps Thrown / sec Category: .NET CLR Jit • % Time in Jit Category: .NET CLR Security • % Time in RT Checks Category: .NET CLR Locks and Threads • Total # of Contentions • Contention Rate/Sec Web/ASP.NET 类别 Category: ASP.NET • Application Restarts Category: ASP.NET Applications • Pipeline Instance Count • Requests in Application Queue • Request Execution Time • Requests/Second Database Category: Physical Disk • Avg. Disk Queue Length Category: SQL Server: SQL Statistics • Batch Requests/Sec Category: SQL Server: Databases • Transactions/Sec 本系列是系统的看了下面的图书的一些总结和心得 .NET Performance Testing and Optimization The Complete Guide Paul Glavich and Chris Farrell ISBN: 978-1-906434-40-3 转载于:https://www.cnblogs.com/2018/archive/2011/07/02/2096179.html