profiler

How to write a profiler?

混江龙づ霸主 提交于 2019-11-29 02:35:11
问题 i would to know how to write a profiler? What books and / or articles recommended? Can anyone help me please? Someone has already done something like this? 回答1: I would look at those open-source projects first: Eclipse TPTP (http://www.eclipse.org/tptp/) VisualVM (https://visualvm.dev.java.net/) Then I would look at JVMTI (not JVMPI) http://java.sun.com/developer/technicalArticles/Programming/jvmti/ 回答2: Encouraging lot, aren't we :) Profilers aren't too hard if you're just trying to get a

Monitoring the asyncio event loop

对着背影说爱祢 提交于 2019-11-29 02:09:10
I am writing an application using python3 and am trying out asyncio for the first time. One issue I have encountered is that some of my coroutines block the event loop for longer than I like. I am trying to find something along the lines of top for the event loop that will show how much wall/cpu time is being spent running each of my coroutines. If there isn't anything already existing does anyone know of a way to add hooks to the event loop so that I can take measurements? I have tried using cProfile which gives some helpful output, but I am more interested in time spent blocking the event

Profiling Ruby Code

徘徊边缘 提交于 2019-11-29 01:39:08
问题 Besides ruby-prof and and the core Benchmark class, what do you use to profile your Ruby code? In particular, how do you find the bottlenecks in your code? It almost feels like I need to work on my own little tool just to figure out where all the time is being spent in my code. I realize ruby-prof provides this, but the output is frankly very confusing and doesn't make it easy to find out which actual blocks of your own code are the source of the issue (it tells you about which method calls

淘宝的TProfiler使用日记

半城伤御伤魂 提交于 2019-11-29 01:25:35
因为最近做项目迁移,迁移之后发现有些地方竟然变慢了!需要一个好的Profiler工具,定位最为耗时的地方。在翻淘宝中间件团队博客 http://rdc.taobao.com/team/jm/ 的时候发现了TProfiler,于是试用了一下。 总体来说使用还算简单,文档虽然说不上面面俱到,但是仍然是能让人上手了。 比较重要的是配置文件,有几个注意点: 配置文件需要所有属性完整,不然会报"IllegalArgumentException source can't be null"。 profile.properties 有一个样例,在man/resources目录下。 eachProfUseTime = 5 #表示每次profiler的时间,一次profiler结束后,写入到tprofiler.log文件中 eachProfIntervalTime = 50 #profiler的间隔 TProfiler是一个线上profile工具,之所以profiler间隔很大,是为了不影响线上业务。建议在测试环境,将eachProfIntervalTime设置成1或者0,eachProfUseTime尽量调大,这样比较好看结果。 还有一个client,可以做flushmethod等操作。如果不主动flush,会等到时间周期结束后才写tmethod.log文件。

How to interpret profiling results?

点点圈 提交于 2019-11-29 00:53:24
问题 I ran memory Profiler using NetBeans and VisualVM and received the results but do not have a clue how to analyze its results, I studied this article but it does not teach or give a clue on how to interpret the results. I have also found this article about interpreting results on Netbeans 4 but am looking for an article with more details,or a way to interpret the following results to learn. 回答1: There really isn't much information conveyed in the telemetry graphs you've pasted in your question

profiling a method of a class in Python using cProfile?

懵懂的女人 提交于 2019-11-28 22:33:29
I'd like to profile a method of a function in Python, using cProfile. I tried the following: import cProfile as profile # Inside the class method... profile.run("self.myMethod()", "output_file") But it does not work. How can I call a self.method with "run"? Use the profilehooks decorator http://pypi.python.org/pypi/profilehooks EDIT: Sorry, didn't realise that the profile call was in a class method. run just tries to exec the string you pass it. If self isn't bound to anything in the scope of the profiler you are using, you can't use it in run ! Use the runctx method to pass in the local and

SQL Server Profiler : How to specify multiple values for “NOT LIKE” column filter

喜欢而已 提交于 2019-11-28 21:48:42
问题 According to : http://msdn.microsoft.com/en-us/library/ms175061.aspx It says that the "NOT LIKE" relational operator : "Specifies that the trace event data must not be like the text entered. Allows multiple values." But HOW do you specify multiple values ? 回答1: Never mind, figured it out. After you have typed in one value, press ENTER at the end of the textbox. This causes another textbox to be shown under the current one, into which you can type an additional value. 回答2: This is tricky , if

php xdebug: How to profile forked process

点点圈 提交于 2019-11-28 21:33:30
I am running a PHP daemon to be profiled. The started php process loads all required data, forks itself to distribute workload over all cores, waits for the forked children to finish, and collects the results generated by the children. Since I am sharing CLI environment with other users, I need to start xdebug profiling by injecting php.ini values into the shell call. $ php -d xdebug.profiler_enable=1 -d xdebug.profiler_output_dir="/home/xxx" daemon.php The generated cachegrind-file, how ever, profiles the parent and hence shows 90% sleep. Is there a way to profile the workers without building

MiniProfiler not showing up on asp.net MVC

萝らか妹 提交于 2019-11-28 20:25:20
I added this to my Global.asax.cs: protected void Application_BeginRequest() { if (Request.IsLocal) { MiniProfiler.Start(); } } protected void Application_EndRequest() { MiniProfiler.Stop(); } I added @MiniProfiler.RenderIncludes() just below the </body> tag in _Layout.cshtml. In my controller I'm using: public class HomeController : Controller { public ActionResult Index() { var profiler = MiniProfiler.Current; // it's ok if this is null using (profiler.Step("Set page title")) { ViewBag.Title = "Home Page"; } using (profiler.Step("Doing complex stuff")) { using (profiler.Step("Step A")) { //

Good Profiler for C# 2010? [closed]

我与影子孤独终老i 提交于 2019-11-28 17:13:19
问题 I love the profiler for Visual Studio Ultimate 2010. But I do not have $8,000 or whatever it costs to just get that functionality. Are there any profilers that are just as good, if not better? It does NOT have to be free. I basically would like to see something like method X has this amount of inclusive time, times it was called and by WHO, exclusive time, and so on. Does anything else do this? 回答1: Ants Profiler is very good: http://www.red-gate.com/products/dotnet-development/ants