profiling

Profiling a graphics rendering without a profiler

孤人 提交于 2019-12-31 10:46:49
问题 Nowadays we have pretty advanced tools to iron out rendering, allowing to see the different stages, time taken by draw calls, etc. But without them the graphics pipeline is quite a black box when it comes to understand what is happening inside. Suppose for some reason you have no such tool, or a very limited one. How would you measure anyway what is taking time in your rendering? I am aware of tricks like discarding draw calls to see the CPU time, setting a 1x1 viewport to see the cost of

Profiling a graphics rendering without a profiler

二次信任 提交于 2019-12-31 10:46:07
问题 Nowadays we have pretty advanced tools to iron out rendering, allowing to see the different stages, time taken by draw calls, etc. But without them the graphics pipeline is quite a black box when it comes to understand what is happening inside. Suppose for some reason you have no such tool, or a very limited one. How would you measure anyway what is taking time in your rendering? I am aware of tricks like discarding draw calls to see the CPU time, setting a 1x1 viewport to see the cost of

Java performance tips

柔情痞子 提交于 2019-12-31 09:29:26
问题 I have a program I ported from C to Java. Both apps use quicksort to order some partitioned data (genomic coordinates). The Java version runs fast, but I'd like to get it closer to the C version. I am using the Sun JDK v6u14. Obviously I can't get parity with the C application, but I'd like to learn what I can do to eke out as much performance as reasonably possible (within the limits of the environment). What sorts of things can I do to test performance of different parts of the application,

What is this cProfile result telling me I need to fix?

前提是你 提交于 2019-12-31 09:04:18
问题 I would like to improve the performance of a Python script and have been using cProfile to generate a performance report: python -m cProfile -o chrX.prof ./bgchr.py ...args... I opened this chrX.prof file with Python's pstats and printed out the statistics: Python 2.7 (r27:82500, Oct 5 2010, 00:24:22) [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pstats >>> p = pstats.Stats('chrX.prof') >>> p.sort_stats(

Performance Cost of Profiling a Web-Application in Production

安稳与你 提交于 2019-12-31 08:13:10
问题 I am attempting to solve performance issues with a large and complex tomcat java web application. The biggest issue at the moment is that, from time to time, the memory usage spikes and the application becomes unresponsive. I've fixed everything I can fix with log profilers and Bayesian analysis of the log files. I'm considering running a profiler on the production tomcat server. A Note to the Reader with Gentle Sensitivities: I understand that some may find the very notion of profiling a

Is there a port mvc-mini-profiler for Rails?

懵懂的女人 提交于 2019-12-31 08:12:22
问题 I'm a big fan of the MiniProfiler created by Jarrod Dixon and the Stack Overflow team for ASP.NET. Is there a port of it for Rails applications? Since the core of the profiler is in JavaScript, JQuery.tmpl and Less it seems that porting the back-end to Rails would be fairly straight forward, the front-end is already done. The front end architecture allows for POST and AJAX request profiling by attaching profiling ids to every request in a custom header ( X-MiniProfiler-Ids ). There is a

How can I see symbols of (C and C++) binary on linux?

ぐ巨炮叔叔 提交于 2019-12-31 08:05:34
问题 Which tools do you guys use? How do demangle c++ symbols do be able to pass it to profiler tools, such as opannotate? Thanks 回答1: Use nm to see all symbols and c++filt to demangle. Example: nm -an foo | c++filt 回答2: The profiling tool I use already knows the symbols and source code, since it is just the debugger. I can build the app with symbols included, even with full optimization. 来源: https://stackoverflow.com/questions/1379533/how-can-i-see-symbols-of-c-and-c-binary-on-linux

Does effective Cython cProfiling imply writing many sub functions?

与世无争的帅哥 提交于 2019-12-31 06:01:39
问题 I am trying to optimize some code with Cython, but cProfile is not providing enough information. To do a good job at profiling, should I create many sub-routines func2, func3,... , func40 ? Note below that i have a function func1 in mycython.pyx , but it has many for loops and internal manipulations. But cProfile does not tell me stats for those loops . 2009 function calls in 81.254 CPU seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 1 0.000

An infinite loop somewhere in my code

北城余情 提交于 2019-12-31 03:27:08
问题 I have this Java game server that handles up to 3,000 tcp connections, each player, or each tcp connection has its own thread, each thread goes something like this: public void run() { try { String packet = ""; char charCur[] = new char[1]; while(_in.read(charCur, 0, 1)!=-1 && MainServer.isRunning) { if (charCur[0] != '\u0000' && charCur[0] != '\n' && charCur[0] != '\r') { packet += charCur[0]; }else if(!packet.isEmpty()) { parsePlayerPacket(packet); packet = ""; } } kickPlayer(); }catch

Is it possible to ignore irrelevant methods when profiling ruby applications?

我只是一个虾纸丫 提交于 2019-12-31 02:42:08
问题 While using ruby-prof, printed out in graph-html mode, the report for one method says (with some snipping) %Total %Self Total Self Wait Child Calls Name Line 52.85% 0.00% 51.22 0.00 0.00 51.22 1 ClassName#method_name 42 51.22 0.00 0.00 51.22 1/3 Hash#each 4200 Obviously, it's not Hash#each that's taking a long time, but the yield block within Hash#each. Looking at the report for Hash#each is confusing because it reports on all of the code called by anything that uses Hash#each. Is it possible