Hi!
As of the latest push we can easily run gprof with Drizzle.
Do this:
./configure --enable-profiling
Now go run a single test:
/test-run t/mysqlslap.test
And then this:
libtool --mode=execute gprof ../server/drizzled var/master-data/gmon.out
(aka if you are in the tests/ directory)
This will turn on gprof for the server, so you can do a make install
and just run queries if you like. The above is a bit more specific to
the tree.
So we find out things like:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
13.54 0.47 0.47 35627 0.01 0.05 MYSQLparse(void*)
7.49 0.73 0.26 122639 0.00 0.00
get_text(Lex_input_stream*, int, int)
6.92 0.97 0.24 18157608 0.00 0.00
Lex_input_stream::yyGet()
3.75 1.10 0.13 672689 0.00 0.00
lex_one_token(void*, void*)
3.17 1.21 0.11 15871224 0.00 0.00
Lex_input_stream::eof()
2.59 1.30 0.09 136976 0.00 0.00
copy_and_convert(char*, unsigned int, charset_info_st*, char const*,
unsigned int, charset_info_st*, unsigned int*)
1.44 1.35 0.05 74144 0.00 0.00 mi_lock_database
1.44 1.40 0.05 32280 0.00 0.02
mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&,
List<Item>&, List<Item>&, enum_duplicates, bool)
1.44 1.45 0.05 32232 0.00 0.00
open_table(THD*, TABLE_LIST*, st_mem_root*, bool*, unsigned int)
Cheers,
-Brian
BTW I am hoping someone transfers this to the wiki so that others will
know how to do it.
--
_______________________________________________________
Brian "Krow" Aker, brian at tangent.org
Seattle, Washington
http://krow.net/ <-- Me
http://tangent.org/ <-- Software
_______________________________________________________
You can't grep a dead tree.
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp