Bug #38950 Quan shows no Execution time for "fast" queries on Windows

Submitted: 21 Aug 2008 21:04 Modified: 13 Jan 2010 20:36
Reporter: Bill Weber Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Agent Severity:S3 (Non-critical)
Version:2.0.0.7032 OS:Windows
Assigned to: Kay Roepke CPU Architecture:Any

[21 Aug 2008 21:04] Bill Weber
Description:
On Windows, fast queries show as taking no time to execute on the Query Analysis tab (Execution = 0.000). Note, the reason for this is that glib uses GetSystemTimeAsFileTime() which has a 10ms accuracy.

How to repeat:
- install and start dashboard
- install and start an agent on Windows with query analysis turned on
- run some small/fast queries through the proxy
- go to Query Analysis page on dashboard
| notice Execution time = 0.000

Suggested fix:
 use something like this for windows:
 LARGE_INTEGER freq;
 LARGE_INTEGER startTime, endTime;
 LARGE_INTEGER elapsedTime, elapsedMilliseconds;
 QueryPerformanceFrequency(&freq);
 QueryPerformanceCounter(&startTime);
 / run code here
 QueryPerformanceCounter(&endTime);
 elapsedTime = endTime - startTime;
 elapsedMilliseconds = (1000 * elapsedTime) / freq;
[20 Aug 2009 17:43] MC Brown
A note has been added to the documentation in the QA chapter on this issue.
[8 Jan 2010 21:27] Enterprise Tools JIRA Robot


Attachment: 10240_before.txt (text/plain), 3.07 KiB.

[8 Jan 2010 21:27] Enterprise Tools JIRA Robot


Attachment: 10241_after.txt (text/plain), 3.19 KiB.

[12 Jan 2010 14:29] Enterprise Tools JIRA Robot
Kay Roepke writes: 
fix pushed to lp:mysql-proxy trunk:

classdump:mysql-proxy kroepke$ bzr missing
Using saved parent location: bzr+ssh://bazaar.launchpad.net/~mysql-proxy-developers/mysql-proxy/trunk/
You have 1 extra revision(s):
------------------------------------------------------------
revno: 949
committer: Kay Roepke <kay@sun.com>
branch nick: mysql-proxy
timestamp: Tue 2010-01-12 15:27:45 +0100
message:
  Bug#38950/EM-258: my_timer_microseconds needs adjustment for QueryPerformanceCounter frequency on windows. without adjustment it does not return microseconds, making timers fail to report the accurate values on windows
classdump:mysql-proxy kroepke$ bzr push
Using saved push location: bzr+ssh://bazaar.launchpad.net/~mysql-proxy-developers/mysql-proxy/trunk/
Pushed up to revision 949.
[12 Jan 2010 19:54] Enterprise Tools JIRA Robot
Keith Russell writes: 
Patch installed in build.
[12 Jan 2010 20:54] Enterprise Tools JIRA Robot
Keith Russell writes: 
Patch installed in build.
[13 Jan 2010 12:56] Enterprise Tools JIRA Robot
Kay Roepke writes: 
revno: 951
committer: Kay Roepke <kay@sun.com>
branch nick: mysql-proxy
timestamp: Wed 2010-01-13 13:54:53 +0100
message:
  Bug#38950/EM-258: the previous commit did not fix the issue, most likely because of value truncation during integer division. force using floating point arith and cast back to guint64. also log a critical message on windows if we seem to lack QueryPerformanceCounter support
[13 Jan 2010 19:30] Enterprise Tools JIRA Robot
Keith Russell writes: 
Patch available in builds => 2.2.0.1606.
[13 Jan 2010 20:34] Enterprise Tools JIRA Robot


Attachment: 10260_1606.txt (text/plain), 3.18 KiB.

[13 Jan 2010 20:36] Enterprise Tools JIRA Robot
Bill Weber writes: 
looks like this is reporting correct times with build 2.2.0.1606 (see 1606.txt)

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.075 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.