Skip to content

Update all timers to micrometer instances#3744

Merged
t2gran merged 17 commits into
opentripplanner:dev-2.xfrom
entur:otp2_add_timing_data
Dec 2, 2021
Merged

Update all timers to micrometer instances#3744
t2gran merged 17 commits into
opentripplanner:dev-2.xfrom
entur:otp2_add_timing_data

Conversation

@hannesj

@hannesj hannesj commented Nov 12, 2021

Copy link
Copy Markdown
Contributor

Summary

This PR changes both WorkerPerformanceTimers and DebugTimingAggregator to use micrometer Timing instances, in order to improve the monitoring capabilities of OTP.

It also:

  • Always logs times DebugTimingAggregator in order for us to be able to send them to the user if requested.
  • Fixes a bug in SpeedTest, which previously caused NPEs
  • Add timingData for potentially expensive fields in the Transmodel GraphQL API
  • Add possibility to add additional tags for micrometer from HTTP headers in the Transmodel GraphQL API

Unit tests

This is mostly refactoring, so existing tests continue to work.

Code style

Code style followed

Documentation

Added Javadoc for TransmodelAPIParameters

@hannesj
hannesj requested a review from a team as a code owner November 12, 2021 13:25
@hannesj
hannesj requested a review from t2gran November 12, 2021 13:25
@t2gran t2gran added this to the 2.1 milestone Nov 16, 2021
@t2gran t2gran added the !Improvement A functional improvement or micro feature label Nov 16, 2021
Comment thread src/test/java/org/opentripplanner/transit/raptor/speed_test/ResultPrinter.java Outdated
Comment thread src/main/java/org/opentripplanner/routing/framework/DebugTimingAggregator.java Outdated
Comment thread src/main/java/org/opentripplanner/transit/raptor/util/AvgTimer.java

@leonardehrenfried leonardehrenfried left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks very good but I picked up on a few small issues.

@t2gran t2gran left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good. I will run the SpeedTest with my old benchmark testdata set and post the results.

Comment thread src/main/java/org/opentripplanner/standalone/config/TransmodelAPIConfig.java Outdated

@leonardehrenfried leonardehrenfried left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I left a few comments.

@t2gran

t2gran commented Nov 16, 2021

Copy link
Copy Markdown
Member

I ran the SpeedTest using the code from this PR. I think this PR is good to go, but we need to look at why the heuristic is so slow. The results are here #3748. I also noticed that in some cases we get long access/egress - but that might be because I used a new osm file/changes in the street routing.

@hannesj

hannesj commented Nov 22, 2021

Copy link
Copy Markdown
Contributor Author

Thanks for the review. I've addressed the issues raised.

Comment thread src/test/java/org/opentripplanner/transit/raptor/speed_test/ResultPrinter.java Outdated
Comment thread src/main/java/org/opentripplanner/standalone/server/OTPApplication.java Outdated
Comment thread src/ext/java/org/opentripplanner/ext/actuator/ActuatorAPI.java Outdated
@t2gran
t2gran self-requested a review November 30, 2021 10:01
@t2gran
t2gran merged commit b9ccc82 into opentripplanner:dev-2.x Dec 2, 2021
@t2gran
t2gran deleted the otp2_add_timing_data branch December 2, 2021 15:56
t2gran pushed a commit that referenced this pull request Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

!Improvement A functional improvement or micro feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants