Clean APIs to retrieve project related statistics

Dries - February 10, 2009 - 08:56
Project:Project
Version:6.x-1.x-dev
Component:Usage statistics
Category:feature request
Priority:normal
Assigned:dww
Status:closed
Issue tags:drupal.org redesign
Description

On the "Get involved" page of the new Drupal.org design (http://drupal.markboultondesign.com/iteration11/getinvolved.html) there is a "Drupal.org activity" block that needs to be implemented.

Specifically, the activity block shows:

  * 3,100,342 Sites running Drupal
  * 68,094 Comments and issue follow-ups

We need to implement clean APIs for this so they can be used on drupal.org -- if they don't exist already. The parent issue for the block itself is #371970: Drupal.org activity block .

#1

dww - April 11, 2009 - 21:51
Title:Clean APIs to retrieve project related statistics for Drupal.org redesign» Clean APIs to retrieve project related statistics
Component:Issues» Usage statistics
Assigned to:Anonymous» dww
Status:active» needs review

This patch provides an API to fetch usage stats. See #431144: Clean API to provide statistics from core for issue stats.

AttachmentSize
371968-1.get_usage_api.patch 3.09 KB

#2

hunmonk - April 11, 2009 - 22:13

would these API's be more useful if more information could be passed in the call? for example, an optional timestamp parameter to allow grabbing olders usage stats, which would default to the current week.

that may be overengineering at this point, i just wanted to put it out there for consideration.

otherwise, the code looks good.

#3

dww - April 11, 2009 - 22:24

I thought of exactly the same thing, but decided against it for a few reasons:

a) less complication

b) there are settings which control how far back you save usage, and there's no _guarantee_ that the current week from the calendar point of view matches which week we have data for.

I thought it'd be better to just always provide a "current" total based on the data we really have. I think if there's a use-case for fetching data for specific weeks, we can add the optional final argument and complicate things when we need it. Let's not preemptively complicate.

#4

dww - April 11, 2009 - 22:50
Status:needs review» fixed

Committed to HEAD. If there are other project-related statistics we need, lets use new issues for those.

#5

System Message - April 25, 2009 - 23:00
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.