Skip to content

Replace system time with monotonic time for calculating intervals#748

Merged
mattklein123 merged 8 commits intomasterfrom
monotonic-time
Apr 17, 2017
Merged

Replace system time with monotonic time for calculating intervals#748
mattklein123 merged 8 commits intomasterfrom
monotonic-time

Conversation

@danielhochman
Copy link
Contributor

@danielhochman danielhochman commented Apr 12, 2017

fixes #312

TODO need to look at:

@danielhochman danielhochman changed the title Monotonic time Replace system time with monotonic time for calculating intervals Apr 12, 2017
@goaway
Copy link
Contributor

goaway commented Apr 13, 2017

lgtm

@mattklein123
Copy link
Member

@dnoe do you mind giving this a first pass?

@mattklein123 mattklein123 requested a review from dnoe April 14, 2017 00:26
* Less typing for common system time type.
* Less typing for common system time and steady time type.
*
* SystemTime should be used when getting a time to present to the user, e.g. for logging
Copy link
Member

Choose a reason for hiding this comment

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

super nit: '.' at the end here and there.

// At 300ms we shouldn't have hit the timeout yet:
mock_time_ += 300;
// EXPECT_CALL(time_source_, currentSystemTime()).WillRepeatedly(testing::Return(time_point_));
// EXPECT_CALL(time_source_, currentTime()).WillRepeatedly(testing::Return(time_point_));
Copy link
Member

Choose a reason for hiding this comment

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

if there is an expectation on this call, we could do EXPECT_CALL(time_source_, currentTime()) since we have default behavior set in ctor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

out of scope. i believe @dnoe was working on cleaning up these tests separately anyways.

Copy link
Member

Choose a reason for hiding this comment

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

Can you just delete these commented out statements here and below as long as you are in here. They can be added back later if needed.

@mattklein123 mattklein123 mentioned this pull request Apr 17, 2017
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

LGTM just small deletion in test code needed.

@mattklein123 mattklein123 merged commit d37dbf4 into master Apr 17, 2017
@mattklein123 mattklein123 deleted the monotonic-time branch April 17, 2017 21:49
jpsim pushed a commit that referenced this pull request Nov 28, 2022
Description: disable until #748 is fixed.
Risk Level: low given stats are being flushed every 5 secs.

Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this pull request Nov 28, 2022
Description: tag with two updates:
- #749. Disable lifecycle event-base stat flushing until #748 is resolved.
- #751 to get additional data of the number of retries attempted by envoy mobile

Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this pull request Nov 29, 2022
Description: disable until #748 is fixed.
Risk Level: low given stats are being flushed every 5 secs.

Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this pull request Nov 29, 2022
Description: tag with two updates:
- #749. Disable lifecycle event-base stat flushing until #748 is resolved.
- #751 to get additional data of the number of retries attempted by envoy mobile

Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: JP Simard <jp@jpsim.com>
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.

use std::steady_clock for intervals

4 participants