Merge "NetApp Data ONTAP headroom calculation error"

This commit is contained in:
Jenkins 2016-10-14 20:39:28 +00:00 committed by Gerrit Code Review
commit 988aa2fd6c
2 changed files with 2 additions and 3 deletions

View File

@ -261,7 +261,7 @@ class PerformanceLibraryTestCase(test.TestCase):
result = self.perf_library._get_adjusted_consistency_point_time(
500, 200)
self.assertAlmostEqual(250, result)
self.assertAlmostEqual(360.0, result)
def test_get_performance_counter_delta(self):

View File

@ -129,8 +129,7 @@ class PerformanceLibrary(object):
p2_flush_time):
"""Get adjusted CP time by limiting CP phase 2 flush time to 20%."""
return (total_cp_time *
(1.0 - (1.0 * p2_flush_time / total_cp_time) / 0.8))
return (total_cp_time - p2_flush_time) * 1.20
def _get_performance_counter_delta(self, counters_t1, counters_t2,
counter_name):