Skip to content

Conversation

@danesfeder
Copy link
Contributor

@danesfeder danesfeder commented Feb 8, 2019

Fixes #1732

This PR updates the route retrieval event to send seconds (with .00 precision) instead of nanoseconds. It also uses an EventListener from OkHttp for monitoring the start and end time of the network request.

TODO:

  • Verify new data in mode
  • Wait for upstream 4.4.0 release of Java library

@codecov-io
Copy link

codecov-io commented Feb 8, 2019

Codecov Report

Merging #1731 into master will decrease coverage by 0.41%.
The diff coverage is 77.5%.

@@             Coverage Diff              @@
##             master    #1731      +/-   ##
============================================
- Coverage     30.26%   29.84%   -0.42%     
  Complexity      860      860              
============================================
  Files           225      226       +1     
  Lines          8212     8233      +21     
  Branches        636      636              
============================================
- Hits           2485     2457      -28     
- Misses         5493     5542      +49     
  Partials        234      234

@1ec5
Copy link
Contributor

1ec5 commented Feb 8, 2019

This fixes #1732.

Copy link
Contributor

@Guardiola31337 Guardiola31337 left a comment

Choose a reason for hiding this comment

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

Left some minor comments. Other than that this looks awesome 🚀

Let me know if you need help with

  • Verify new data in mode

Thanks @danesfeder

RouteRetrievalEvent(double elapsedTime, String routeUuid, String sessionId) {
super(sessionId);

addCounter(new LongCounter(ELAPSED_TIME_NAME, elapsedTime));
Copy link
Contributor

Choose a reason for hiding this comment

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

Class 'LongCounter' is never used

Could we remove it altogether?


public class ElapsedTimeTest {

private static final double DELTA = 1E-10;
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't need such big DELTA especially if we're rounding to 2 point decimals and we're testing that the rounding is correct.

long elapsedTimeInNanoseconds = end - start;
double elapsedTimeInSeconds = elapsedTimeInNanoseconds / 1e+9;
double roundedTime = Math.round(elapsedTimeInSeconds * 100d) / 100d;
assertEquals(elapsedTime.getElapsedTime(), roundedTime, DELTA);
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT the "expected" and the "actual" values are reversed.

@akitchen akitchen added the release blocker Needs to be resolved before the release. label Feb 11, 2019
@akitchen
Copy link

Thanks for opening this @danesfeder . This is a must-have for this Wednesday's release, so let's please get it wrapped up and merged. Thank you!

@danesfeder
Copy link
Contributor Author

@Guardiola31337 this is updated, thanks for the feedback. Let's get that job going so we can see the data in mode 🚀

@danesfeder danesfeder force-pushed the dan-retrieval-event branch 2 times, most recently from bc08c26 to affbc28 Compare February 12, 2019 20:31
@danesfeder danesfeder changed the title [WIP] Update RouteRetrievalEvent Update RouteRetrievalEvent Feb 12, 2019
@danesfeder danesfeder force-pushed the dan-retrieval-event branch 3 times, most recently from 951a809 to 1b4a25c Compare February 13, 2019 17:18
Copy link
Contributor

@devotaaabel devotaaabel left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for running with this!

@danesfeder danesfeder merged commit af9f1a3 into master Feb 13, 2019
@danesfeder danesfeder deleted the dan-retrieval-event branch February 13, 2019 18:33
@Guardiola31337 Guardiola31337 mentioned this pull request Feb 13, 2019
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release blocker Needs to be resolved before the release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants