Skip to content
This repository
Browse code

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
  • Loading branch information...
commit ebdf5d12de5e337f1808d638b08855e3321d3aac 1 parent 426862b
Evan Priestley authored
9  src/applications/differential/view/DifferentialRevisionStatsView.php
@@ -46,7 +46,6 @@ public function render() {
46 46
 
47 47
     $dates = array();
48 48
     $counts = array();
49  
-    $lines = array();
50 49
     $days_with_diffs = array();
51 50
     $count_active = array();
52 51
     $response_time = array();
@@ -62,7 +61,6 @@ public function render() {
62 61
              ) as $age) {
63 62
       $dates[$age] = strtotime($age . ' ago 23:59:59');
64 63
       $counts[$age] = 0;
65  
-      $lines[$age] = 0;
66 64
       $count_active[$age] = 0;
67 65
       $response_time[$age] = array();
68 66
     }
@@ -96,9 +94,6 @@ public function render() {
96 94
         }
97 95
 
98 96
         if (!$revision_seen) {
99  
-          if ($rev) {
100  
-            $lines[$age] += $rev->getLineCount();
101  
-          }
102 97
           $counts[$age]++;
103 98
           if (!$old_daycount) {
104 99
             $count_active[$age]++;
@@ -125,13 +120,9 @@ public function render() {
125 120
 
126 121
       $row_array[$age] = array(
127 122
         pht('Revisions per week') => number_format($counts[$age] / $weeks, 2),
128  
-        pht('Lines per week') => number_format($lines[$age] / $weeks, 1),
129 123
         pht('Active days per week') =>
130 124
           number_format($count_active[$age] / $weeks, 1),
131 125
         pht('Revisions') => number_format($counts[$age]),
132  
-        pht('Lines') => number_format($lines[$age]),
133  
-        pht('Lines per diff') => number_format($lines[$age] /
134  
-                                          ($counts[$age] + 0.0001)),
135 126
         pht('Active days') => number_format($count_active[$age]),
136 127
       );
137 128
 

0 notes on commit ebdf5d1

Please sign in to comment.
Something went wrong with that request. Please try again.