Closed Bug 492998 Opened 16 years ago Closed 16 years ago

implement AMO 2009 home page stats

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: lorchard, Assigned: lorchard)

References

Details

Attachments

(1 file)

See: https://bugzilla.mozilla.org/show_bug.cgi?id=490906#c5 The new design calls for vitality statistics on the home page, including all-time downloads and daily downloads. These counts should be calculated in a maintenance script and stashed in a table for the home page to fetch and display,
Per nick's comment (https://bugzilla.mozilla.org/show_bug.cgi?id=490906#c8)... Guessing these are the queries I need for this: add-ons downloaded = SELECT SUM(count) FROM download_counts; add-ons in use = SELECT SUM(count) FROM update_counts WHERE date > ( now() - INTERVAL 1 DAY ) Do we happen to have this data anywhere already in a summary table? Or, should introducing a summary table be part of this bug? Definitely needs to be in the maintenance script, since the "downloaded" query took 30 seconds on my laptop
I couldn't find a global stats summary table, so this patch introduces one. The maintenance script gets a new 'global_stats' command that updates the two counts used by the home page. A new model class lets the home page controller fetch the counts and pass them to the view. r? to clouserw, but feel free to pass it along if someone else has time
Assignee: nobody → lorchard
Status: NEW → ASSIGNED
Attachment #378712 - Flags: review?(clouserw)
Attachment #378712 - Flags: review?(clouserw) → review+
Filed bug 494171 to get the SQL into preview and added to: https://wiki.mozilla.org/AMO:Developers/Database_Changes#5.0.6 Will wait until the DB changes are made to check in, so as not to break anything.
Depends on: 493320
bug 493320 closed, so checked in as r26088 FYI: The stats will not appear until the 'global_stats' maintenance.php command is run on preview.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Verified FIXED on https://preview.addons.mozilla.org/en-US/firefox/; showing up now (all-time downloads, daily downloads).
Status: RESOLVED → VERIFIED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: