Last modified: 2013-11-23 12:27:37 UTC
Add query duration as meta data Query duration is designed as opt-in preference (default smwgQueryDurationEnabled = false) while enabling (smwgQueryDurationEnabled = true) requires to run update.php.
Change 78223 had a related patch set uploaded by Mwjames: (Bug 52642) Add query duration as meta data https://gerrit.wikimedia.org/r/78223
Woot! Thanks James!
If you guys need someone to test this I would happily enable it on my farm.
You can test the patch if you want all necessary tests did pass. I didn't wanted to merge this because internally I wanted to use the Dependency Injection Framework for some of the object which from the outside doesn't make any difference. If you test the patch '$smwgQueryDurationEnabled' needs be set true (default is false) and you have to run update.php because the special property _ASKDU expects a table.
I cherry picked it out of Gerrit. git fetch https://gerrit.wikimedia.org/r/mediawiki/extensions/SemanticMediaWiki refs/changes/23/78223/4 && git checkout FETCH_HEAD LocalSettings.php has $smwgQueryDurationEnabled = true; Update gave me: Checking table `smw_fpt_askdu` ... Table not found, now creating... ... done. But not seeing any duration information in the query objects. I'm guessing this is something I didn't setup right. http://wikiapiary.com/wiki/Special:Browse/WikiApiary-23_QUERYc0dc85bc9bda16e78791fe45c936bc64
I remember I changed the configuration into: $smwgQueryDataUsage = array( 'smwgQueryDurationEnabled' => true, );
OMG awesome. http://wikiapiary.com/wiki/Special:Browse/WikiApiary-23_QUERY4cacaeb61ecfa9a8602aff90ec304f7e Slowest queries on WikiApiary: http://wikiapiary.com/w/index.php?title=Special%3AAsk&q=%5B%5BQuery+duration%3A%3A%2B%5D%5D&po=%3FQuery+duration%0D%0A&eq=yes&p%5Bformat%5D=broadtable&sort_num=&order_num=ASC&p%5Blimit%5D=&p%5Boffset%5D=&p%5Blink%5D=all&p%5Bsort%5D=Query+duration&p%5Border%5D%5Bdescending%5D=1&p%5Bheaders%5D=show&p%5Bmainlabel%5D=&p%5Bintro%5D=&p%5Boutro%5D=&p%5Bsearchlabel%5D=…+further+results&p%5Bdefault%5D=&p%5Bclass%5D=sortable+wikitable+smwtable&eq=yes This is going to be great for SMW developers and admins! Now, if I can also query the average of it or something for WikiApiary.
Using the current master of Semantic MediaWiki it doesn't appear that this was ever integrated into the final release. I have the setting declared but nothing is being stored and I didn’t see it in the release notes. Did this ridiculously great feature not make the cut?
First time I see it :)
This happens with the low-hanging fruits ...., I'll have shot at it later. By the way I'm think of renaming it from QueryDuration to QueryTime any opinions on that?
+1 for QueryTime. Would love to get this in 1.9 so I could start collecting data using it from Semantic MediaWiki sites via WikiApiary.
"query time" is a bit misleading, I'd expect this to mean the time at which the query was executed. "query duration" OTOH is quite clear.
(In reply to comment #12) > "query time" is a bit misleading, I'd expect this to mean the time at which > the > query was executed. "query duration" OTOH is quite clear. and QueryDuration it is ... (In reply to comment #11) > +1 for QueryTime. > > Would love to get this in 1.9 so I could start collecting data using it from > Semantic MediaWiki sites via WikiApiary. Remember QueryDuration is a trend value which captures the current performance of a query and therefore should be used as mean value over a time period but of course for a general trend analysis such as (Top 10 Best and Worst) it will generally yield sufficient representation.
> Would love to get this in 1.9 so I could start collecting data using it from > Semantic MediaWiki sites via WikiApiary. So you know what the best query candidates are for DoS'ing someone :D
Change 78223 abandoned by Mwjames: (Bug 52642) Add query duration as meta data option Reason: Due to issues with Jenkins moved to [1]. [1] https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/30 https://gerrit.wikimedia.org/r/78223
Settings have been changed to: $smwgQueryProfiler = array( 'smwgQueryDurationEnabled' => true, );
https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/30 has been merged \o/
and the crowd roared with excitement! :-)