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: refactor best/worst record api in response time #323

Merged
merged 17 commits into from
Nov 9, 2023

Conversation

rokamu623
Copy link
Contributor

@rokamu623 rokamu623 commented Sep 1, 2023

Description

The method of calculating ResponseTime for the best and worst-with-external-latency cases has been changed to be the same as for all and worst case.

Related links

Jira: https://tier4.atlassian.net/browse/RT2-889

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.

@rokamu623 rokamu623 self-assigned this Sep 1, 2023
@rokamu623 rokamu623 changed the title refact: best/worst record api in response time feat: refactor best/worst record api in response time Sep 1, 2023
@nabetetsu
Copy link
Collaborator

@rokamu623 I see you have some commit in the fork repository, do you need any additional changes on?

Signed-off-by: rokamu623 <[email protected]>
Signed-off-by: rokamu623 <[email protected]>
Signed-off-by: rokamu623 <[email protected]>
Signed-off-by: rokamu623 <[email protected]>
Signed-off-by: rokamu623 <[email protected]>
{'start': 4, 'response_time': 6},
{'start': 6, 'response_time': 0}
]
assert to_dict(response_time) == expect
Copy link
Contributor

@bopeng-saitama bopeng-saitama Nov 1, 2023

Choose a reason for hiding this comment

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

@rokamu623
I think need to add test for the following cases:
End Time Earlier Than Start Time:

    records_raw = [
        {'start': 3, 'end': 2},
        {'start': 5, 'end': 4},
    ]

Only End Time, No Start Time:

    records_raw = [
        {'end': 3},
        {'end': 5},
    ]

Copy link
Contributor

@bopeng-saitama bopeng-saitama left a comment

Choose a reason for hiding this comment

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

LGTM

@isp-uetsuki isp-uetsuki requested review from xygyo77 and removed request for isp-uetsuki November 6, 2023 06:58
Copy link
Contributor

@xygyo77 xygyo77 left a comment

Choose a reason for hiding this comment

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

I used "autoware_launch_trace_20221227-150253_universe_rosbag" to get the timeseries graph of ResponseTime before and after applying this PR. Before applying this PR, the version was bokeh3.3.0.
Visual inspection showed that there were differences in "best" and "worst-with-external-latency" cases. Please check the difference.

BEFORE
PR323-pre-resp_tl_best_bokeh_plot
PR323-pre-resp_tl_worst_bokeh_plot
PR323-pre-resp_tl_all_bokeh_plot
PR323-pre-resp_tl_wwel_bokeh_plot
AFTER
PR323-after-resp-tl-best-bokeh_plot
PR323-after-resp-tl-worst-bokeh_plot
PR323-after-resp-tl-all-bokeh_plot
Specification change?
PR323-after-resp-tl-wwel-bokeh_plot

@rokamu623
Copy link
Contributor Author

@xygyo77
Is the difference about best-case?

Regarding this,
Before refactoring, the response time of the 1st path is not calculated.
This is because in the worst-with-external-latency case, the start time of the previous path (worst-case external input time) cannot be defined.

In fact, except in the worst-with-external-latency case, the response time can be calculated for the 1st path (output time - input time).

Therefore, after refactoring, the response time for the 1st path is recorded more than before refactoring.

Copy link
Contributor

@xygyo77 xygyo77 left a comment

Choose a reason for hiding this comment

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

LGTM
Note: With https://tier4.atlassian.net/browse/RT2-888, the "worst-with-external-latency" case has been replaced by the old "worst" case.

@rokamu623 rokamu623 merged commit 6482159 into tier4:main Nov 9, 2023
9 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.

4 participants