profiling

How to profile MySQL

南笙酒味 提交于 2020-01-09 07:06:08
问题 How do I profile a MySQL database. I want to see all the SQL being run against a database. I know you can do this: set profiling=1; Run your slow query (eg SELECT * FROM messages WHERE fromaddress='xxx'; SHOW PROFILES; But this seem to only apply to stuff run on the command line, I want to see the results from running a website. 回答1: You want the query log - but obviously doing this on a heavy production server could be... unwise. 回答2: That worked for me on Ubuntu. Find and open your MySQL

Performance profiler for a java application

三世轮回 提交于 2020-01-09 06:46:08
问题 I need to optimise a Java application. It makes some 3rd party calls. I need some good tool to accurately measure the time taken by individual API calls. To give an idea of complexity- the application takes a data source file containing 1 million rows, and it takes around one hour to complete the processing. As a part of processing , it makes some 3rd party calls (including some network calls). I need to identify which calls are taking more time then others, and based on that, find out a way

Rack Bug Installation issue. Server does not start

流过昼夜 提交于 2020-01-07 07:15:09
问题 I just installed the Rack-Bug and created the middleware file that it needs in the config folder. But I am unable to start my server. Im using Rails 2.3.4 with Ruby 1.8.7. /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:443:in `load_missing_constant': uninitialized constant IPAddr (NameError) from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:80:in const_missing' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib

Can I instrument outgoing method/constructor calls with ByteBuddy?

℡╲_俬逩灬. 提交于 2020-01-07 04:00:51
问题 I have a project where I was using Javassist to log outgoing method/constructor calls with code like this: CtMethod cm = ... ; cm.instrument( new ExprEditor() { public void edit(MethodCall m) throws CannotCompileException { if (m.getClassName().equals("Point") && m.getMethodName().equals("move")) m.replace("{ $1 = 0; $_ = $proceed($$); }"); } }); which assigns '0' to the first argument of the called method and then proceeds with the original call, that is, if cm represents the method

“Interiting” from null object does not seem to affect performance

浪子不回头ぞ 提交于 2020-01-07 02:25:29
问题 I've tried to understand better why should one (or shouldn't) inherit from Object ( var o = Object.create(null); ). If I've got the answer right, performance reasons seemed to be the main viable reason to "inherit" from null. So, I wanted to check it (utilizing small, handy and cute profiler called JSLitmus): <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Title</title> <script src="JSLitmus.js"></script> <script> JSLitmus.test('Prototypeless test',

Django 1.3, extending to User auth system, User Profiling or Subclassing?

混江龙づ霸主 提交于 2020-01-06 13:52:38
问题 Subclassing: http://scottbarnham.com/blog/2008/08/21/extending-the-django-user-model-with-inheritance/ User Profiling: https://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users Which one is more efficient and less of a hassle? And Which way should I go if I plan to scale big? 回答1: Don't use subclassing unless you're prepared to 1) write your own auth backend, and 2) forgo ever using a different auth backend. 回答2: It seems to makes sense to have the simplest

Django 1.3, extending to User auth system, User Profiling or Subclassing?

独自空忆成欢 提交于 2020-01-06 13:52:20
问题 Subclassing: http://scottbarnham.com/blog/2008/08/21/extending-the-django-user-model-with-inheritance/ User Profiling: https://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users Which one is more efficient and less of a hassle? And Which way should I go if I plan to scale big? 回答1: Don't use subclassing unless you're prepared to 1) write your own auth backend, and 2) forgo ever using a different auth backend. 回答2: It seems to makes sense to have the simplest

How to profile the number of additions, mutltiplications etc. with vtune

懵懂的女人 提交于 2020-01-06 04:26:12
问题 I am able to profile my C++ library's instruction counts with Vtune using the 'INST_RETIRED.ANY' event. What analysis types or events can be used profile in terms of number of integer/floating point additions, multiplications, divisions etc? 回答1: (tl:dr): I don't think you can do everything you want with perf counters. See the end of this answer for a possible way using binary instrumentation Also note that imul is not an expensive operation, and FP mul is barely more expensive than add. e.g.

WPF Performance Problems with derived TextBox controls

坚强是说给别人听的谎言 提交于 2020-01-05 21:28:23
问题 I have a WPF application that renders input forms based on form-configurations saved in a database. The forms have many controls (100+) and most of these controls are derived from a TextBox-control. On some machines (fast Hardware, Win7 32Bit, also some elder, Windows XP 32Bit), after entering data to a lot of these forms, input performance goes down. Every keystroke gets a delay of some milliseconds and the only solution to resolve this is to close the application and restart it. My derived

WPF Performance Problems with derived TextBox controls

假如想象 提交于 2020-01-05 21:23:30
问题 I have a WPF application that renders input forms based on form-configurations saved in a database. The forms have many controls (100+) and most of these controls are derived from a TextBox-control. On some machines (fast Hardware, Win7 32Bit, also some elder, Windows XP 32Bit), after entering data to a lot of these forms, input performance goes down. Every keystroke gets a delay of some milliseconds and the only solution to resolve this is to close the application and restart it. My derived