|
@@ -1,6 +1,6 @@
|
|
|
from .DataStream import EChPosmap as pos_map
|
|
|
from .ChannelReader import ChannelReader, ChPathFilter
|
|
|
-from .ChannelPainter import ChannelPainter, ratio_pathes, get_channels
|
|
|
+from .ChannelPainter import ChannelPainter, detail_pathes, get_channels
|
|
|
from matplotlib.figure import Figure
|
|
|
from matplotlib import ticker
|
|
|
from io import BytesIO
|
|
@@ -92,27 +92,28 @@ class ChannelSpeedAnalyzePainter(ChannelPainter):
|
|
|
|
|
|
tuple_pathes = reader.many_tuple_path(days, self._chnames, self._card_types, self._spec)
|
|
|
filter = ChPathFilter(self._chnames, self._card_types, self._spec)
|
|
|
- gen = ratio_pathes(reader, tuple_pathes, days, filter)
|
|
|
+ gen = detail_pathes(reader, tuple_pathes, days)
|
|
|
day_stamp = days[0]
|
|
|
|
|
|
+ channels = {}
|
|
|
commits = []
|
|
|
succs = []
|
|
|
ratios = []
|
|
|
fig, ax_hist_succs, ax_scatter, ax_succ_cdf, ax_ratio_cdf, ax_ratio_latest = self._fig_create()
|
|
|
for _chname, _card_type, _spec, _data in gen:
|
|
|
- if _card_type is not None and _spec is not None:
|
|
|
- logger.debug(f'chname={_chname} card_type={_card_type} spec={_spec}')
|
|
|
+ logger.debug(f'chname={_chname} card_type={_card_type} spec={_spec}')
|
|
|
+ if _chname != 'all' and _card_type is not None and _spec is not None:
|
|
|
_commits, _succs, _ratios = calc_chspeed_ratio(_data, pos_map, _start_time - day_stamp, _end_time - day_stamp, self._period)
|
|
|
ax_scatter.scatter(_commits, _succs)
|
|
|
commits.extend(_commits)
|
|
|
succs.extend(_succs)
|
|
|
ratios.extend(ratios)
|
|
|
|
|
|
- succs = np.array(succs).astype(int)
|
|
|
- commits = np.array(commits).astype(int)
|
|
|
-
|
|
|
- self._succ_hist(succs,ax_hist_succs)
|
|
|
- self._succ_cdf(succs,commits,ax_succ_cdf,ax_ratio_cdf,ax_ratio_latest)
|
|
|
+ if len(succs) > 0 and len(commits) > 0:
|
|
|
+ succs = np.array(succs).astype(int)
|
|
|
+ commits = np.array(commits).astype(int)
|
|
|
+ self._succ_hist(succs,ax_hist_succs)
|
|
|
+ self._succ_cdf(succs,commits,ax_succ_cdf,ax_ratio_cdf,ax_ratio_latest)
|
|
|
buf = self._flush(fig, ax_scatter, ax_succ_cdf, ax_hist_succs, ax_ratio_cdf, ax_ratio_latest)
|
|
|
|
|
|
result = []
|