Project metrics, a diversion through project_usage.module

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
drewish's picture

I've been spending most of the last week working on the project_usage.module. I got a copy of the usage data that's been reported to Drupal.org and spent some time fixing bugs (#167074) and making some small improvements (#167079, #167048). My big goal has been to get some code together to make the usage data visible (#165380). I've attached a few screen shots to show how it works.

I need to get some feedback on the queries. They end up using a lot of LEFT JOINs and some other funky SQL that might be a bit more than d.o can handle right now. One options is to just cache the results of each page. If I wasn't using the paged query for the overview that would be an easy solution.

AttachmentSize
project_usage_overview.PNG36.2 KB
project_usage_project.PNG21.11 KB
project_usage_release.PNG13.18 KB

Comments

looks great

greggles's picture

These look great to me! I can't wait to see the real full data.

I'd like to see them on the individual project page as well. Where is the issue for the left joins?

In http://groups.drupal.org/files/project_usage_overview.PNG - it looks like something is a little wrong because you have 1366 using "Drupal" (which I assume means core) and 1365 using update_status.

So, there's an "off-by-one" error somewhere or something like that, right?

--
Knaddisons Denver Life | mmm Chipotle Log | The Big Spanish Tour

i also noticed the 1366/1365

drewish's picture

i also noticed the 1366/1365 difference. it could be due to a lot of things: an incorrect version string, someone changing their site key...

the left joins are much less efficient than inner joins but are necessary because we may not have usage for a given week but we still want to list the project or release. in the latest version of the patch i documented the reason for adding the left joins.