profiler

google-perftools+kcachegrind profiler your program

那年仲夏 提交于 2019-12-07 09:40:22
我之间用过一些开源的profiler工具,自己也做过一些工具,除了自己写的工具可以简单获取自己想要的那一部分数据之外,其他的工具都不那么容易,但是perftools却是个例外, 它是一款针对 C/C++ 程序的性能分析工具,它是一个遵守 BSD 协议的开源项目。使用该工具可以对 CPU 时间片、内存等系统资源的分配和使用进行分析,本文将重点介绍如何进行 CPU 时间片的剖 这里我将将介绍 如何进行 CPU 时间片的剖析 ,从安装到数据的呈现,enjoy it。 一,获取google perftools 安装包。 您可以在 google-perftools 的网站 (http://code.google.com/p/google-perftools/downloads/list) 上下载最新版的安装包。我用的是gperftools-2.0.tar.gz 二,install perftools 1, 先配置安装环境, ./configure --prefix=/usr --enable-frame-pointers --prefix是指定安装路径,如果你不指定默认安装在/usr/local/lib下面,而且可能会有在运行时找不到 libprofiler.so文件的可能。--enable-frame-pointer为64位系统准备的。 2,make , make install 3

How to profile requests in a Rails 3 application

戏子无情 提交于 2019-12-07 08:20:39
问题 How to profile requests in a Rails 3 application? This answer seems to only work in 2.*. How should I do this in Rails 3? 回答1: Rack Mini Profiler is really good: https://github.com/SamSaffron/MiniProfiler/tree/master/Ruby 回答2: I usually use https://github.com/newrelic/rpm new relic. It tells you which is the slowest call on render and it also gives you which line in your code does just that. Very informative and easy to use. 回答3: Have you checked out the built in profiler? 来源: https:/

Getting the Machine Type and other Hardware details through Cocoa API

二次信任 提交于 2019-12-07 05:59:25
问题 On iOS, there is a UIDevice class which lets you get tons of great info about the device model, operating system etc… I am looking for something equivalent on the Mac. I know about calling system_profiler from the command line, but even the mini setting takes several seconds to get any info. I am interested in fast ways to get the machine type (Macbook Air, Mac Mini, etc…), OS version, and other quick machine details from within a Mac App. The details are going o be used as a footer on

How to find what caused errors reported in a SQL Server profiler trace?

北战南征 提交于 2019-12-07 02:39:45
问题 I was running a trace on a Sql Server 2005 using the profiler and need to find out what is causing the reported errors. I used the "blank" template, and selected all columns of the following events: Exception Exchange Spill Event Execution Warnings Hash Warnings Missing Column Statistics Missing Join Predicate I noticed a number of these errors in the "TextData" column: Error: 156, Severity: 16, State: 0 Error: 208, Severity: 16, State: 0 I looked up the errors (Incorrect syntax, Invalid

What is “platformAttrExtractor” in Android Task Execution?

这一生的挚爱 提交于 2019-12-06 23:32:19
问题 I profile my build follwings instruction in Android: gradlew --profile --recompile-scripts --offline --rerun-tasks assembleFlavorDebug I found "UI:platformAttrExtractor" takes a long time, please see the screenshot. I don't understand what "platformAttrExtractor" is and how can I remove it to save build time? 回答1: I have the sample "problem". What I noticed is that by specifying the --offline command line option for gradle, build time (and specifically the time taken by the

Number of Javascript lines executed during page load

最后都变了- 提交于 2019-12-06 21:55:06
问题 I have an use case where I need to get the total number of Javascript lines executed when my web page is loading. The problem I am facing is that the browser throws an alert when a certain number of JS execution exceed ( 5 million I think in case of IE ) and the page gets hanged. I used the profiler available in IE Developers tool bar,but it gives me the total number of JS functions called but not the total number/count of lines executed. Any help is appreciated. Thanks 回答1: This may help:

Increasing the depth of cProfiler in Python to report more functions?

只谈情不闲聊 提交于 2019-12-06 21:21:32
问题 I'm trying to profile a function that calls other functions. I call the profiler as follows: from mymodule import foo def start(): # ... foo() import cProfile as profile profile.run('start()', output_file) p = pstats.Stats(output_file) print "name: " print p.sort_stats('name') print "all stats: " p.print_stats() print "cumulative (top 10): " p.sort_stats('cumulative').print_stats(10) I find that the profiler says all the time was spend in function "foo()" of mymodule, instead of brekaing it

Why is my C# program faster in a profiler?

被刻印的时光 ゝ 提交于 2019-12-06 19:34:37
问题 I have a relatively large system (~25000 lines so far) for monitoring radio-related devices. It shows graphs and such using latest version of ZedGraph. The program is coded using C# on VS2010 with Win7. The problem is: when I run the program from within VS, it runs slow when I run the program from the built EXE, it runs slow when I run the program though Performance Wizard / CPU Profiler, it runs Blazing Fast. when I run the program from the built EXE, and then start VS and Attach a profiler

How could I get rid of “PRF0002: Instrumentation failed with these options” error with Microsoft Visual Studio 2010 Performance Profiler?

China☆狼群 提交于 2019-12-06 18:21:17
问题 I am now using Microsoft Visual Studio 2010 Performance Profiler to profile one program. It works very well when I use CPU sampling method. However, when I use Instrumentation method, I get the following error message: PRF0002: Instrumentation failed with these options: /u "my program" /excludesmallfuns. Please check the output window for additional details. I was wondering how I could get rid of this error. Thanks! 回答1: I had a similar situation, and what fixed it for me was removing all the