From a18653a136c901e26be6be2b8ba71d948fd9b4a3 Mon Sep 17 00:00:00 2001 From: rokamu623 Date: Wed, 13 Sep 2023 16:51:02 +0900 Subject: [PATCH 1/9] feat: stacked bar worst-in-input Signed-off-by: rokamu623 --- .../plot/stacked_bar/latency_stacked_bar.py | 2 + .../record/records_service/response_time.py | 55 +++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/src/caret_analyze/plot/stacked_bar/latency_stacked_bar.py b/src/caret_analyze/plot/stacked_bar/latency_stacked_bar.py index 571856d27..958d99e8d 100644 --- a/src/caret_analyze/plot/stacked_bar/latency_stacked_bar.py +++ b/src/caret_analyze/plot/stacked_bar/latency_stacked_bar.py @@ -106,6 +106,8 @@ def _get_response_time_record( # include timestamp of response time (best, worst) if self._case == 'best': return response_time.to_best_case_stacked_bar() + if self._case == 'worst-in-input': + return response_time.to_worst_in_input_stacked_bar() return response_time.to_stacked_bar() diff --git a/src/caret_analyze/record/records_service/response_time.py b/src/caret_analyze/record/records_service/response_time.py index 5d5ef6e1d..8bddb4fd3 100644 --- a/src/caret_analyze/record/records_service/response_time.py +++ b/src/caret_analyze/record/records_service/response_time.py @@ -235,12 +235,15 @@ def __init__( if columns: self._start_column = columns[0] self._end_column = columns[-1] + self._columns = columns else: self._start_column = records.columns[0] self._end_column = records.columns[-1] + self._columns = records.columns self._start_timestamps: list[int] = [] self._end_timestamps: list[int] = [] + self._records: list[RecordInterface] = [] for record in reversed(records.data): if self._end_column in record.columns: @@ -257,10 +260,12 @@ def __init__( if start_ts not in self._start_timestamps: self._start_timestamps.insert(0, start_ts) self._end_timestamps.insert(0, end_ts) + self._records.insert(0, record) else: idx = self._start_timestamps.index(start_ts) if end_ts < self._end_timestamps[idx]: self._end_timestamps[idx] = end_ts + self._records[idx] = record def to_all_records(self) -> RecordsInterface: records = self._create_empty_records() @@ -296,6 +301,38 @@ def to_worst_in_input_records(self) -> RecordsInterface: return records + def to_worst_in_input_stacked_bar(self) -> RecordsInterface: + filled_record_list: list[RecordInterface] = [] + + # fill unrecorded data for each records + for record in reversed(self._records): + if len(filled_record_list) == 0: + filled_record_list.insert(0, record) + continue + + next_record = filled_record_list[0] + # fill unrecorded data + for column in self._columns: + if column not in record.columns: + record.add(column, next_record.get(column)) + filled_record_list.insert(0, record) + + # {end_timestamp: record} + filtered_record_dict: dict[int, RecordInterface] = {} + columns = [ColumnValue(c) for c in self._columns] + + # filter worst-in-input record + for record in self._records: + end_ts = record.get(self._end_column) + if end_ts not in filtered_record_dict.keys(): + filtered_record_dict[end_ts] = record + else: + if record.get(self._start_column) < filtered_record_dict[end_ts].get(self._start_column): + filtered_record_dict[end_ts] = record + + stacked_bar_records = RecordsFactory.create_instance(init=list(filtered_record_dict.values()), columns=columns) + return stacked_bar_records + def _create_empty_records( self ) -> RecordsInterface: @@ -413,6 +450,24 @@ def to_best_case_stacked_bar(self) -> RecordsInterface: """ return self._records.to_range_records('best') + def to_worst_in_input_stacked_bar(self) -> RecordsInterface: + """ + Calculate records for stacked bar. + + Returns + ------- + RecordsInterface + Records of the worst-in-input cases response time. + + Columns + - {columns[0]} + - {columns[1]} + - {...} + - {columns[n-1]} + + """ + return self._response_map_all.to_worst_in_input_stacked_bar() + def to_worst_case_stacked_bar(self) -> RecordsInterface: # NOTE: # We think this function is unnecessary. From 0986b73c8e157dd097ccc6900cb457efa1099166 Mon Sep 17 00:00:00 2001 From: rokamu623 Date: Wed, 13 Sep 2023 16:58:56 +0900 Subject: [PATCH 2/9] feat: stacked bar all Signed-off-by: rokamu623 --- .../plot/stacked_bar/latency_stacked_bar.py | 4 +- .../record/records_service/response_time.py | 44 +++++++++++++++++-- 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/src/caret_analyze/plot/stacked_bar/latency_stacked_bar.py b/src/caret_analyze/plot/stacked_bar/latency_stacked_bar.py index 958d99e8d..3554735c7 100644 --- a/src/caret_analyze/plot/stacked_bar/latency_stacked_bar.py +++ b/src/caret_analyze/plot/stacked_bar/latency_stacked_bar.py @@ -107,7 +107,9 @@ def _get_response_time_record( if self._case == 'best': return response_time.to_best_case_stacked_bar() if self._case == 'worst-in-input': - return response_time.to_worst_in_input_stacked_bar() + return response_time.to_worst_in_input_case_stacked_bar() + if self._case == 'all': + return response_time.to_all_stacked_bar() return response_time.to_stacked_bar() diff --git a/src/caret_analyze/record/records_service/response_time.py b/src/caret_analyze/record/records_service/response_time.py index 8bddb4fd3..1e17a3dff 100644 --- a/src/caret_analyze/record/records_service/response_time.py +++ b/src/caret_analyze/record/records_service/response_time.py @@ -301,7 +301,27 @@ def to_worst_in_input_records(self) -> RecordsInterface: return records - def to_worst_in_input_stacked_bar(self) -> RecordsInterface: + def to_all_stacked_bar(self) -> RecordsInterface: + filled_record_list: list[RecordInterface] = [] + + # fill unrecorded data for each records + for record in reversed(self._records): + if len(filled_record_list) == 0: + filled_record_list.insert(0, record) + continue + + next_record = filled_record_list[0] + # fill unrecorded data + for column in self._columns: + if column not in record.columns: + record.add(column, next_record.get(column)) + filled_record_list.insert(0, record) + + columns = [ColumnValue(c) for c in self._columns] + stacked_bar_records = RecordsFactory.create_instance(init=filled_record_list, columns=columns) + return stacked_bar_records + + def to_worst_in_input_case_stacked_bar(self) -> RecordsInterface: filled_record_list: list[RecordInterface] = [] # fill unrecorded data for each records @@ -450,7 +470,25 @@ def to_best_case_stacked_bar(self) -> RecordsInterface: """ return self._records.to_range_records('best') - def to_worst_in_input_stacked_bar(self) -> RecordsInterface: + def to_all_stacked_bar(self) -> RecordsInterface: + """ + Calculate records for stacked bar. + + Returns + ------- + RecordsInterface + Records of the all response time. + + Columns + - {columns[0]} + - {columns[1]} + - {...} + - {columns[n-1]} + + """ + return self._response_map_all.to_all_stacked_bar() + + def to_worst_in_input_case_stacked_bar(self) -> RecordsInterface: """ Calculate records for stacked bar. @@ -466,7 +504,7 @@ def to_worst_in_input_stacked_bar(self) -> RecordsInterface: - {columns[n-1]} """ - return self._response_map_all.to_worst_in_input_stacked_bar() + return self._response_map_all.to_worst_in_input_case_stacked_bar() def to_worst_case_stacked_bar(self) -> RecordsInterface: # NOTE: From cbdc1cd045327852ccfafb37627f5df9c4847307 Mon Sep 17 00:00:00 2001 From: rokamu623 Date: Wed, 13 Sep 2023 22:08:36 +0900 Subject: [PATCH 3/9] fix: flake8 Signed-off-by: rokamu623 --- .../record/records_service/response_time.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/caret_analyze/record/records_service/response_time.py b/src/caret_analyze/record/records_service/response_time.py index 1e17a3dff..186afd876 100644 --- a/src/caret_analyze/record/records_service/response_time.py +++ b/src/caret_analyze/record/records_service/response_time.py @@ -318,7 +318,8 @@ def to_all_stacked_bar(self) -> RecordsInterface: filled_record_list.insert(0, record) columns = [ColumnValue(c) for c in self._columns] - stacked_bar_records = RecordsFactory.create_instance(init=filled_record_list, columns=columns) + stacked_bar_records =\ + RecordsFactory.create_instance(init=filled_record_list, columns=columns) return stacked_bar_records def to_worst_in_input_case_stacked_bar(self) -> RecordsInterface: @@ -347,10 +348,13 @@ def to_worst_in_input_case_stacked_bar(self) -> RecordsInterface: if end_ts not in filtered_record_dict.keys(): filtered_record_dict[end_ts] = record else: - if record.get(self._start_column) < filtered_record_dict[end_ts].get(self._start_column): + if record.get(self._start_column)\ + < filtered_record_dict[end_ts].get(self._start_column): filtered_record_dict[end_ts] = record - stacked_bar_records = RecordsFactory.create_instance(init=list(filtered_record_dict.values()), columns=columns) + stacked_bar_records =\ + RecordsFactory.create_instance(init=list(filtered_record_dict.values()), + columns=columns) return stacked_bar_records def _create_empty_records( From c0441c57445b601f387014c4ac69d3b93c977834 Mon Sep 17 00:00:00 2001 From: rokamu623 Date: Thu, 14 Sep 2023 02:43:27 +0900 Subject: [PATCH 4/9] feat: test all stacked bar Signed-off-by: rokamu623 --- .../records_service/test_response_time_all.py | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/src/test/record/records_service/test_response_time_all.py b/src/test/record/records_service/test_response_time_all.py index 3d1f85ee8..a95bde196 100644 --- a/src/test/record/records_service/test_response_time_all.py +++ b/src/test/record/records_service/test_response_time_all.py @@ -138,3 +138,83 @@ def test_drop_case(self): ] result = to_dict(response_time.to_all_records()) assert result == expect_raw + + +class TestAllStackedBar: + + @property + def columns(self) -> list[ColumnValue]: + return [ColumnValue('start'), ColumnValue('middle0'), + ColumnValue('middle1'), ColumnValue('end')] + + @property + def column_names(self) -> list[str]: + return ['start', 'middle0', 'middle1', 'end'] + + def test_empty_case(self): + records_raw = [] + records = create_records(records_raw, self.columns) + + response_time = ResponseTime(records, columns=self.column_names) + + expect_raw = [] + result = to_dict(response_time.to_all_stacked_bar()) + assert result == expect_raw + + def test_single_case(self): + records_raw = [ + {'start': 0, 'middle0': 1, 'middle1': 2, 'end': 3}, + {'start': 4, 'middle0': 5, 'middle1': 7, 'end': 8}, + {'start': 6, 'middle0': 7, 'middle1': 8, 'end': 9} + ] + records = create_records(records_raw, self.columns) + + response_time = ResponseTime(records, columns=self.column_names) + + expect_raw = [ + {'start': 0, 'middle0': 1, 'middle1': 2, 'end': 3}, + {'start': 4, 'middle0': 5, 'middle1': 7, 'end': 8}, + {'start': 6, 'middle0': 7, 'middle1': 8, 'end': 9} + ] + result = to_dict(response_time.to_all_stacked_bar()) + assert result == expect_raw + + def test_multi_case(self): + records_raw = [ + {'start': 0, 'middle0': 1, 'middle1': 3, 'end': 4}, + {'start': 1, 'middle0': 2, 'middle1': 3, 'end': 4}, + {'start': 2, 'middle0': 3, 'middle1': 5, 'end': 6}, + {'start': 3, 'middle0': 4, 'middle1': 5, 'end': 6} + ] + records = create_records(records_raw, self.columns) + + response_time = ResponseTime(records, columns=self.column_names) + + expect_raw = [ + {'start': 0, 'middle0': 1, 'middle1': 3, 'end': 4}, + {'start': 1, 'middle0': 2, 'middle1': 3, 'end': 4}, + {'start': 2, 'middle0': 3, 'middle1': 5, 'end': 6}, + {'start': 3, 'middle0': 4, 'middle1': 5, 'end': 6} + ] + result = to_dict(response_time.to_all_stacked_bar()) + assert result == expect_raw + + def test_drop_case(self): + records_raw = [ + {'start': 0, 'middle0': 1}, + {'start': 1, 'middle0': 2, 'middle1': 3, 'end': 4}, + {'start': 2, 'middle0': 3, 'middle1': 4}, + {'start': 3, 'middle0': 4, 'middle1': 5, 'end': 6} + ] + records = create_records(records_raw, self.columns) + + response_time = ResponseTime(records, columns=self.column_names) + + expect_raw = [ + {'start': 0, 'middle0': 1, 'middle1': 3, 'end': 4}, + {'start': 1, 'middle0': 2, 'middle1': 3, 'end': 4}, + {'start': 2, 'middle0': 3, 'middle1': 4, 'end': 6}, + {'start': 3, 'middle0': 4, 'middle1': 5, 'end': 6} + ] + result = to_dict(response_time.to_all_stacked_bar()) + assert result == expect_raw From c5b0294d5a21dd93662caabb5362888ae3599493 Mon Sep 17 00:00:00 2001 From: rokamu623 Date: Thu, 14 Sep 2023 02:52:34 +0900 Subject: [PATCH 5/9] feat: test worst-in-input stacked bar Signed-off-by: rokamu623 --- .../records_service/test_response_time_all.py | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/src/test/record/records_service/test_response_time_all.py b/src/test/record/records_service/test_response_time_all.py index a95bde196..634d943ca 100644 --- a/src/test/record/records_service/test_response_time_all.py +++ b/src/test/record/records_service/test_response_time_all.py @@ -218,3 +218,79 @@ def test_drop_case(self): ] result = to_dict(response_time.to_all_stacked_bar()) assert result == expect_raw + + +class TestWorstInInputStackedBar: + + @property + def columns(self) -> list[ColumnValue]: + return [ColumnValue('start'), ColumnValue('middle0'), + ColumnValue('middle1'), ColumnValue('end')] + + @property + def column_names(self) -> list[str]: + return ['start', 'middle0', 'middle1', 'end'] + + def test_empty_case(self): + records_raw = [] + records = create_records(records_raw, self.columns) + + response_time = ResponseTime(records, columns=self.column_names) + + expect_raw = [] + result = to_dict(response_time.to_worst_in_input_case_stacked_bar()) + assert result == expect_raw + + def test_single_case(self): + records_raw = [ + {'start': 0, 'middle0': 1, 'middle1': 2, 'end': 3}, + {'start': 4, 'middle0': 5, 'middle1': 7, 'end': 8}, + {'start': 6, 'middle0': 7, 'middle1': 8, 'end': 9} + ] + records = create_records(records_raw, self.columns) + + response_time = ResponseTime(records, columns=self.column_names) + + expect_raw = [ + {'start': 0, 'middle0': 1, 'middle1': 2, 'end': 3}, + {'start': 4, 'middle0': 5, 'middle1': 7, 'end': 8}, + {'start': 6, 'middle0': 7, 'middle1': 8, 'end': 9} + ] + result = to_dict(response_time.to_worst_in_input_case_stacked_bar()) + assert result == expect_raw + + def test_multi_case(self): + records_raw = [ + {'start': 0, 'middle0': 1, 'middle1': 3, 'end': 4}, + {'start': 1, 'middle0': 2, 'middle1': 3, 'end': 4}, + {'start': 2, 'middle0': 3, 'middle1': 5, 'end': 6}, + {'start': 3, 'middle0': 4, 'middle1': 5, 'end': 6} + ] + records = create_records(records_raw, self.columns) + + response_time = ResponseTime(records, columns=self.column_names) + + expect_raw = [ + {'start': 0, 'middle0': 1, 'middle1': 3, 'end': 4}, + {'start': 2, 'middle0': 3, 'middle1': 5, 'end': 6}, + ] + result = to_dict(response_time.to_worst_in_input_case_stacked_bar()) + assert result == expect_raw + + def test_drop_case(self): + records_raw = [ + {'start': 0, 'middle0': 1}, + {'start': 1, 'middle0': 2, 'middle1': 3, 'end': 4}, + {'start': 2, 'middle0': 3, 'middle1': 4}, + {'start': 3, 'middle0': 4, 'middle1': 5, 'end': 6} + ] + records = create_records(records_raw, self.columns) + + response_time = ResponseTime(records, columns=self.column_names) + + expect_raw = [ + {'start': 0, 'middle0': 1, 'middle1': 3, 'end': 4}, + {'start': 2, 'middle0': 3, 'middle1': 4, 'end': 6}, + ] + result = to_dict(response_time.to_worst_in_input_case_stacked_bar()) + assert result == expect_raw \ No newline at end of file From f32221699acea4ca5174688b5cc7253923fc4537 Mon Sep 17 00:00:00 2001 From: rokamu623 Date: Thu, 14 Sep 2023 11:19:57 +0900 Subject: [PATCH 6/9] fix: refactor Signed-off-by: rokamu623 --- .../record/records_service/response_time.py | 90 +++++++++++-------- .../records_service/test_response_time_all.py | 2 +- 2 files changed, 54 insertions(+), 38 deletions(-) diff --git a/src/caret_analyze/record/records_service/response_time.py b/src/caret_analyze/record/records_service/response_time.py index 186afd876..ac9068dd9 100644 --- a/src/caret_analyze/record/records_service/response_time.py +++ b/src/caret_analyze/record/records_service/response_time.py @@ -302,59 +302,75 @@ def to_worst_in_input_records(self) -> RecordsInterface: return records def to_all_stacked_bar(self) -> RecordsInterface: - filled_record_list: list[RecordInterface] = [] + end_column_record_dict: dict[int, list[RecordInterface]] = {} - # fill unrecorded data for each records + # classify records which have same end timestamp + end_ts = None for record in reversed(self._records): - if len(filled_record_list) == 0: - filled_record_list.insert(0, record) + if self._end_column in record.columns: + end_ts = record.get(self._end_column) + elif end_ts is None: continue - next_record = filled_record_list[0] - # fill unrecorded data - for column in self._columns: - if column not in record.columns: - record.add(column, next_record.get(column)) - filled_record_list.insert(0, record) + if end_ts in end_column_record_dict.keys(): + end_column_record_dict[end_ts].insert(0, record) + else: + end_column_record_dict[end_ts] = [record] + + # fill empty data + filled_records_dict: dict[int, list[RecordInterface]] = {} + # for each records which have same end timestamp + for end_ts, record_list in end_column_record_dict.items(): + filled_records_dict[end_ts] = [] + + for record in reversed(record_list): + # if record dont has some timestamps, + # record timestamps just after + for column in self._columns: + if column in record.columns: + continue + timestamps = [record.get(column) for record in filled_records_dict[end_ts] + if column in record.columns] + record.add(column, min(timestamps)) + filled_records_dict[end_ts].append(record) columns = [ColumnValue(c) for c in self._columns] - stacked_bar_records =\ - RecordsFactory.create_instance(init=filled_record_list, columns=columns) + stacked_bar_records: RecordsInterface =\ + RecordsFactory.create_instance(init=sum(filled_records_dict.values(), []), + columns=columns) + stacked_bar_records.sort_column_order() return stacked_bar_records def to_worst_in_input_case_stacked_bar(self) -> RecordsInterface: - filled_record_list: list[RecordInterface] = [] + end_column_record_dict: dict[int, list[RecordInterface]] = {} - # fill unrecorded data for each records + # classify records which have same end timestamp + end_ts = None for record in reversed(self._records): - if len(filled_record_list) == 0: - filled_record_list.insert(0, record) + if self._end_column in record.columns: + end_ts = record.get(self._end_column) + elif end_ts is None: continue - next_record = filled_record_list[0] - # fill unrecorded data - for column in self._columns: - if column not in record.columns: - record.add(column, next_record.get(column)) - filled_record_list.insert(0, record) + if end_ts in end_column_record_dict.keys(): + end_column_record_dict[end_ts].append(record) + else: + end_column_record_dict[end_ts] = [record] - # {end_timestamp: record} - filtered_record_dict: dict[int, RecordInterface] = {} - columns = [ColumnValue(c) for c in self._columns] + # generate worst-case work flow + filled_record_list: list[RecordInterface] = [] + for record_list in end_column_record_dict.values(): + wirst_in_input_record = RecordFactory.create_instance() - # filter worst-in-input record - for record in self._records: - end_ts = record.get(self._end_column) - if end_ts not in filtered_record_dict.keys(): - filtered_record_dict[end_ts] = record - else: - if record.get(self._start_column)\ - < filtered_record_dict[end_ts].get(self._start_column): - filtered_record_dict[end_ts] = record + for column in self._columns: + timestamps = [r.get(column) for r in record_list if column in r.columns] + wirst_in_input_record.add(column, min(timestamps)) + filled_record_list.append(wirst_in_input_record) - stacked_bar_records =\ - RecordsFactory.create_instance(init=list(filtered_record_dict.values()), - columns=columns) + columns = [ColumnValue(c) for c in self._columns] + stacked_bar_records: RecordsInterface =\ + RecordsFactory.create_instance(init=filled_record_list, columns=columns) + stacked_bar_records.sort_column_order() return stacked_bar_records def _create_empty_records( diff --git a/src/test/record/records_service/test_response_time_all.py b/src/test/record/records_service/test_response_time_all.py index 634d943ca..bb4048921 100644 --- a/src/test/record/records_service/test_response_time_all.py +++ b/src/test/record/records_service/test_response_time_all.py @@ -293,4 +293,4 @@ def test_drop_case(self): {'start': 2, 'middle0': 3, 'middle1': 4, 'end': 6}, ] result = to_dict(response_time.to_worst_in_input_case_stacked_bar()) - assert result == expect_raw \ No newline at end of file + assert result == expect_raw From d6617788e82af6b9518c55546b185572d0a0dad4 Mon Sep 17 00:00:00 2001 From: rokamu623 Date: Thu, 14 Sep 2023 12:13:54 +0900 Subject: [PATCH 7/9] fix: spell Signed-off-by: rokamu623 --- src/caret_analyze/record/records_service/response_time.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/caret_analyze/record/records_service/response_time.py b/src/caret_analyze/record/records_service/response_time.py index ac9068dd9..fb3910713 100644 --- a/src/caret_analyze/record/records_service/response_time.py +++ b/src/caret_analyze/record/records_service/response_time.py @@ -360,12 +360,12 @@ def to_worst_in_input_case_stacked_bar(self) -> RecordsInterface: # generate worst-case work flow filled_record_list: list[RecordInterface] = [] for record_list in end_column_record_dict.values(): - wirst_in_input_record = RecordFactory.create_instance() + worst_in_input_record = RecordFactory.create_instance() for column in self._columns: timestamps = [r.get(column) for r in record_list if column in r.columns] - wirst_in_input_record.add(column, min(timestamps)) - filled_record_list.append(wirst_in_input_record) + worst_in_input_record.add(column, min(timestamps)) + filled_record_list.append(worst_in_input_record) columns = [ColumnValue(c) for c in self._columns] stacked_bar_records: RecordsInterface =\ From d66beb27b09635eb3428a0eb60e25976d7afd3aa Mon Sep 17 00:00:00 2001 From: rokamu623 Date: Thu, 14 Sep 2023 12:40:58 +0900 Subject: [PATCH 8/9] fix: pass mypy Signed-off-by: rokamu623 --- src/caret_analyze/record/records_service/response_time.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/caret_analyze/record/records_service/response_time.py b/src/caret_analyze/record/records_service/response_time.py index fb3910713..1c6e3b838 100644 --- a/src/caret_analyze/record/records_service/response_time.py +++ b/src/caret_analyze/record/records_service/response_time.py @@ -336,7 +336,8 @@ def to_all_stacked_bar(self) -> RecordsInterface: columns = [ColumnValue(c) for c in self._columns] stacked_bar_records: RecordsInterface =\ - RecordsFactory.create_instance(init=sum(filled_records_dict.values(), []), + RecordsFactory.create_instance(init=[_.data for _ + in sum(filled_records_dict.values(), [])], columns=columns) stacked_bar_records.sort_column_order() return stacked_bar_records @@ -369,7 +370,8 @@ def to_worst_in_input_case_stacked_bar(self) -> RecordsInterface: columns = [ColumnValue(c) for c in self._columns] stacked_bar_records: RecordsInterface =\ - RecordsFactory.create_instance(init=filled_record_list, columns=columns) + RecordsFactory.create_instance(init=[_.data for _ in filled_record_list], + columns=columns) stacked_bar_records.sort_column_order() return stacked_bar_records From 0f565b0a8fc7ec9e62ed671ca9cd43f62b96cccb Mon Sep 17 00:00:00 2001 From: rokamu623 Date: Fri, 15 Sep 2023 12:26:39 +0900 Subject: [PATCH 9/9] fix: spell error Signed-off-by: rokamu623 --- src/caret_analyze/record/records_service/response_time.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/caret_analyze/record/records_service/response_time.py b/src/caret_analyze/record/records_service/response_time.py index 1c6e3b838..1dcb430fb 100644 --- a/src/caret_analyze/record/records_service/response_time.py +++ b/src/caret_analyze/record/records_service/response_time.py @@ -324,7 +324,7 @@ def to_all_stacked_bar(self) -> RecordsInterface: filled_records_dict[end_ts] = [] for record in reversed(record_list): - # if record dont has some timestamps, + # if record doesn't have some timestamps, # record timestamps just after for column in self._columns: if column in record.columns: