|
CPP-TOOLBOX
|
Public Member Functions | |
| __init__ (self, Section root_section, str build_direction="up", float ndc_units_per_second=0.5, bool use_custom_root_section_height=True, float custom_root_section_height=0.01, float base_timeline_position_y=0, bool draw_timeline=True, float timeline_tick_width=0.01, float timeline_tick_height=0.1, Optional[str] custom_start_time=None) | |
| from_config (cls, "Section" root_section, str config_path) | |
| float | time_to_x (self, datetime timestamp) |
| tuple | generate_color (self, int depth, int index=0) |
| draw_base_timeline (self) | |
| draw_ticks (self) | |
| float | get_depth_scale (self, int depth) |
| float | get_event_width_depth_based (self, float root_section_width, int depth) |
| float | get_event_width_aspect_ratio_based (self, float section_width) |
| float | get_section_rect_height_depth_based (self, float root_section_width, int depth) |
| float | get_section_rect_height_aspect_ratio_based (self, float section_width) |
| tuple[float, float, float] | draw_section_rect (self, Section section, int depth, int section_index, float bottom_y_section, float root_section_width, float height_is_depth_based=True) |
| group_event_sequences (self, "Section" section) | |
| draw_event_sequence_annotations (self, List[Event] event_sequence, Section parent_section, int depth, float parent_section_rect_center_y, float parent_section_rect_width, float parent_section_rect_height, float root_section_width, float height_is_depth_based=True) | |
| process_section (self, Section section, int depth, float bottom_y_current_section, int section_index_for_labelling=0, float root_section_width=-1, float height_is_depth_based=False) | |
| List[str] | generate (self) |
| List[str] | save (self, str filename="timeline_visualization.txt") |
Public Attributes | |
| root_section = root_section | |
| list | commands = [] |
| list | used_text_areas = [] |
| int | build_direction_factor = "down" else 1 |
| ndc_units_per_second = ndc_units_per_second | |
| use_custom_root_section_height = use_custom_root_section_height | |
| custom_root_section_height = custom_root_section_height | |
| base_timeline_position_y = base_timeline_position_y | |
| draw_timeline = draw_timeline | |
| timeline_tick_width = timeline_tick_width | |
| timeline_tick_height = timeline_tick_height | |
| datetime | start_time = parse_spdlog_time(custom_start_time) |
| datetime | end_time = root_section.end_time |
| tuple | total_duration |
| parse_logs.TimelineVisualizer.__init__ | ( | self, | |
| Section | root_section, | ||
| str | build_direction = "up", | ||
| float | ndc_units_per_second = 0.5, | ||
| bool | use_custom_root_section_height = True, | ||
| float | custom_root_section_height = 0.01, | ||
| float | base_timeline_position_y = 0, | ||
| bool | draw_timeline = True, | ||
| float | timeline_tick_width = 0.01, | ||
| float | timeline_tick_height = 0.1, | ||
| Optional[str] | custom_start_time = None ) |
| parse_logs.TimelineVisualizer.draw_base_timeline | ( | self | ) |
| parse_logs.TimelineVisualizer.draw_event_sequence_annotations | ( | self, | |
| List[Event] | event_sequence, | ||
| Section | parent_section, | ||
| int | depth, | ||
| float | parent_section_rect_center_y, | ||
| float | parent_section_rect_width, | ||
| float | parent_section_rect_height, | ||
| float | root_section_width, | ||
| float | height_is_depth_based = True ) |
| tuple[float, float, float] parse_logs.TimelineVisualizer.draw_section_rect | ( | self, | |
| Section | section, | ||
| int | depth, | ||
| int | section_index, | ||
| float | bottom_y_section, | ||
| float | root_section_width, | ||
| float | height_is_depth_based = True ) |
| parse_logs.TimelineVisualizer.draw_ticks | ( | self | ) |
| parse_logs.TimelineVisualizer.from_config | ( | cls, | |
| "Section" | root_section, | ||
| str | config_path ) |
Factory method to create a TimelineVisualizer from a JSON config file. Note that the config file's syntax is just json with the key being the TimelineVisualizer attribute and the value the value you want to use.
| List[str] parse_logs.TimelineVisualizer.generate | ( | self | ) |
| tuple parse_logs.TimelineVisualizer.generate_color | ( | self, | |
| int | depth, | ||
| int | index = 0 ) |
| float parse_logs.TimelineVisualizer.get_depth_scale | ( | self, | |
| int | depth ) |
| float parse_logs.TimelineVisualizer.get_event_width_aspect_ratio_based | ( | self, | |
| float | section_width ) |
| float parse_logs.TimelineVisualizer.get_event_width_depth_based | ( | self, | |
| float | root_section_width, | ||
| int | depth ) |
| float parse_logs.TimelineVisualizer.get_section_rect_height_aspect_ratio_based | ( | self, | |
| float | section_width ) |
| float parse_logs.TimelineVisualizer.get_section_rect_height_depth_based | ( | self, | |
| float | root_section_width, | ||
| int | depth ) |
| parse_logs.TimelineVisualizer.group_event_sequences | ( | self, | |
| "Section" | section ) |
| parse_logs.TimelineVisualizer.process_section | ( | self, | |
| Section | section, | ||
| int | depth, | ||
| float | bottom_y_current_section, | ||
| int | section_index_for_labelling = 0, | ||
| float | root_section_width = -1, | ||
| float | height_is_depth_based = False ) |
| List[str] parse_logs.TimelineVisualizer.save | ( | self, | |
| str | filename = "timeline_visualization.txt" ) |
| float parse_logs.TimelineVisualizer.time_to_x | ( | self, | |
| datetime | timestamp ) |
| parse_logs.TimelineVisualizer.base_timeline_position_y = base_timeline_position_y |
| parse_logs.TimelineVisualizer.build_direction_factor = "down" else 1 |
| list parse_logs.TimelineVisualizer.commands = [] |
| parse_logs.TimelineVisualizer.custom_root_section_height = custom_root_section_height |
| parse_logs.TimelineVisualizer.draw_timeline = draw_timeline |
| datetime parse_logs.TimelineVisualizer.end_time = root_section.end_time |
| parse_logs.TimelineVisualizer.ndc_units_per_second = ndc_units_per_second |
| parse_logs.TimelineVisualizer.root_section = root_section |
| datetime parse_logs.TimelineVisualizer.start_time = parse_spdlog_time(custom_start_time) |
| parse_logs.TimelineVisualizer.timeline_tick_height = timeline_tick_height |
| parse_logs.TimelineVisualizer.timeline_tick_width = timeline_tick_width |
| tuple parse_logs.TimelineVisualizer.total_duration |
| parse_logs.TimelineVisualizer.use_custom_root_section_height = use_custom_root_section_height |
| list parse_logs.TimelineVisualizer.used_text_areas = [] |