jenkins-bot has submitted this change and it was merged. Change subject: Add community health stats for editor milestones ......................................................................
Add community health stats for editor milestones Keep track of the rate at which editors are hitting milestones, which are defined as powers-of-ten edit counts (1, 10, 100, 1000...), and the time it takes editors to reach these milestones. Change-Id: I5240017421bd0c61af52619e11c0c32f447c8f84 (cherry picked from commit 611825461d89e7ab0fe8314dd0d3303a8643cd1a) --- M WikimediaEventsHooks.php 1 file changed, 9 insertions(+), 4 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/WikimediaEventsHooks.php b/WikimediaEventsHooks.php index faea612..5d8bf2f 100644 --- a/WikimediaEventsHooks.php +++ b/WikimediaEventsHooks.php @@ -85,11 +85,16 @@ $editCount = $user->getEditCount(); - if ( $editCount === 0 ) { - // It's the user's first edit! Report the time elapsed since the - // user registered as "ttfe" ("time to first edit"). + + // Check if this edit brings the user's total edit count to a value + // that is a factor of ten. We consider these 'milestones'. The rate + // at which editors are hitting such milestones and the time it takes + // are important indicators of community health. + if ( $editCount === 0 || preg_match( '/^9+$/' , "$editCount" ) ) { + $milestone = $editCount + 1; $stats = RequestContext::getMain()->getStats(); - $stats->timing( 'ttfe', $age ); + $stats->increment( "editor.milestones.{$editCount}" ); + $stats->timing( "editor.milestones.timing.{$editCount}", $age ); } // If the editor signed up in the last thirty days, and if this is an -- To view, visit https://gerrit.wikimedia.org/r/226109 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5240017421bd0c61af52619e11c0c32f447c8f84 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaEvents Gerrit-Branch: wmf/1.26wmf14 Gerrit-Owner: Ori.livneh <o...@wikimedia.org> Gerrit-Reviewer: Ori.livneh <o...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits