![]() |
|
"be consistent" | |
PerlMonks |
Re^3: MySQL Query Time DBIby zebedee (Pilgrim) |
on Nov 10, 2008 at 07:11 UTC ( #722565=note: print w/replies, xml ) | Need Help?? |
Illuminatus is correct - the time comes from the mysql command client. Not that it helps the OP, but I was interested in finding out about this (and one of the key points of Open Source is that you CAN look at the source!) (Based on MySQL 5.0.51a, OpenBSD port) client/mysql.cc (around line 2049) (line 2092) timer=start_timer(); (line 2137) mysql_end_timer(timer,time_buff); (line 2170 - the "n rows in set" message) (line 2195) strmov(pos, time_buff); So, what does mysql_end_timer put in time_buff? (line 3726, same file, builds the "(" and ")", calling nice_time for the seconds display) (line 3695 - builds the "n sec" part) And, so, finally, what does start_timer() do? (line 3684) Assuming we are not running on WIN/OS2/NETWARE, we can see what times does: http://www.openbsd.org/cgi-bin/man.cgi?query=times&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=i386&format=html BUT converting this into Perl is for another day!
In Section
Seekers of Perl Wisdom
|
|