|
@@ -256,27 +256,26 @@ class DataCenter(object):
|
|
|
|
|
|
return filer_text, paths
|
|
|
|
|
|
- def _draw_plot(self, ax, x, day_stamp, start_pos, data, internal=300, path=''):
|
|
|
+ def _draw_plot(self, ax, x, day_stamp, start_pos, data, interval=300, path=''):
|
|
|
import matplotlib.dates as mdate
|
|
|
# 'commit-succ': 0, 'commit-fail': 1, 'notify-succ': 2, 'notify-fail': 3, 'user_succ': 4
|
|
|
|
|
|
all = data[2] + data[3]
|
|
|
- all = all.reshape((internal, -1))
|
|
|
- all = np.sum(all, axis=0)
|
|
|
+ all = all.reshape((-1, interval))
|
|
|
+ all = np.sum(all, axis=1)
|
|
|
|
|
|
- pos = np.where(all >= 1)
|
|
|
- all = all[pos]
|
|
|
+ # pos = np.where(all >= 1)
|
|
|
+ # all = all[pos]
|
|
|
|
|
|
ySucc = data[2]
|
|
|
- ySucc = ySucc.reshape((internal, -1))
|
|
|
- ySucc = np.sum(ySucc, axis=0)
|
|
|
+ ySucc = ySucc.reshape((-1, interval))
|
|
|
+ ySucc = np.sum(ySucc, axis=1)
|
|
|
|
|
|
- ySucc = ySucc[pos]
|
|
|
- ySucc = ySucc / all
|
|
|
- x = x[pos]
|
|
|
+ # ySucc = ySucc[pos]
|
|
|
+ ySucc = ySucc / (all + 0.00000001)
|
|
|
+ # x = x[pos]
|
|
|
|
|
|
pos = np.where(x >= start_pos)
|
|
|
-
|
|
|
ySucc = ySucc[pos]
|
|
|
x = x[pos]
|
|
|
|