Skip to content

Commit

Permalink
Bug 858735 (3/4) - Don't skip the first j results in analyze_t [r=cat…
Browse files Browse the repository at this point in the history
…lee]
  • Loading branch information
mbrubeck committed Apr 10, 2013
1 parent 71046ff commit 7993d12
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion treeherder/perfalert/perfalert/analyze.py
Expand Up @@ -83,7 +83,7 @@ def analyze_t(self, j, k, threshold, machine_threshold, machine_history_size):
# Analyze test data using T-Tests, comparing data[i-j:i] to data[i:i+k]
good_data = []

for i in range(j, len(self.data)-k+1):
for i in range(len(self.data)-k+1):
di = self.data[i]
jw = [d.value for d in good_data[-j:]]
kw = [d.value for d in self.data[i:i+k]]
Expand Down
11 changes: 8 additions & 3 deletions treeherder/perfalert/perfalert/test_analyze.py
Expand Up @@ -30,11 +30,16 @@ def test_analyze_t(self):

result = [(d.time, state) for d, state in a.analyze_t(5, 5, 2, 15, 5)]
self.assertEqual(result, [
(0, 'good'),
(1, 'good'),
(2, 'good'),
(3, 'good'),
(4, 'good'),
(5, 'good'),
(6, 'good'),
(7, 'good'),
(6, 'regression'),
(7, 'regression'),
(8, 'good'),
(9, 'good'),
(9, 'regression'),
(10, 'regression'),
(11, 'good')])

Expand Down

0 comments on commit 7993d12

Please sign in to comment.