Fix pandas rolling calls in run_time graph

This commit fixes the use of rolling_mean() and rolling_std() in the
run_time graph command. These functions were removed from pandas a few
releases ago and were replaced by the Rolling class. We updated the
other commands already, but the run_time graph was missed. This commit
corrects the oversight and uses the Rolling class to generate the
rolling mean and std dev data.

Change-Id: I4a2fd0256b05f468cdbbe67fb2573233f64d74d8
This commit is contained in:
Matthew Treinish 2018-08-23 16:27:46 -04:00
parent 08222d7a2b
commit 190c3e6c87
No known key found for this signature in database
GPG Key ID: FD12A0F214C9E177
1 changed files with 3 additions and 2 deletions

View File

@ -53,8 +53,9 @@ def generate_series():
if ts.count() == 0:
print("No data available. Check your query and try again.")
exit(-1)
mean = pd.rolling_mean(ts, 20)
rolling_std = pd.rolling_std(ts, 20)
roll = ts.rolling(window=20, center=False)
mean = roll.mean()
rolling_std = roll.std()
plt.figure()
if not CONF.title:
plt.title(test.test_id)