profiling

PHP memory profiling

半腔热情 提交于 2019-12-17 02:54:17
问题 What's a good way to profile a PHP page's memory usage? For example, to see how much memory my data is using, and/or which function calls are allocating the most memory. xdebug doesn't seem to provide memory information in its profiling feature. xdebug does provide it in its tracing feature. This is pretty close to what I want, except the sheer amount of data is overwhelming, since it shows memory deltas for every single function call. If it were possible to hide calls below a certain depth,

What is the fastest method for selecting descendant elements in jQuery?

旧时模样 提交于 2019-12-17 02:52:14
问题 As far is I know, there are a number of ways of selecting child elements in jQuery . //Store parent in a variable var $parent = $("#parent"); Method 1 (by using a scope) $(".child", $parent).show(); Method 2 (the find() method) $parent.find(".child").show(); Method 3 (For immediate children only) $parent.children(".child").show(); Method 4 (via CSS selector) - suggested by @spinon $("#parent > .child").show(); Method 5 (identical to Method 2 ) - according to @Kai $("#parent .child").show(); I

Measuring function execution time in R

让人想犯罪 __ 提交于 2019-12-17 02:03:30
问题 Is there a standardized way in R of measuring execution time of function? Obviously I can take system.time before and after execution and then take the difference of those, but I would like to know if there is some standardized way or function (would like to not invent the wheel). I seem to remember that I have once used something like below: somesysfunction("myfunction(with,arguments)") > Start time : 2001-01-01 00:00:00 # output of somesysfunction > "Result" "of" "myfunction" # output of

do I have to release the NSDate in this code below?

时光怂恿深爱的人放手 提交于 2019-12-14 03:54:57
问题 do I have to release the NSDate in this code below? (i.e. or is it the case that it's just created within a method as a local variable that I don't have to worry) The reason I ask is when I run XCode Profiler and click on one of the points where memory is jumping up, it highligted this bit of code (i.e. the first line in the attached code below) - i.e. I'm looking at the "Leaks Blocks" table in the profiler.. -(NSDate *) dateBySettingHour:(NSInteger)hour andMinute:(NSInteger)minute { // Get

PerfView: Analyzing Performance of App including Database Calls

China☆狼群 提交于 2019-12-14 03:46:56
问题 I'm currently getting into PerfView for performance analysis for my (C#) apps. But typically those apps use a lot of database calls. So I asked myself questions like: - How much time is spent in Repositories? - (How much time is spent waiting for SQL Queries to return?) -> I don't know if this is even possible to discover with PerfView But from my traces I get barely any useful results. In the "Any Stacks" View it tells me (when I use grouping on my Repository) that 1,5 seconds are spent in

How to profile web workers in Chrome?

耗尽温柔 提交于 2019-12-14 00:51:52
问题 Does anyone know an easy way to profile web workers in Chrome? I found this question from last year, but unfortunately the only provided answer didn't work. Is there any way to do this or am I just out of look? It seems like a rather large oversight that hinders web development if you can't even do profiling. 回答1: To profile Web Workers navigate to "Developer Tools -> Sources -> Workers" and enable the checkbox "Pause on start". Now, when you refresh the page, a popup window with an inspector

Instruction Level Profiling: The Meaning of the Instruction Pointer?

心不动则不痛 提交于 2019-12-14 00:30:59
问题 When profiling code at the the assembly instruction level, what does the position of the instruction pointer really mean given that modern CPUs don't execute instructions serially or in-order? For example, assume the following x64 assembly code: mov RAX, [RBX]; // Assume a cache miss here. mov RSI, [RBX + RCX]; // Another cache miss. xor R8, R8; add RDX, RAX; // Dependent on the load into RAX. add RDI, RSI; // Dependent on the load into RSI. Which instruction will the instruction pointer

Specifying Google perftools to g++ for using C++ in R

帅比萌擦擦* 提交于 2019-12-13 19:26:57
问题 I installed Google perftools (google-perftools 1.7-1ubuntu1), and add -lprofiler to PKG_LIBS in R, when compiling the C++ code. library(RcppArmadillo) library(Rcpp) Sys.setenv("PKG_CXXFLAGS"="-fopenmp") Sys.setenv("PKG_LIBS"="-fopenmp -lprofiler") sourceCpp('my.cpp') The output is: /usr/bin/ld: cannot find -lprofiler collect2: ld returned 1 exit status make: *** [sourceCpp_17496.so] Error 1 g++ -I/usr/share/R/include -DNDEBUG -I"/usr/local/lib/R/site-library/Rcpp/include" -I"/usr/local/lib/R

Flex loitering objects with 0 paths

痞子三分冷 提交于 2019-12-13 17:48:19
问题 My application is leaking a visual component called GraphViewer. Every time the user changes graphs a new viewer is created and the old one is removed from the stage and discarded. Yet memory seems to leak. When I use the Flex profiler to track loitering objects it shows that GraphViewer instances indeed leak, but when I examine the object references of the loitering viewers I see that all of them (except one) have 0 paths to GC root. I take a memory snapshot after GC and then change the

Weblogic server startup profiling tools

断了今生、忘了曾经 提交于 2019-12-13 17:20:19
问题 What would be the best tool or approach if I want to profile my weblogic startup and tune start-up timing. Can it be done by visual vm or jprofiler or yourkit? What would be the best? 回答1: If you use JProfiler, use the integration wizard for Weblogic to configure profiling by selecting Session->Integration Wizards->New Server Integration from the main menu. On the "Startup mode" step, select the "Wait for a connection from the JProfiler GUI" option. When you start the session, the "Session