Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add sim time to plot APIs (only non-supported APIs) #433

Merged
merged 36 commits into from
Dec 11, 2023

Conversation

xygyo77
Copy link
Contributor

@xygyo77 xygyo77 commented Nov 20, 2023

Description

Modify the following API to support sim_time.

  • create_response_time_stacked_bar_plot()
  • create_response_time_timeseries_plot()
  • create_response_time_histogram_plot()
  • create_latency_histogram_plot()
  • create_period_histogram_plot()
  • create_frequency_histogram_plot()

Related links

https://tier4.atlassian.net/browse/RT2-1083

Notes for reviewers

Pre-review checklist for the PR author

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

  • The PR has been properly tested.
  • The PR has been reviewed.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • (Optional) The PR has been properly tested with CARET_report verification.
  • There are no open discussions or they are tracked via tickets.
  • The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

xygyo77 and others added 9 commits November 14, 2023 22:54
* Unified graph captions.

Signed-off-by: emb4 <[email protected]>

* Unified conditional branching of graph captions.

Signed-off-by: emb4 <[email protected]>

* Fixed flake8 errors.

Signed-off-by: emb4 <[email protected]>

* Point corrected.

Signed-off-by: emb4 <[email protected]>

* Corrected string notation.

Signed-off-by: emb4 <[email protected]>

* Corrected string notation.

Signed-off-by: emb4 <[email protected]>

* Corrected the points pointed out.

Signed-off-by: emb4 <[email protected]>

* Corrected caption.

Signed-off-by: emb4 <[email protected]>

* Corrected caption.

Signed-off-by: emb4 <[email protected]>

---------

Signed-off-by: emb4 <[email protected]>
…ier4#430)

* chore(histogram): display number instead of probability

Signed-off-by: takeshi.iwanari <[email protected]>

* fix: change hover label

Signed-off-by: takeshi.iwanari <[email protected]>

---------

Signed-off-by: takeshi.iwanari <[email protected]>
@xygyo77 xygyo77 requested a review from isp-uetsuki November 20, 2023 03:16
@xygyo77 xygyo77 changed the title Feat: add sim time to plot APIs (only non-supported APIs) feat: add sim time to plot APIs (only non-supported APIs) Nov 20, 2023
Copy link
Contributor

@isp-uetsuki isp-uetsuki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I suggest creating utility function to get ClockConverter from object (Communication, Callback, etc.) to recude redundancy. My suggestions are:
    • adding util.py to caret_analyze/plot
    • adding get_clock_converter function to util.py above
  • I suggest adding simulation time support to StackedBarPlot.to_dataframe. (I think it does not work currently because LatencyStackedBar.to_dataframe does not support simulation time.)
  • I suggest removing MetricsBase._convert_timeseries_records_to_sim_time and using conversion functionality of metrics objects (Frequency, ResponseTime, etc.) instead to reduce redundancy.

src/caret_analyze/plot/metrics_base.py Outdated Show resolved Hide resolved
src/caret_analyze/plot/visualize_lib/bokeh/bokeh.py Outdated Show resolved Hide resolved
src/caret_analyze/plot/visualize_lib/bokeh/bokeh.py Outdated Show resolved Hide resolved
src/caret_analyze/plot/visualize_lib/bokeh/stacked_bar.py Outdated Show resolved Hide resolved
src/caret_analyze/plot/visualize_lib/bokeh/stacked_bar.py Outdated Show resolved Hide resolved
Copy link
Contributor

@isp-uetsuki isp-uetsuki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I think the meaning of is_base_ts_convert argument of Frequency.to_records is a little bit difficult to understand. I suggest to remove this argument by:
    • removing converter argument from FrequencyTimeSeries._get_timestamp_range. Now, min_time and max_time in FrequencyTimeSeries.to_timeseries_records_list are always in system time.
    • removing is_base_ts_convert argument of Frequency.to_records and Frequency._get_frequency_with_timestamp.

Copy link
Contributor

@isp-uetsuki isp-uetsuki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@miyakoshi-dev miyakoshi-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xygyo77 xygyo77 merged commit 840a9db into tier4:main Dec 11, 2023
10 checks passed
isp-uetsuki added a commit to isp-uetsuki/CARET_analyze that referenced this pull request Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants