On Wed, Jun 29, 2011 at 10:19 AM, Ashar Voultoiz <[email protected]> wrote:

> You gave me the git repo at one point. Still haven't managed to look at
> the code and enhance it.  Maybe we could add it to the subversion
> repository and have volunteers enhance it.


Here's the repo:
https://gitorious.org/mwcrstats/mwcrstats

On Wed, Jun 29, 2011 at 10:22 AM, Chad <[email protected]> wrote:

> Even cooler would be integrating this into CodeReview itself,
> perhaps alongside what we have [here:]
> http://www.mediawiki.org/wiki/Special:Code/MediaWiki/stats


That would be cool.  The code I wrote is in Python, so it would need to be
ported PHP.  I took an approach that gave me a lot of flexibility, but it
also made things a little complicated.  Bryan Tong Minh's approach may be a
better starting point for the data generation part.  I don't remember where
he posted the queries he uses, but I'll post them here now:

mysql -hsql-s3 mediawikiwiki_p -e"SELECT MAX(cpc_timestamp) AS ok_timestamp
FROM code_rev JOIN code_prop_changes ON cpc_repo_id = 1 AND cpc_rev_id =
cr_id WHERE cr_repo_id = 1 AND cr_status IN ('ok', 'resolved') AND cr_path
LIKE '/trunk/phase3%' GROUP BY cr_id ORDER BY ok_timestamp ASC" -N
>code_ok.txt

mysql -hsql-s3 mediawikiwiki_p -e"SELECT cr_timestamp FROM code_rev LEFT
JOIN code_prop_changes ON cpc_repo_id = 1 AND cpc_rev_id = cr_id WHERE
cr_repo_id = 1 AND cr_status IN ('ok', 'resolved', 'fixme', 'new') AND
cr_path LIKE '/trunk/phase3%' AND (cpc_rev_id IS NOT NULL OR cr_status =
'new') GROUP BY cr_id ORDER BY cr_timestamp ASC" -N >code_all.txt

Nimish and Erik Zachte are in the process of working on some jqPlot-based
reporting tools, and it might be best to leverage their work rather than
using Flot (which is what my code uses).  jqPlot is a fork of Flot, from
what I understand, so much of what is possible in Flot should also be
possible in jqPlot.  Some more info on that is here:
http://www.mediawiki.org/wiki/Wikimedia_Report_Card_2.0
...and
http://www.mediawiki.org/wiki/Wikimedia_Report_Card_2.0/status

Rob
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to