profiling

Compare similarities between two result sets

爱⌒轻易说出口 提交于 2019-12-31 01:51:31
问题 I am creating a music website where I would like users to be able to find users who like approximately the same artists as they. I have a 'like' table that has 2 columns 'id_user', 'id_artist'. Here is an example of how I would like it to work: User 1 likes: 1, 12 1, 13 1, 14 1, 26 1, 42 1, 44 User 2 likes: 2, 13 2, 14 2, 15 2, 26 2, 42 2, 56 Those 2 users have 4 artists in common. Is there a way, to compare those 2 results sets, to find the most similar people in the database? My first idea

Could not launch xxx.exe. Previous attempt to profile the application finished unsuccessfully. Please restart the application

给你一囗甜甜゛ 提交于 2019-12-31 00:35:50
问题 I am facing an error message while profiling a c# console application in VS 2010 (using CPU Sampling method of profiling). When I click on Start Profiling: following error message is displayed: "Could not launch D:\xxx\yyy\zzz.exe. Previous attempt to profile the application finished unsuccessfully. Please restart the application." I have tried to profile a new Console Application, but I face the same error message. What can be the reason for this error? Do I need to configure something?

How to get time elapsed in milliseconds

↘锁芯ラ 提交于 2019-12-30 17:36:26
问题 Since performance of string concatenation is quite weak in VB6 I'm testing several StringBuilder implementations. To see how long they're running, I currently use the built-in Timer function which only gives me the number of seconds that have passed after midnight. Is there a way (I guess by importing a system function) to get something with milliseconds precision? 回答1: Yes, you can use the Win32 API: DWORD WINAPI GetTickCount(void); To import it in VB6 declare it like this: Private Declare

String-interning at compiletime for profiling

旧时模样 提交于 2019-12-30 11:51:21
问题 Context I am working on an instrumenting profiler, that enables you to name different measurements by string. So for example: MEASURE_SCOPE(text_rendering_code); ... MEASURE_SCOPE(password_hashing); ... MEASURE_START(system_call); ... MEASURE_STOP(system_call); where the macros would be defined like this: #define MEASURE_START(name) save_start_event(get_timestamp(), #name); #define MEASURE_STOP(name) save_stop_event(get_timestamp(), #name); #define MEASURE_SCOPE(name) Profiling_Class object#

Code Profiling Tools for Perl

99封情书 提交于 2019-12-30 06:46:09
问题 I need to test Perl Application ( File operation , Data base operation..etc ) . I am looking for some profile tool for Perl code is there any tools for Perl Code Profling like gprof in Linux 回答1: Just like with debugging, profiling is a task best done by the perl interpreter itself This website will give you an overview of using the -d:DProf argument to the interpreter, and how to use it. 回答2: Some people might suggest to use Devel::DProf as the most standard way, but if you will look closely

How Does AQTime Do It?

自作多情 提交于 2019-12-30 05:58:16
问题 I've been testing out the performance and memory profiler AQTime to see if it's worthwhile spending those big $$$ for it for my Delphi application. What amazes me is how it can give you source line level performance tracing (which includes the number of times each line was executed and the amount of time that line took) without modifying the application's source code and without adding an inordinate amount of time to the debug run. The way that they do this so efficiently makes me think there

Inaccuracy in gprof output

送分小仙女□ 提交于 2019-12-30 05:24:26
问题 I am trying to profile a c++ function using gprof, I am intrested in the %time taken. I did more than one run and for some reason I got a large difference in the results. I don't know what is causing this, I am assuming the sampling rate or I read in other posts that I/O has something to do with it. So is there a way to make it more accurate and generate somehow almost constant results? I was thinking of the following: increase the sampling rate flush the caches before executing anything use

Debugging a memory leak that doesn't show on heap profiling

99封情书 提交于 2019-12-30 03:38:12
问题 I'm working on a Haskell daemon that receives and processes JSON requests. While the operations of the daemon are complex, the main structure is intentionally kept simple: Its internal state is just an IORef with a data structure and all threads perform atomic operations on this IORef . Then there are a few threads that upon a trigger take the value a do something with it. The problem is that the daemon is leaking memory and I can't find out why. It's certainly related to the requests: when

Getting more info from Rprof()

北城余情 提交于 2019-12-30 03:24:22
问题 I've been trying to dig into what the time-hogs are in some R code I've written, so I'm using Rprof . The output isn't yet very helpful though: > summaryRprof() $by.self self.time self.pct total.time total.pct "$<-.data.frame" 2.38 23.2 2.38 23.2 "FUN" 2.04 19.9 10.20 99.6 "[.data.frame" 1.74 17.0 5.54 54.1 "[.factor" 1.42 13.9 2.90 28.3 ... Is there some way to dig deeper and find out which specific invocations of $<-.data.frame , and FUN (which is probably from by() ), etc. are actually the

Profiling Code on Production

孤街浪徒 提交于 2019-12-30 01:20:24
问题 I'm toying around with the idea of implementing something that profiles code on the production server and wanted some best-practice advice. Obviously it's a bad idea to profile ALL requests because of the added overhead so I was looking into some techniques that will randomly invoke the profiler per request. Something like 1 profile per every 10,000 requests. I know there is a way to achieve such a task with Facebook's XHProf Profiler but was hoping for a similar solution using xdebug. So my