Skip to content

Commit

Permalink
feat(reporter): add extra frame in unstable range
Browse files Browse the repository at this point in the history
for better experience
  • Loading branch information
williamfzc committed Mar 2, 2020
1 parent d8bbc8c commit 59c0815
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions stagesepx/reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,11 @@ def draw(
# mark range
for each in unstable_ranges:
classifier_result.mark_range_unstable(each.start, each.end)

offset = classifier_result.get_offset()
for each in classifier_result.get_stage_range():
stage_range = classifier_result.get_stage_range()
for cur_index in range(len(stage_range)):
each = stage_range[cur_index]
middle = each[len(each) // 2]
if middle.is_stable():
label = "stable"
Expand All @@ -217,12 +220,13 @@ def draw(
)
else:
label = "unstable"
# add a frame
frame = np.hstack(
[
toolbox.compress_frame(
i.get_data(), compress_rate=compress_rate
)
for i in each
for i in [*each, stage_range[cur_index + 1][0]]
]
)

Expand Down

0 comments on commit 59c0815

Please sign in to comment.