profiling

Effective way of measuring method execution time

余生颓废 提交于 2019-12-11 11:01:06
问题 I have a .net video processing application, that, when given a large streaming image sequence (a video) is sometimes not delivering a real time frame rate on the output. The processing steps include executing several methods on an incoming frame. What is an effective way (maybe a ready to use library) in .net to profile method execution? (know exactly which method took how much time to see at what step we have a jams) 回答1: Ideally, using a profiler. Try Equatec, ANTS or dotTrace. If you just

Getting different data in Instruments based on method of profiling

那年仲夏 提交于 2019-12-11 06:02:12
问题 This question is a follow up question to the answer of this: instruments-leaks-and-allocations-tvos The initial question relates to a memory leak I had in a tvOS app, but I think the answer to this question is relevant to iOS/Xcode/Instruments development in general. The issue was solved by removing a closure inside another closure keeping a reference to a variable in the first closure. This caused a retain cycle. Question I really want to understand why I didn't find the issue earlier, let

Detecting redundant function calls within call stack tree with DTrace

泄露秘密 提交于 2019-12-11 05:57:35
问题 I'm having a hard time tracking down unnecessary redundant calls within a rather complex algorithm. It looks like (some of my) my algorithm(s) is/are seriously slowed down by redundant calls (in several subroutines) of a non-cached and comparatively expensive function. To confirm this I'd like to utilize Dtrace to detect multiple calls of a single function within a given branch of the call stack tree. I'd like to be able to ask dtrace to: search the call stack tree within a given function

Memory profiling with Visual Studio 2010

谁说我不能喝 提交于 2019-12-11 05:48:16
问题 I have a solution with two applications. One is Windows Service project, another one is launcher (installs and starts the windows service). I want to attach memory profiler to the installed windows service to collect information about memory usage and object sizes to investigate the OutOfMemory exception. Here is the approach I used. First I ran the "VSPerfCLREnv.cmd /samplegclife". This should init the profiling environment variables to enable memory profiling. Then I start my launcher,

Is it possible to extend the Instruments profiler on Mac OS X for a new language?

前提是你 提交于 2019-12-11 05:06:42
问题 I'd like to use the Instruments profiler on the Mac to profile Haskell code. However, Haskell isn't a supported language by Xcode/Instruments. Is it possible to extend Instruments to support profiling in a new/unsupported language? What would be involved? 回答1: Instruments is a front-end to DTrace. You can use DTrace hooks with GHC. 来源: https://stackoverflow.com/questions/13778669/is-it-possible-to-extend-the-instruments-profiler-on-mac-os-x-for-a-new-language

How to calculate MIPS using perf stat

风格不统一 提交于 2019-12-11 04:10:02
问题 Following answer about Benchmarking - How to count number of instructions sent to CPU to find consumed MIPS suggest that: perf stat ./my_program on Linux will use CPU performance counters to record how many instructions it ran, and how many core clock cycles it took. (And how much CPU time it used, and will calculate MIPS for you). An example generates following output which does not contain calculated MIPS information. Performance counter stats for './hello.py': 1452.607792 task-clock (msec)

Where can I find the MySQL Logs in Yii Framework

拥有回忆 提交于 2019-12-11 03:26:56
问题 I found this docs to enable the MySQL logging in the Yii Framework (my goal is it to improve the performance): http://www.yiiframework.com/wiki/235/configuring-cweblogroute-for-db-profiling/ Where can I the logs (after running the application)? Thanks! 回答1: If you use CWebLogRoute for logging then you can see your logs in your browser, just below content (like in example you provided). You can also use CFileLogRoute, and Yii will create a application.log file in protected/runtime . In

Node.js dtrace error in Mac OS X Yosemite

假装没事ソ 提交于 2019-12-11 02:13:00
问题 I try DTrace the Node.js application on the Mac OS X 10.10 Yosemite: sudo dtrace -n 'profile-97/execname == "node" && arg1/{ @[jstack(150, 8000)] = count(); } tick-60s { exit(0); }' &> /tmp/dtrace.out And this is what I have: http://pastebin.com/NjbR2zug There are an errors like this: dtrace: error on enabled probe ID 1 (ID 28: profile:::profile-97): invalid address (0x5) in action #2 Node.js installed both by a Brew and a NVM, I tried launch my app.js by both this installations. What can I

Understanding VTune report

我与影子孤独终老i 提交于 2019-12-11 01:47:10
问题 this is a followup to an existing thread (http://stackoverflow.com/questions/12724887/caching-in-a-high-performance-financial-application) - I found that it's not the cache that hinders my application. To cut the long story short, I have an application which spends 70 percent of the runtime in one function (15 seconds out of 22). Hence, I would like to cut the runtime of this function as much as possible as the envisaged use of the function is for MUCH larger data (i.e. 22 seconds is not the

How bad is new Thread().sleep compared to Thread.sleep in terms of CPU and memory utilization?

一笑奈何 提交于 2019-12-11 01:28:28
问题 I'm aware that sleep should be accessed in a static context. However I need more inputs so I can defend this to the management. Most of the legacy code that I'm handling now uses new Thread().sleep instead of Thread.sleep. How bad is this? for (int c = 0; c < 5; c++) { new Thread().sleep(5000); } compared to this? for (int c = 0; c < 5; c++) { Thread.sleep(5000); } EDIT: final long start = System.currentTimeMillis(); System.out.println("Total memory: " + Runtime.getRuntime().totalMemory());