r109139 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109138‎ | r109139 | r109140 >
Date:12:19, 17 January 2012
Author:ialex
Status:ok (Comments)
Tags:
Comment:
If you want to display miliseconds, make the time be really miliseconds and not seconds
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.debug.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki/mediawiki.debug.js
@@ -261,7 +261,7 @@
262262 $( '<tr>' )
263263 .append( $( '<td>' ).text( i + 1 ) )
264264 .append( $( '<td>' ).text( query.sql ) )
265 - .append( $( '<td class="stats">' ).text( query.time.toFixed( 4 )+ 'ms' ) )
 265+ .append( $( '<td class="stats">' ).text( ( query.time * 1000 ).toFixed( 4 ) + 'ms' ) )
266266 .append( $( '<td>' ).text( query['function'] ) )
267267 .appendTo( $table );
268268 }

Comments

#Comment by Nikerabbit (talk | contribs)   13:06, 17 January 2012

This looks wrong. Simple query can't take 300 ms.

#Comment by IAlex (talk | contribs)   16:39, 17 January 2012

So you have a problem somewhere, because the time passed from MWDebug to JavaScript is in seconds, not milliseconds. On my machine with this rev, simple queries take between 0.1 and 0.3 milliseconds.

#Comment by Nikerabbit (talk | contribs)   16:50, 17 January 2012

You're right. I didn't expect the queries to be so fast.

Status & tagging log