1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 20:40:56 +01:00

Remove line-related stats from Differential

Summary:
Ref T2825. Line stats are misleading when multiple commits are associated with a revision. It's better to have no data than misleading/bad data.

We can compute them accurately against commits via Fact/ETL at some point far in the future (see T1562 / T1135).

Test Plan: {F37519}

Reviewers: ptarjan

Reviewed By: ptarjan

CC: aran

Maniphest Tasks: T2825

Differential Revision: https://secure.phabricator.com/D5432
This commit is contained in:
epriestley 2013-03-26 13:59:02 -07:00
parent 426862bb2d
commit ebdf5d12de

View file

@ -46,7 +46,6 @@ final class DifferentialRevisionStatsView extends AphrontView {
$dates = array(); $dates = array();
$counts = array(); $counts = array();
$lines = array();
$days_with_diffs = array(); $days_with_diffs = array();
$count_active = array(); $count_active = array();
$response_time = array(); $response_time = array();
@ -62,7 +61,6 @@ final class DifferentialRevisionStatsView extends AphrontView {
) as $age) { ) as $age) {
$dates[$age] = strtotime($age . ' ago 23:59:59'); $dates[$age] = strtotime($age . ' ago 23:59:59');
$counts[$age] = 0; $counts[$age] = 0;
$lines[$age] = 0;
$count_active[$age] = 0; $count_active[$age] = 0;
$response_time[$age] = array(); $response_time[$age] = array();
} }
@ -96,9 +94,6 @@ final class DifferentialRevisionStatsView extends AphrontView {
} }
if (!$revision_seen) { if (!$revision_seen) {
if ($rev) {
$lines[$age] += $rev->getLineCount();
}
$counts[$age]++; $counts[$age]++;
if (!$old_daycount) { if (!$old_daycount) {
$count_active[$age]++; $count_active[$age]++;
@ -125,13 +120,9 @@ final class DifferentialRevisionStatsView extends AphrontView {
$row_array[$age] = array( $row_array[$age] = array(
pht('Revisions per week') => number_format($counts[$age] / $weeks, 2), pht('Revisions per week') => number_format($counts[$age] / $weeks, 2),
pht('Lines per week') => number_format($lines[$age] / $weeks, 1),
pht('Active days per week') => pht('Active days per week') =>
number_format($count_active[$age] / $weeks, 1), number_format($count_active[$age] / $weeks, 1),
pht('Revisions') => number_format($counts[$age]), pht('Revisions') => number_format($counts[$age]),
pht('Lines') => number_format($lines[$age]),
pht('Lines per diff') => number_format($lines[$age] /
($counts[$age] + 0.0001)),
pht('Active days') => number_format($count_active[$age]), pht('Active days') => number_format($count_active[$age]),
); );