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

perf(velocity_smoother): not resample debug_trajectories is not used #8030

Merged
merged 2 commits into from
Jul 30, 2024

update dependant packages

c644ec3
Select commit
Loading
Failed to load commit list.
Merged

perf(velocity_smoother): not resample debug_trajectories is not used #8030

update dependant packages
c644ec3
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Jul 30, 2024 in 37s

CodeScene PR Check

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: +0.04 (7.64 -> 7.68)

  • Declining Code Health: 4 findings(s) 🚩
  • Improving Code Health: 5 findings(s) ✅

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Method jerk_filtered_smoother.cpp: JerkFilteredSmoother::apply
  • Complex Method linf_pseudo_jerk_smoother.cpp: LinfPseudoJerkSmoother::apply
  • Complex Method l2_pseudo_jerk_smoother.cpp: L2PseudoJerkSmoother::apply
  • Complex Method analytical_jerk_constrained_smoother.cpp: AnalyticalJerkConstrainedSmoother::apply

✅ Improving Code Health:

  • Overall Code Complexity node.cpp
  • Complex Method node.cpp: VelocitySmootherNode::smoothVelocity
  • Deep, Nested Complexity node.cpp: VelocitySmootherNode::smoothVelocity
  • Excess Number of Function Arguments l2_pseudo_jerk_smoother.cpp: L2PseudoJerkSmoother::apply
  • Excess Number of Function Arguments linf_pseudo_jerk_smoother.cpp: LinfPseudoJerkSmoother::apply

Annotations

Check notice on line 679 in planning/autoware_velocity_smoother/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ Getting better: Complex Method

VelocitySmootherNode::smoothVelocity decreases in cyclomatic complexity from 14 to 13, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 1 in planning/autoware_velocity_smoother/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ Getting better: Overall Code Complexity

The mean cyclomatic complexity decreases from 4.26 to 4.23, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.

Check notice on line 679 in planning/autoware_velocity_smoother/src/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ No longer an issue: Deep, Nested Complexity

VelocitySmootherNode::smoothVelocity is no longer above the threshold for nested complexity depth. This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health.

Check warning on line 107 in planning/autoware_velocity_smoother/src/smoother/analytical_jerk_constrained_smoother/analytical_jerk_constrained_smoother.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

AnalyticalJerkConstrainedSmoother::apply already has high cyclomatic complexity, and now it increases in Lines of Code from 116 to 117. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 139 in planning/autoware_velocity_smoother/src/smoother/jerk_filtered_smoother.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

JerkFilteredSmoother::apply increases in cyclomatic complexity from 26 to 28, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 139 in planning/autoware_velocity_smoother/src/smoother/jerk_filtered_smoother.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

ℹ Getting worse: Bumpy Road Ahead

JerkFilteredSmoother::apply increases from 3 to 4 logical blocks with deeply nested code, threshold is one single block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.

Check notice on line 1 in planning/autoware_velocity_smoother/src/smoother/jerk_filtered_smoother.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

ℹ Getting worse: Overall Code Complexity

The mean cyclomatic complexity increases from 6.00 to 6.25, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.

Check notice on line 139 in planning/autoware_velocity_smoother/src/smoother/jerk_filtered_smoother.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

ℹ Getting worse: Excess Number of Function Arguments

JerkFilteredSmoother::apply increases from 5 to 6 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check warning on line 57 in planning/autoware_velocity_smoother/src/smoother/l2_pseudo_jerk_smoother.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

L2PseudoJerkSmoother::apply already has high cyclomatic complexity, and now it increases in Lines of Code from 123 to 124. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 57 in planning/autoware_velocity_smoother/src/smoother/l2_pseudo_jerk_smoother.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ No longer an issue: Excess Number of Function Arguments

L2PseudoJerkSmoother::apply is no longer above the threshold for number of arguments

Check warning on line 57 in planning/autoware_velocity_smoother/src/smoother/linf_pseudo_jerk_smoother.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

LinfPseudoJerkSmoother::apply already has high cyclomatic complexity, and now it increases in Lines of Code from 133 to 134. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 57 in planning/autoware_velocity_smoother/src/smoother/linf_pseudo_jerk_smoother.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ No longer an issue: Excess Number of Function Arguments

LinfPseudoJerkSmoother::apply is no longer above the threshold for number of arguments